1
0
mirror of synced 2025-01-20 23:41:39 +03:00

[2.0] Fixing getConnection() to use the new dropAndCreateDatabase()

This commit is contained in:
jwage 2009-05-30 06:22:18 +00:00
parent d34a05a257
commit 47ffde10c8

View File

@ -22,21 +22,13 @@ class TestUtil
'memory' => true
);
}
$conn = \Doctrine\DBAL\DriverManager::getConnection($params);
$sm = $conn->getSchemaManager();
try {
$sm->dropDatabase();
} catch (\Exception $e) {}
try {
$sm->createDatabase();
} catch (\Exception $e) {}
$conn->getSchemaManager()->dropAndCreateDatabase();
$conn->close();
$conn->connect();
$conn = \Doctrine\DBAL\DriverManager::getConnection($params);
return $conn;
}
}