diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index 11f1ee43d..2d4032dc3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Controller; use Chill\MainBundle\Test\PrepareClientTrait; use DateTime; +use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DomCrawler\Form; @@ -48,21 +49,21 @@ final class PersonControllerCreateTest extends WebTestCase public static function tearDownAfterClass(): void { self::bootKernel(); - $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $em = self::$kernel->getContainer()->get(EntityManagerInterface::class); //remove two people created during test $jesus = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy(['firstName' => 'God']); if (null !== $jesus) { - $em->remove($jesus); + //$em->remove($jesus); } $jesus2 = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy(['firstName' => 'roger']); if (null !== $jesus2) { - $em->remove($jesus2); + //$em->remove($jesus2); } $em->flush(); }