[2.0] Adjusted getConnection since there is no need to create/drop the database for sqlite in-memory.
This commit is contained in:
parent
c3f5cba785
commit
0b09e50148
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user