PHP Class Contao\CoreBundle\Test\EventListener\StoreRefererListenerTest

Inheritance: extends Contao\CoreBundle\Test\TestCase
Datei anzeigen Open project: contao/core-bundle

Public Methods

Method 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

Method 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 method

Provides the data for the user-less tests.
public noUserProvider ( ) : array
return array

refererStoredOnKernelResponseProvider() public method

Provides the data for the testRefererStoredOnKernelResponse() method.

testInstantiation() public method

Tests the object instantiation.
public testInstantiation ( )

testListenerSkipIfBackendSessionNotModifiable() public method

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

testListenerSkipIfNoUserOnKernelResponse() public method

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 method

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

testRefererStoredOnKernelResponse() public method

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