From 0b09e50148b5ae50ed8ecff71842b518c2626695 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 30 May 2009 09:53:36 +0000 Subject: [PATCH] [2.0] Adjusted getConnection since there is no need to create/drop the database for sqlite in-memory. --- tests/Doctrine/Tests/TestUtil.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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