remove references to no-static container

This commit is contained in:
Julien Fastré 2021-05-17 10:07:23 +02:00
parent 0a9b8ba0b0
commit 8841af8d2b

View File

@ -26,7 +26,6 @@ use Chill\PersonBundle\Form\Type\PickPersonType;
/** /**
* *
* *
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/ */
class PickPersonTypeTest extends KernelTestCase class PickPersonTypeTest extends KernelTestCase
{ {
@ -86,7 +85,7 @@ class PickPersonTypeTest extends KernelTestCase
*/ */
public function testWithOptionCenter() public function testWithOptionCenter()
{ {
$center = $this->container->get('doctrine.orm.entity_manager') $center = self::$container->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:Center') ->getRepository('ChillMainBundle:Center')
->findOneBy(array('name' => 'Center A')) ->findOneBy(array('name' => 'Center A'))
; ;
@ -117,7 +116,7 @@ class PickPersonTypeTest extends KernelTestCase
*/ */
public function testWithOptionCenters() public function testWithOptionCenters()
{ {
$centers = $this->container->get('doctrine.orm.entity_manager') $centers = self::$container->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:Center') ->getRepository('ChillMainBundle:Center')
->findAll() ->findAll()
; ;