Make the unit_test database config the default so that our test runs don't

mess up the real database.
This commit is contained in:
Bharat Mediratta
2008-11-03 00:07:38 +00:00
parent e173f36bcb
commit df36d28b8a

View File

@@ -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;