Browse Source

Merge master and add correct travis environment variables

Abdullah Almsaeed 6 years ago
parent
commit
5aa1d58b6b
3 changed files with 3 additions and 35 deletions
  1. 1 1
      .travis.yml
  2. 2 0
      tests/.travis.env
  3. 0 34
      tests/tripal_ws/http/TripalContentTest.php

+ 1 - 1
.travis.yml

@@ -73,7 +73,7 @@ script:
 
   # Run PHPUnit tests
   - composer update
-  - cp tests/example.env tests/.env
+  - cp tests/.travis.env tests/.env
   - ./vendor/bin/phpunit
 
   # Test Tripal v2 to v3 upgrade steps

+ 2 - 0
tests/.travis.env

@@ -0,0 +1,2 @@
+BASE_URL=http://localhost:8080
+FAKER_LOCALE=en_US

+ 0 - 34
tests/tripal_ws/http/TripalContentTest.php

@@ -57,38 +57,4 @@ class TripalContentTest extends TripalTestCase{
     $json = $response->json();
     $this->assertEquals($json['label'], "$label Collection");
   }
-
-  /** @test */
-  public function testGettingAFeatureResource() {
-    // Create an mRNA feature
-    $mRNA_term = db_query('SELECT * FROM chado.cvterm WHERE name=:name',
-      [':name' => 'mRNA'])->fetchObject();
-    $this->assertNotEmpty($mRNA_term);
-
-    $feature = factory('chado.feature')->create([
-      'type_id' => $mRNA_term->cvterm_id,
-    ]);
-    $this->publish('feature', [$feature->feature_id]);
-
-    // Get the entity to retrieve the ID
-    $entity_id = chado_get_record_entity_by_table('feature', $feature->feature_id);
-    $this->assertNotEmpty($entity_id);
-
-    // Call the web services url
-    $response = $this->get("/web-services/content/v0.1/mRNA/$entity_id");
-    $response->assertSuccessful();
-
-    $response->assertJsonStructure([
-      '@context',
-      '@id',
-      '@type',
-      'label',
-      'ItemPage',
-      'type',
-    ]);
-
-    // Check that the feature name is what we have expected
-    $data = $response->json();
-    $this->assertEquals($feature->name, $data['name']);
-  }
 }