|
@@ -43,8 +43,31 @@ class TaxonomyImporterTest extends TripalTestCase {
|
|
|
$this->assertNotEmpty($result);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ * the importer can also load an array of pubmed ids. We use the pillbug again.
|
|
|
+ *
|
|
|
+ * https:
|
|
|
+ *
|
|
|
+ * @throws \Exception
|
|
|
+ */
|
|
|
+ public function testImportOrganismFromTaxID() {
|
|
|
+
|
|
|
+ $file = [];
|
|
|
+ $run_args = ['taxonomy_ids' => '96821'];
|
|
|
+ $importer = new \TaxonomyImporter();
|
|
|
+
|
|
|
+ ob_start();
|
|
|
+ $importer->create($run_args, $file);
|
|
|
+ $importer->run();
|
|
|
+ ob_end_clean();
|
|
|
+
|
|
|
+ $query = db_select('chado.organism', 'o');
|
|
|
+ $query->fields('o', ['genus'])
|
|
|
+ ->condition('o.species', 'officinalis');
|
|
|
+ $result = $query->execute()->fetchField();
|
|
|
+ $this->assertEquals('Armadillo', $result);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|