create(); $mrna_term = chado_get_cvterm(['id' => 'SO:0000234']); $analysis = factory('chado.analysis')->create(); $mrna_1 = factory('chado.feature')->create([ 'type_id' => $mrna_term->cvterm_id, 'organism_id' => $organism->organism_id, 'name' => 'FRAEX38873_v2_000000010.1', 'uniquename' => 'FRAEX38873_v2_000000010.1', ]); $mrna_2 = factory('chado.feature')->create([ 'type_id' => $mrna_term->cvterm_id, 'organism_id' => $organism->organism_id, 'name' => 'FRAEX38873_v2_000000010.2', 'uniquename' => 'FRAEX38873_v2_000000010.2', ]); $file = ['file_local' => __DIR__ . '/../data/two_prots.fasta']; $run_args = [ 'analysis_id' => $analysis->analysis_id, 'organism_id' => $organism->organism_id, 'seqtype' => 'polypeptide', 'parent_type' => "mRNA", 'rel_type' => "derives_from", 'method' => '2', 'match_type' => '1', 're_name' => "", 're_uname' => "", 're_accession' => "", 'db_id' => "", 're_subject' => "", 'match_type' => "1", ]; $importer->create($run_args, $file); $importer->prepareFiles(); $importer->run(); $result = db_select('chado.feature', 'f') ->fields('f') ->condition('f.organism_id', $organism->organism_id) ->execute() ->fetchAll(); $this->assertNotEquals(2, count($result), 'The child features were not loaded when a regexp was not provided.'); $query = db_select('chado.feature_relationship', 'fr') ->fields('fr') ->condition('fr.object_id', $mrna_1->feature_id); $query->join('chado.feature', 'f', 'f.feature_id = fr.subject_id'); $result = $query->execute() ->fetchObject(); $this->assertNotFalse($result, 'relationship was not added to parente feature when regexp not provided (same parent/child name).'); } }