private getListener ( Symfony\Component\HttpFoundation\Session\SessionInterface $session = null, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null ) : |
||
$session | Symfony\Component\HttpFoundation\Session\SessionInterface | |
$tokenStorage | Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | |
return |
private function getListener(SessionInterface $session = null, TokenStorageInterface $tokenStorage = null)
{
if (null === $session) {
$session = $this->mockSession();
}
if (null === $tokenStorage) {
$tokenStorage = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface');
}
$trustResolver = new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class);
return new StoreRefererListener($session, $tokenStorage, $trustResolver);
}