Contao\CoreBundle\Test\EventListener\StoreRefererListenerTest::getListener PHP Method

getListener() private method

Returns the session listener object.
private getListener ( Symfony\Component\HttpFoundation\Session\SessionInterface $session = null, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null ) : StoreRefererListener
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
return Contao\CoreBundle\EventListener\StoreRefererListener
    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);
    }