em = $container->get('doctrine')->getManager(); $schemaTool = new SchemaTool($this->em); $schemaTool->dropSchema($this->em->getMetadataFactory()->getAllMetadata()); $schemaTool->createSchema($this->em->getMetadataFactory()->getAllMetadata()); } protected function tearDown(): void { $this->em->close(); parent::tearDown(); } /** @return list */ protected function alleEntitaeten(): array { return $this->em->getRepository(MahlzeitEntity::class)->findAll(); } }