summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-03 00:07:38 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-03 00:07:38 +0000
commitdf36d28b8a1a5c593a2a930d34008fb8233e7bd1 (patch)
treefbf235231f233d9d10f63657ffaef677e3c2e396
parente173f36bcb50451c49e5708de29fcb41267b41f4 (diff)
Make the unit_test database config the default so that our test runs don't
mess up the real database.
-rw-r--r--modules/gallery_unit_test/controllers/test.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/controllers/test.php b/modules/gallery_unit_test/controllers/test.php
index d012cf8b..75ba6f35 100644
--- a/modules/gallery_unit_test/controllers/test.php
+++ b/modules/gallery_unit_test/controllers/test.php
@@ -38,6 +38,9 @@ class Test_Controller extends Controller {
try {
$db = Database::instance('unit_test');
$db->connect();
+
+ // Make this the default database for the rest of this run
+ Database::$instances = array('default' => $db);
} catch (Exception $e) {
print "{$e->getMessage()}\n";
return;