aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Tests
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2015-11-07 13:39:30 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-11-07 13:39:30 +0100
commit4529d0f4b6b20cbbd1ccb5339a753aff7d35552b (patch)
tree84724eea1cef0c6d44afbb850d939367921a230c /src/Wallabag/ApiBundle/Tests
parent3d9ccf9390f35e73428ebf42258253c6808f1590 (diff)
parent164d260c498a74b6b97a17dd63f9dd6088702ebc (diff)
downloadwallabag-4529d0f4b6b20cbbd1ccb5339a753aff7d35552b.tar.gz
wallabag-4529d0f4b6b20cbbd1ccb5339a753aff7d35552b.tar.zst
wallabag-4529d0f4b6b20cbbd1ccb5339a753aff7d35552b.zip
Merge pull request #1510 from wallabag/v2-sf3
v2 – Fix some deprecated for Symfony3
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests')
-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;