PHP Class Contao\CoreBundle\Test\EventListener\StoreRefererListenerTest

Inheritance: extends Contao\CoreBundle\Test\TestCase
Afficher le fichier Open project: contao/core-bundle

Méthodes publiques

Méthode Description
noUserProvider ( ) : array Provides the data for the user-less tests.
refererStoredOnKernelResponseProvider ( ) : array Provides the data for the testRefererStoredOnKernelResponse() method.
testInstantiation ( ) Tests the object instantiation.
testListenerSkipIfBackendSessionNotModifiable ( ) Tests that the session is not written if the back end session cannot be modified.
testListenerSkipIfNoUserOnKernelResponse ( AnonymousToken $noUserReturn = null ) Tests that the session is not written when there is no user.
testListenerSkipUponSubRequestOnKernelResponse ( ) Tests that the session is not written upon a sub request.
testRefererStoredOnKernelResponse ( string $scope, Request $request, array $currentReferer, array $expectedReferer ) Tests that the referer is stored upon kernel.response.

Private Methods

Méthode Description
getListener ( Symfony\Component\HttpFoundation\Session\SessionInterface $session = null, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null ) : StoreRefererListener Returns the session listener object.

Method Details

noUserProvider() public méthode

Provides the data for the user-less tests.
public noUserProvider ( ) : array
Résultat array

refererStoredOnKernelResponseProvider() public méthode

Provides the data for the testRefererStoredOnKernelResponse() method.

testInstantiation() public méthode

Tests the object instantiation.
public testInstantiation ( )

testListenerSkipIfBackendSessionNotModifiable() public méthode

Tests that the session is not written if the back end session cannot be modified.

testListenerSkipIfNoUserOnKernelResponse() public méthode

Tests that the session is not written when there is no user.
public testListenerSkipIfNoUserOnKernelResponse ( AnonymousToken $noUserReturn = null )
$noUserReturn Symfony\Component\Security\Core\Authentication\Token\AnonymousToken

testListenerSkipUponSubRequestOnKernelResponse() public méthode

Tests that the session is not written upon a sub request.

testRefererStoredOnKernelResponse() public méthode

Tests that the referer is stored upon kernel.response.
public testRefererStoredOnKernelResponse ( string $scope, Request $request, array $currentReferer, array $expectedReferer )
$scope string
$request Symfony\Component\HttpFoundation\Request
$currentReferer array
$expectedReferer array