X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FAnnotationBundle%2FWallabagAnnotationTestCase.php;h=9c7aba6bde51b019fe6de58d96fa685269667c62;hb=92a66835624acf6fd14f5adc5f8aab399658592e;hp=82790a5c43c350d7bca672d3a19380b85b525421;hpb=2e16a9033930ea33721f9ffba3fb12d145f5d56b;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/AnnotationBundle/WallabagAnnotationTestCase.php b/tests/Wallabag/AnnotationBundle/WallabagAnnotationTestCase.php index 82790a5c..9c7aba6b 100644 --- a/tests/Wallabag/AnnotationBundle/WallabagAnnotationTestCase.php +++ b/tests/Wallabag/AnnotationBundle/WallabagAnnotationTestCase.php @@ -8,7 +8,7 @@ use Symfony\Component\BrowserKit\Cookie; abstract class WallabagAnnotationTestCase extends WebTestCase { /** - * @var Client + * @var \Symfony\Bundle\FrameworkBundle\Client */ protected $client = null; @@ -35,7 +35,7 @@ abstract class WallabagAnnotationTestCase extends WebTestCase } /** - * @return Client + * @return \Symfony\Bundle\FrameworkBundle\Client */ protected function createAuthorizedClient() { @@ -43,16 +43,16 @@ abstract class WallabagAnnotationTestCase extends WebTestCase $container = $client->getContainer(); /** @var $userManager \FOS\UserBundle\Doctrine\UserManager */ - $userManager = $container->get('fos_user.user_manager'); + $userManager = $container->get('fos_user.user_manager.test'); /** @var $loginManager \FOS\UserBundle\Security\LoginManager */ - $loginManager = $container->get('fos_user.security.login_manager'); + $loginManager = $container->get('fos_user.security.login_manager.test'); $firewallName = $container->getParameter('fos_user.firewall_name'); $this->user = $userManager->findUserBy(['username' => 'admin']); - $loginManager->loginUser($firewallName, $this->user); + $loginManager->logInUser($firewallName, $this->user); // save the login token into the session and put it in a cookie - $container->get('session')->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken())); + $container->get('session')->set('_security_' . $firewallName, serialize($container->get('security.token_storage')->getToken())); $container->get('session')->save(); $session = $container->get('session');