mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Avoid creating 2 connections when applying fixtures
This commit is contained in:
@@ -24,9 +24,7 @@ class Upgrade39UsersTest extends \PhraseanetTestCase
|
||||
*/
|
||||
public function testApply($fixture)
|
||||
{
|
||||
$this->loadFixture($fixture);
|
||||
|
||||
$em = $this->createEntityManager();
|
||||
$em = $this->loadFixture($fixture);
|
||||
|
||||
$upgrader = new Upgrade39Users();
|
||||
$configuration = new YamlConfiguration($em->getConnection());
|
||||
@@ -131,6 +129,7 @@ class Upgrade39UsersTest extends \PhraseanetTestCase
|
||||
$em->getConnection()->executeQuery('CREATE DATABASE '.self::DB_NAME.' CHARACTER SET utf8 COLLATE utf8_general_ci');
|
||||
$em = $this->createEntityManager();
|
||||
$em->getConnection()->executeQuery(file_get_contents(self::$DI['cli']['root.path'].'/'.$fixture));
|
||||
return $em;
|
||||
}
|
||||
|
||||
private function createEntityManager($dbname = self::DB_NAME)
|
||||
|
Reference in New Issue
Block a user