|
@@ -201,19 +201,23 @@ class ChadoSchemaTest extends TripalTestCase {
|
|
|
* @group chado
|
|
|
* @group chado-schema
|
|
|
*/
|
|
|
- public function testGetBaseTables($version, $table_name) {
|
|
|
+ public function testGetBaseTables($version, $known_tables) {
|
|
|
|
|
|
// Check: Known base tables for a given version are returned.
|
|
|
$chado_schema = new \ChadoSchema($version);
|
|
|
$returned_tables = $chado_schema->getBaseTables();
|
|
|
|
|
|
foreach ($known_tables as $table_name) {
|
|
|
- $this->assertArrayHasKey(
|
|
|
- $table_name,
|
|
|
- $returned_tables,
|
|
|
- t('The table, "!known", should exist in the returned base tables list for version !version.',
|
|
|
- array(':known' => $table_name, ':version' => $version))
|
|
|
- );
|
|
|
+
|
|
|
+ $found = false;
|
|
|
+
|
|
|
+ foreach ($returned_tables as $check_table ){
|
|
|
+
|
|
|
+ if ($check_table == $table_name){
|
|
|
+ $found = True;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $this->assertTrue($found, "{$table_name} was not returned by getBaseTables for Chado v {$version}");
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -227,18 +231,19 @@ class ChadoSchemaTest extends TripalTestCase {
|
|
|
* @group chado
|
|
|
* @group chado-schema
|
|
|
*/
|
|
|
- public function testGetCvtermMapping($version, $table_name) {
|
|
|
-
|
|
|
- // Ideally we would create a new chado table + mapping and then test this pulls it out
|
|
|
- // since admin can re-map terms. However, that's more then I meant to bite off right
|
|
|
- // now...
|
|
|
-
|
|
|
- // @todo Test that known terms match the tables we expect.
|
|
|
-
|
|
|
- // @todo Test that a non-existent term throws an error.
|
|
|
-
|
|
|
- // @todo Test that an fake unmapped term returns no mapping.
|
|
|
- }
|
|
|
+ // public function testGetCvtermMapping($version, $table_name) {
|
|
|
+
|
|
|
+ //
|
|
|
+// // Ideally we would create a new chado table + mapping and then test this pulls it out
|
|
|
+// // since admin can re-map terms. However, that's more then I meant to bite off right
|
|
|
+// // now...
|
|
|
+//
|
|
|
+// // @todo Test that known terms match the tables we expect.
|
|
|
+//
|
|
|
+// // @todo Test that a non-existent term throws an error.
|
|
|
+//
|
|
|
+// // @todo Test that an fake unmapped term returns no mapping.
|
|
|
+ // }
|
|
|
|
|
|
/**
|
|
|
* Data Provider: returns known tables specific to a given chado version.
|