retirve path from configuration instead of hard path

This commit is contained in:
Nicolas Le Goff
2012-01-04 19:32:59 +01:00
parent 56abfbf5bc
commit 588806767e

View File

@@ -789,16 +789,17 @@ 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);