1
0
mirror of synced 2024-12-13 06:46:03 +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;
@ -16,19 +16,18 @@ class TestUtil
'dbname' => $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;
}
}