diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-03 00:07:38 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-03 00:07:38 +0000 |
commit | df36d28b8a1a5c593a2a930d34008fb8233e7bd1 (patch) | |
tree | fbf235231f233d9d10f63657ffaef677e3c2e396 /modules | |
parent | e173f36bcb50451c49e5708de29fcb41267b41f4 (diff) |
Make the unit_test database config the default so that our test runs don't
mess up the real database.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery_unit_test/controllers/test.php | 3 |
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; |