reset database for each test, test menuitem creation
This commit is contained in:
parent
01354fa70c
commit
634f13d968
2 changed files with 25 additions and 6 deletions
|
@ -25,13 +25,8 @@ abstract class DbWebTest extends WebTestCase
|
|||
$schemaTool = new SchemaTool($this->manager);
|
||||
$metadata = $this->manager->getMetadataFactory()
|
||||
->getAllMetadata();
|
||||
$schemaTool->dropDatabase();
|
||||
$schemaTool->updateSchema($metadata);
|
||||
|
||||
$this->repository = $this->manager->getRepository($this->getEntityClass());
|
||||
foreach ($this->repository->findAll() as $object) {
|
||||
$this->manager->remove($object);
|
||||
}
|
||||
|
||||
$this->manager->flush();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue