|
@@ -281,6 +281,49 @@ class GFF3ImporterTest extends TripalTestCase {
|
|
|
$this->assertEquals($row->significance,-2.5);
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Run the GFF loader on gff_strand.gff for testing.
|
|
|
+ *
|
|
|
+ * This tests whether the GFF loader interprets the strand values
|
|
|
+ */
|
|
|
+ public function testGFFImporterInvalidStrandTest() {
|
|
|
+ $gff_file = ['file_local' => __DIR__ . '/../data/gff_strand_invalid.gff'];
|
|
|
+ $analysis = factory('chado.analysis')->create();
|
|
|
+ $organism = factory('chado.organism')->create();
|
|
|
+ $run_args = [
|
|
|
+ 'analysis_id' => $analysis->analysis_id,
|
|
|
+ 'organism_id' => $organism->organism_id,
|
|
|
+ 'use_transaction' => 1,
|
|
|
+ 'add_only' => 0,
|
|
|
+ 'update' => 1,
|
|
|
+ 'create_organism' => 0,
|
|
|
+ 'create_target' => 0,
|
|
|
+ // regexps for mRNA and protein.
|
|
|
+ 're_mrna' => NULL,
|
|
|
+ 're_protein' => NULL,
|
|
|
+ // optional
|
|
|
+ 'target_organism_id' => NULL,
|
|
|
+ 'target_type' => NULL,
|
|
|
+ 'start_line' => NULL,
|
|
|
+ 'landmark_type' => NULL,
|
|
|
+ 'alt_id_attr' => NULL,
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
+ $this->loadLandmarks($analysis, $organism);
|
|
|
+
|
|
|
+ $isException = false;
|
|
|
+ try {
|
|
|
+ $this->runGFFLoader($run_args, $gff_file);
|
|
|
+ }
|
|
|
+ catch(\Exception $ex) {
|
|
|
+ $isException = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->assertEquals($isException, true);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|