diff --git a/tests/Doctrine/Tests/TestUtil.php b/tests/Doctrine/Tests/TestUtil.php index 088c20d7f..a34915bab 100644 --- a/tests/Doctrine/Tests/TestUtil.php +++ b/tests/Doctrine/Tests/TestUtil.php @@ -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; } } \ No newline at end of file