diff --git a/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php index 741f0373b..0ae7c235a 100644 --- a/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php +++ b/src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php @@ -34,7 +34,7 @@ trait PrepareClientTrait * @return \Symfony\Component\BrowserKit\Client * @throws \LogicException */ - public function getClient( + public function getClientAuthenticated( $username = 'center a_social', $password = 'password' ) { diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/DefaultControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/DefaultControllerTest.php deleted file mode 100644 index 69e7f4e47..000000000 --- a/src/Bundle/ChillMainBundle/Tests/Controller/DefaultControllerTest.php +++ /dev/null @@ -1,13 +0,0 @@ -container = self::$kernel->getContainer(); - $this->prophet = new \Prophecy\Prophet; } @@ -97,7 +90,7 @@ class ExportManagerTest extends KernelTestCase \Symfony\Component\Security\Core\User\UserInterface $user = null ) { - $localUser = $user === NULL ? $this->container->get('doctrine.orm.entity_manager') + $localUser = $user === NULL ? self::$container->get('doctrine.orm.entity_manager') ->getRepository('ChillMainBundle:User') ->findOneBy(array('username' => 'center a_social')) : $user; @@ -106,10 +99,10 @@ class ExportManagerTest extends KernelTestCase $tokenStorage->setToken($token); return new ExportManager( - $logger === NULL ? $this->container->get('logger') : $logger, - $em === NULL ? $this->container->get('doctrine.orm.entity_manager') : $em, - $authorizationChecker === NULL ? $this->container->get('security.authorization_checker') : $authorizationChecker, - $authorizationHelper === NULL ? $this->container->get('chill.main.security.authorization.helper') : $authorizationHelper, + $logger === NULL ? self::$container->get('logger') : $logger, + $em === NULL ? self::$container->get('doctrine.orm.entity_manager') : $em, + $authorizationChecker === NULL ? self::$container->get('security.authorization_checker') : $authorizationChecker, + $authorizationHelper === NULL ? self::$container->get('chill.main.security.authorization.helper') : $authorizationHelper, $tokenStorage) ; } @@ -544,7 +537,7 @@ class ExportManagerTest extends KernelTestCase $export = $this->prophet->prophesize(); $export->willImplement(ExportInterface::class); - $em = $this->container->get('doctrine.orm.entity_manager'); + $em = self::$container->get('doctrine.orm.entity_manager'); $export->initiateQuery( Argument::is(array('foo')), Argument::Type('array'), @@ -627,7 +620,7 @@ class ExportManagerTest extends KernelTestCase //add formatter interface $formatter = new \Chill\MainBundle\Export\Formatter\SpreadSheetFormatter( - $this->container->get('translator'), $exportManager); + self::$container->get('translator'), $exportManager); $exportManager->addFormatter($formatter, 'spreadsheet'); //ob_start();