From df36d28b8a1a5c593a2a930d34008fb8233e7bd1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Nov 2008 00:07:38 +0000 Subject: Make the unit_test database config the default so that our test runs don't mess up the real database. --- modules/gallery_unit_test/controllers/test.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gallery_unit_test') 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; -- cgit v1.2.3