mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 11:29:24 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user