瀏覽代碼

remove probleatic test

bradford.condon 6 年之前
父節點
當前提交
8aba8a23de
共有 2 個文件被更改,包括 7 次插入24 次删除
  1. 0 21
      tests/tripal_chado/loaders/OBOImporterTest.php
  2. 7 3
      tripal_chado/includes/TripalImporter/OBOImporter.inc

+ 0 - 21
tests/tripal_chado/loaders/OBOImporterTest.php

@@ -621,27 +621,6 @@ class OBOImporterTest extends TripalTestCase {
     $result = $importer->findEBITerm($id);
     $this->assertNotEmpty($result);
     $this->assertEquals('fertilizer exposure', $result['name'][0]);
-
     }
 
-  /**
-   * @group obo
-   * @group chado
-   * @ticket 680
-   */
-  public function testLoadStanza() {
-
-    module_load_include('inc', 'tripal_chado', 'includes/TripalImporter/OBOImporter');
-    $importer_private = new \OBOImporter();
-    $importer = reflect($importer_private);
-    $type = "term";
-    $stanza = ['id' => ["PECO:0007085"]];
-
-    $dfsjfkjds = 'trait_ontology';
-
-    $importer->default_namespace = $dfsjfkjds;
-    $importer->default_db = 'TO';
-    $importer->cacheTermStanza($stanza, $type);
-
-  }
 }

+ 7 - 3
tripal_chado/includes/TripalImporter/OBOImporter.inc

@@ -998,11 +998,14 @@ class OBOImporter extends TripalImporter {
       }
       $ontology_results = drupal_json_decode($response->data);
       if ($ontology_results['error']) {
-        throw new Exception(t('Cannot find the ontology via an EBI OLS lookup: !short_name. ' .
+
+        $this->logMessage(t('Cannot find the ontology via an EBI OLS lookup: !short_name. \n' .
+          'We tried to access: !url'.
           'EBI Reported: !message. ' .
           'Consider finding the OBO file for this ontology and manually loading it first.',
-          ['!message' => $ontology_results['message'], '!short_name' => $short_name]));
+          ['!message' => $ontology_results['message'], '!short_name' => $short_name, '!url' => $full_url]), TRIPAL_WARNING);
       }
+      //What should happen with this stuff?
       $base_iri = $ontology_results['config']['baseUris'][0];
       $ontologyID = $ontology_results['ontologyId'];
       $this->baseIRIs[$short_name] = [$ontologyID, $base_iri];
@@ -1021,8 +1024,9 @@ class OBOImporter extends TripalImporter {
     // If EBI sent an error message then throw an error.
     if ($results['error']) {
       $this->logMessage('Cannot find the term via an EBI OLS lookup: !term. ' .
+        'We tried to access: !url'.
         'EBI Reported: !message. Consider finding the OBO file for this ontology and manually loading it first.',
-        ['!message' => $results['message'], '!term' => $id], TRIPAL_WARNING);
+        ['!message' => $results['message'], '!term' => $id, '!url' => $full_url], TRIPAL_WARNING);
 
       return FALSE;
     }