mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Use FQCN instead of service alias
This commit is contained in:
parent
156158673f
commit
eb43c78720
62 changed files with 579 additions and 404 deletions
|
@ -4,6 +4,8 @@ namespace Tests\Wallabag\AnnotationBundle;
|
|||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\BrowserKit\Cookie;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
|
||||
abstract class WallabagAnnotationTestCase extends WebTestCase
|
||||
{
|
||||
|
@ -52,10 +54,10 @@ abstract class WallabagAnnotationTestCase extends WebTestCase
|
|||
$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')->save();
|
||||
$container->get(SessionInterface::class)->set('_security_' . $firewallName, serialize($container->get(TokenStorageInterface::class)->getToken()));
|
||||
$container->get(SessionInterface::class)->save();
|
||||
|
||||
$session = $container->get('session');
|
||||
$session = $container->get(SessionInterface::class);
|
||||
$client->getCookieJar()->set(new Cookie($session->getName(), $session->getId()));
|
||||
|
||||
return $client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue