diff --git a/tests/Doctrine/Tests/TestUtil.php b/tests/Doctrine/Tests/TestUtil.php index a34915bab..ab80572a8 100644 --- a/tests/Doctrine/Tests/TestUtil.php +++ b/tests/Doctrine/Tests/TestUtil.php @@ -1,4 +1,4 @@ - $GLOBALS['db_name'], 'port' => $GLOBALS['db_port'] ); + $conn = \Doctrine\DBAL\DriverManager::getConnection($params); + $conn->getSchemaManager()->dropAndCreateDatabase(); + $conn->close(); + $conn->connect(); } else { $params = array( 'driver' => 'pdo_sqlite', 'memory' => true ); + $conn = \Doctrine\DBAL\DriverManager::getConnection($params); } - $conn = \Doctrine\DBAL\DriverManager::getConnection($params); - $conn->getSchemaManager()->dropAndCreateDatabase(); - - $conn->close(); - $conn->connect(); - return $conn; } } \ No newline at end of file