diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-11-07 00:17:37 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-11-07 00:17:37 +0100 |
commit | 18f8f32f70a3f76b307f4255eee0f51187b07283 (patch) | |
tree | 0d81173a7e58dfff2e018327a60391e77292dfa8 /src/Wallabag/ApiBundle/Tests | |
parent | 5ead137fe6885395ffcc99903263dec235f2c051 (diff) | |
download | wallabag-18f8f32f70a3f76b307f4255eee0f51187b07283.tar.gz wallabag-18f8f32f70a3f76b307f4255eee0f51187b07283.tar.zst wallabag-18f8f32f70a3f76b307f4255eee0f51187b07283.zip |
Fix security.context deprecation
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests')
-rw-r--r-- | src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php | 6 |
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; |