aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php')
-rw-r--r--src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php b/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
index 119889b3..09cde0f6 100644
--- a/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
+++ b/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
@@ -25,7 +25,6 @@ abstract class AbstractControllerTest extends WebTestCase
25 $client = static::createClient(); 25 $client = static::createClient();
26 $container = $client->getContainer(); 26 $container = $client->getContainer();
27 27
28 $session = $container->get('session');
29 /** @var $userManager \FOS\UserBundle\Doctrine\UserManager */ 28 /** @var $userManager \FOS\UserBundle\Doctrine\UserManager */
30 $userManager = $container->get('fos_user.user_manager'); 29 $userManager = $container->get('fos_user.user_manager');
31 /** @var $loginManager \FOS\UserBundle\Security\LoginManager */ 30 /** @var $loginManager \FOS\UserBundle\Security\LoginManager */
@@ -36,9 +35,10 @@ abstract class AbstractControllerTest extends WebTestCase
36 $loginManager->loginUser($firewallName, $user); 35 $loginManager->loginUser($firewallName, $user);
37 36
38 // save the login token into the session and put it in a cookie 37 // save the login token into the session and put it in a cookie
39 $container->get('session')->set('_security_'.$firewallName, 38 $container->get('session')->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken()));
40 serialize($container->get('security.context')->getToken()));
41 $container->get('session')->save(); 39 $container->get('session')->save();
40
41 $session = $container->get('session');
42 $client->getCookieJar()->set(new Cookie($session->getName(), $session->getId())); 42 $client->getCookieJar()->set(new Cookie($session->getName(), $session->getId()));
43 43
44 return $client; 44 return $client;