1
0
mirror of synced 2025-01-06 00:57:10 +03:00

[2.0] Adjusted getConnection since there is no need to create/drop the database for sqlite in-memory.

This commit is contained in:
romanb 2009-05-30 09:53:36 +00:00
parent c3f5cba785
commit 0b09e50148

View File

@ -1,4 +1,4 @@
<?php <?php
namespace Doctrine\Tests; namespace Doctrine\Tests;
@ -16,19 +16,18 @@ class TestUtil
'dbname' => $GLOBALS['db_name'], 'dbname' => $GLOBALS['db_name'],
'port' => $GLOBALS['db_port'] 'port' => $GLOBALS['db_port']
); );
$conn = \Doctrine\DBAL\DriverManager::getConnection($params);
$conn->getSchemaManager()->dropAndCreateDatabase();
$conn->close();
$conn->connect();
} else { } else {
$params = array( $params = array(
'driver' => 'pdo_sqlite', 'driver' => 'pdo_sqlite',
'memory' => true 'memory' => true
); );
$conn = \Doctrine\DBAL\DriverManager::getConnection($params);
} }
$conn = \Doctrine\DBAL\DriverManager::getConnection($params);
$conn->getSchemaManager()->dropAndCreateDatabase();
$conn->close();
$conn->connect();
return $conn; return $conn;
} }
} }