[2.0] Fixing getConnection() to use the new dropAndCreateDatabase()
This commit is contained in:
parent
d34a05a257
commit
47ffde10c8
1 changed files with 3 additions and 11 deletions
|
@ -24,19 +24,11 @@ class TestUtil
|
|||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue