PHP Class Contao\CoreBundle\Test\EventListener\UserSessionListenerTest

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.
scopeBagProvider ( ) : array Provides the data for the testSessionReplacedOnKernelRequest() method.
scopeTableProvider ( ) : array Provides the data for the testSessionStoredOnKernelResponse() method.
testInstantiation ( ) Tests the object instantiation.
testListenerSkipIfNoContaoUserOnKernelRequest ( ) Tests that the session bag is not requested if there is no Contao user upon kernel.request.
testListenerSkipIfNoContaoUserOnKernelResponse ( ) Tests that neither the session bag nor doctrine is requested if there is no Contao user upon kernel.response.
testListenerSkipIfNoUserOnKernelRequest ( AnonymousToken $noUserReturn = null ) Tests that the session bag is not requested when there is no user.
testListenerSkipIfNoUserOnKernelResponse ( AnonymousToken $noUserReturn = null ) Tests that neither the session bag nor doctrine is requested when there is no user.
testListenerSkipUponSubRequestOnKernelRequest ( ) Tests that the session bag is not requested upon a sub request.
testListenerSkipUponSubRequestOnKernelResponse ( ) Tests that neither the session bag nor doctrine is requested upon a sub request.
testSessionReplacedOnKernelRequest ( string $scope, string $userClass, string $sessionBagName ) Tests that the session is replaced upon kernel.request.
testSessionStoredOnKernelResponse ( string $scope, string $userClass, string $userTable ) Tests that the session is stored upon kernel.response.

Private Methods

Method Description
getListener ( Symfony\Component\HttpFoundation\Session\SessionInterface $session = null, Doctrine\DBAL\Connection $connection = null, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null ) : UserSessionListener Returns the session listener object.

Method Details

noUserProvider() public method

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

scopeBagProvider() public method

Provides the data for the testSessionReplacedOnKernelRequest() method.
public scopeBagProvider ( ) : array
return array

scopeTableProvider() public method

Provides the data for the testSessionStoredOnKernelResponse() method.
public scopeTableProvider ( ) : array
return array

testInstantiation() public method

Tests the object instantiation.
public testInstantiation ( )

testListenerSkipIfNoContaoUserOnKernelRequest() public method

Tests that the session bag is not requested if there is no Contao user upon kernel.request.

testListenerSkipIfNoContaoUserOnKernelResponse() public method

Tests that neither the session bag nor doctrine is requested if there is no Contao user upon kernel.response.

testListenerSkipIfNoUserOnKernelRequest() public method

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

testListenerSkipIfNoUserOnKernelResponse() public method

Tests that neither the session bag nor doctrine is requested when there is no user.
public testListenerSkipIfNoUserOnKernelResponse ( AnonymousToken $noUserReturn = null )
$noUserReturn Symfony\Component\Security\Core\Authentication\Token\AnonymousToken

testListenerSkipUponSubRequestOnKernelRequest() public method

Tests that the session bag is not requested upon a sub request.

testListenerSkipUponSubRequestOnKernelResponse() public method

Tests that neither the session bag nor doctrine is requested upon a sub request.

testSessionReplacedOnKernelRequest() public method

Tests that the session is replaced upon kernel.request.
public testSessionReplacedOnKernelRequest ( string $scope, string $userClass, string $sessionBagName )
$scope string
$userClass string
$sessionBagName string

testSessionStoredOnKernelResponse() public method

Tests that the session is stored upon kernel.response.
public testSessionStoredOnKernelResponse ( string $scope, string $userClass, string $userTable )
$scope string
$userClass string
$userTable string