mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
retirve path from configuration instead of hard path
This commit is contained in:
@@ -789,17 +789,18 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
|
||||
if (null === self::$core)
|
||||
{
|
||||
if (is_file(__DIR__ . '/tests.sqlite'))
|
||||
{
|
||||
unlink(__DIR__ . '/tests.sqlite');
|
||||
}
|
||||
|
||||
self::$core = bootstrap::getCore();
|
||||
|
||||
|
||||
$em = self::$core->getEntityManager();
|
||||
/* @var $em \Doctrine\ORM\EntityManager */
|
||||
|
||||
$params = $em->getConnection()->getParams();
|
||||
|
||||
if (is_file($params["path"]))
|
||||
{
|
||||
unlink($params["path"]);
|
||||
}
|
||||
|
||||
//create schema
|
||||
$this->schematTool = new \Doctrine\ORM\Tools\SchemaTool($em);
|
||||
$this->classesMetatdas = $em->getMetadataFactory()->getAllMetadata();
|
||||
|
Reference in New Issue
Block a user