[2.0] Fixing getConnection() to use the new dropAndCreateDatabase()
This commit is contained in:
parent
d34a05a257
commit
47ffde10c8
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user