mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
add classes metadatas & create a new EntityManager for each test
This commit is contained in:
@@ -809,6 +809,9 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
|||||||
, $em->getClassMetadata('Entities\ValidationData')
|
, $em->getClassMetadata('Entities\ValidationData')
|
||||||
, $em->getClassMetadata('Entities\ValidationParticipant')
|
, $em->getClassMetadata('Entities\ValidationParticipant')
|
||||||
, $em->getClassMetadata('Entities\ValidationSession')
|
, $em->getClassMetadata('Entities\ValidationSession')
|
||||||
|
, $em->getClassMetadata('Entities\UsrList')
|
||||||
|
, $em->getClassMetadata('Entities\UsrListContent')
|
||||||
|
, $em->getClassMetadata('Entities\UsrListOwner')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->schematTool->createSchema($this->classesMetatdas);
|
$this->schematTool->createSchema($this->classesMetatdas);
|
||||||
@@ -986,7 +989,8 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
//create a new core instance loaded with the test environment for each test
|
||||||
|
self::$core = new \Alchemy\Phrasea\Core('test');
|
||||||
$browser = Browser::getInstance();
|
$browser = Browser::getInstance();
|
||||||
$browser->setUserAgent(self::USER_AGENT_FIREFOX8MAC);
|
$browser->setUserAgent(self::USER_AGENT_FIREFOX8MAC);
|
||||||
}
|
}
|
||||||
@@ -994,6 +998,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
|||||||
public function tearDown()
|
public function tearDown()
|
||||||
{
|
{
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
self::$core = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user