|  | @@ -5,13 +5,14 @@ namespace Tests\tripal_chado;
 | 
											
												
													
														|  |  use StatonLab\TripalTestSuite\DBTransaction;
 |  |  use StatonLab\TripalTestSuite\DBTransaction;
 | 
											
												
													
														|  |  use StatonLab\TripalTestSuite\TripalTestCase;
 |  |  use StatonLab\TripalTestSuite\TripalTestCase;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +/**
 | 
											
												
													
														|  | 
 |  | + *
 | 
											
												
													
														|  | 
 |  | + */
 | 
											
												
													
														|  |  class TaxonomyImporterTest extends TripalTestCase {
 |  |  class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    use DBTransaction;
 |  |    use DBTransaction;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -  /*
 |  | 
 | 
											
												
													
														|  | 
 |  | +  /**
 | 
											
												
													
														|  |     * Adds an organism and checks that the importer runs and adds some properties to it.
 |  |     * Adds an organism and checks that the importer runs and adds some properties to it.
 | 
											
												
													
														|  |     *
 |  |     *
 | 
											
												
													
														|  |     */
 |  |     */
 | 
											
										
											
												
													
														|  | @@ -25,9 +26,8 @@ class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |        'common_name' => 'pillbug',
 |  |        'common_name' => 'pillbug',
 | 
											
												
													
														|  |        'type_id' => NULL,
 |  |        'type_id' => NULL,
 | 
											
												
													
														|  |      ];
 |  |      ];
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +    
 | 
											
												
													
														|  |      $organism = factory('chado.organism')->create($org);
 |  |      $organism = factory('chado.organism')->create($org);
 | 
											
												
													
														|  | -    //  $this->publish('organism');
 |  | 
 | 
											
												
													
														|  |      $file = [];
 |  |      $file = [];
 | 
											
												
													
														|  |      $run_args = ['import_existing' => TRUE];
 |  |      $run_args = ['import_existing' => TRUE];
 | 
											
												
													
														|  |      $importer = new \TaxonomyImporter();
 |  |      $importer = new \TaxonomyImporter();
 | 
											
										
											
												
													
														|  | @@ -36,7 +36,6 @@ class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |      $importer->run();
 |  |      $importer->run();
 | 
											
												
													
														|  |      ob_end_clean();
 |  |      ob_end_clean();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      $query = db_select('chado.organism', 'o');
 |  |      $query = db_select('chado.organism', 'o');
 | 
											
												
													
														|  |      $query->join('chado.organismprop', 'op', 'o.organism_id = op.organism_id');
 |  |      $query->join('chado.organismprop', 'op', 'o.organism_id = op.organism_id');
 | 
											
												
													
														|  |      $query->fields('op', ['value'])
 |  |      $query->fields('op', ['value'])
 | 
											
										
											
												
													
														|  | @@ -47,10 +46,10 @@ class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    /**
 |  |    /**
 | 
											
												
													
														|  | -   * the importer can also load an array of pubmed ids.  We use the pillbug
 |  | 
 | 
											
												
													
														|  | 
 |  | +   * The importer can also load an array of pubmed ids.  We use the pillbug
 | 
											
												
													
														|  |     * again.
 |  |     * again.
 | 
											
												
													
														|  |     *
 |  |     *
 | 
											
												
													
														|  | -   * https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=96821
 |  | 
 | 
											
												
													
														|  | 
 |  | +   * Https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=96821
 | 
											
												
													
														|  |     *
 |  |     *
 | 
											
												
													
														|  |     * @throws \Exception
 |  |     * @throws \Exception
 | 
											
												
													
														|  |     */
 |  |     */
 | 
											
										
											
												
													
														|  | @@ -59,7 +58,8 @@ class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |      module_load_include('inc', 'tripal_chado', 'includes/TripalImporter/TaxonomyImporter');
 |  |      module_load_include('inc', 'tripal_chado', 'includes/TripalImporter/TaxonomyImporter');
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      $file = [];
 |  |      $file = [];
 | 
											
												
													
														|  | -    $run_args = ['taxonomy_ids' => '96821']; //its the pillbug again!
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // Its the pillbug again!
 | 
											
												
													
														|  | 
 |  | +    $run_args = ['taxonomy_ids' => '96821'];
 | 
											
												
													
														|  |      $importer = new \TaxonomyImporter();
 |  |      $importer = new \TaxonomyImporter();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      ob_start();
 |  |      ob_start();
 | 
											
										
											
												
													
														|  | @@ -75,4 +75,4 @@ class TaxonomyImporterTest extends TripalTestCase {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -}
 |  | 
 | 
											
												
													
														|  | 
 |  | +}
 |