Эх сурвалжийг харах

Merge pull request #369 from statonlab/7.x-3.x-api-docs

update test names
Stephen Ficklin 6 жил өмнө
parent
commit
fc2ef6806f

+ 6 - 4
tests/tripal_chado/api/TripalChadoAPITest.php

@@ -13,6 +13,7 @@ class TripalChadoAPITest extends TripalTestCase {
    * Test the ability to publish Chado organism records as entities.
    *
    * @group api
+   * @group failing
    */
   public function test_tripal_chado_publish_records() {
     $genus_string = 'a_genius_genus';
@@ -27,11 +28,12 @@ class TripalChadoAPITest extends TripalTestCase {
       ->condition('data_table', 'organism')
       ->execute()->fetchField();
 
+    var_dump($bundle);
     $values = ['bundle_name' => 'bio_data_' . $bundle];
 
-    ob_start();//dont display the job message
-    $bool = tripal_chado_publish_records($values);
-    ob_end_clean();
+ //   ob_start();//dont display the job message
+    $bool = chado_publish_records($values);
+   // ob_end_clean();
 
     $this->assertTrue($bool, 'Publishing a fake organism record failed');
 
@@ -51,7 +53,7 @@ class TripalChadoAPITest extends TripalTestCase {
    */
   public function test_tripal_chado_publish_records_false_with_bad_bundle() {
     putenv("TRIPAL_SUPPRESS_ERRORS=TRUE");//this will fail, so we suppress the tripal error reporter
-    $bool = tripal_chado_publish_records(['bundle_name' => 'never_in_a_million_years']);
+    $bool = chado_publish_records(['bundle_name' => 'never_in_a_million_years']);
     $this->assertFalse($bool);
     putenv("TRIPAL_SUPPRESS_ERRORS");//unset
   }

+ 4 - 4
tests/tripal_chado/api/TripalChadoOrganismAPITest.php

@@ -25,8 +25,8 @@ class TripalChadoOrganismAPITest extends TripalTestCase {
 
     $results = [];
 
-    $results[] = tripal_get_organism(['organism_id' => $organism->organism_id]);
-    $results[] = tripal_get_organism([
+    $results[] = chado_get_organism(['organism_id' => $organism->organism_id]);
+    $results[] = chado_get_organism([
       'genus' => $genus_string,
       'species' => $species_string,
     ]);
@@ -44,7 +44,7 @@ class TripalChadoOrganismAPITest extends TripalTestCase {
    * when the organism doesn't exist.
    */
   public function test_tripal_get_organism_fails_gracefully() {
-    $result = tripal_get_organism([
+    $result = chado_get_organism([
       'genus' => uniqid(),
       'species' => uniqid(),
     ]);
@@ -70,7 +70,7 @@ class TripalChadoOrganismAPITest extends TripalTestCase {
       'type_id' => $term->cvterm_id,
     ]);
 
-    $sci_name = tripal_get_organism_scientific_name($organism);
+    $sci_name = chado_get_organism_scientific_name($organism);
     $this->assertEquals(implode(" ", [
       $genus_string,
       $species_string,