PHP Class Contao\CoreBundle\Test\EventListener\UserSessionListenerTest

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.
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

Méthode 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 méthode

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

scopeBagProvider() public méthode

Provides the data for the testSessionReplacedOnKernelRequest() method.
public scopeBagProvider ( ) : array
Résultat array

scopeTableProvider() public méthode

Provides the data for the testSessionStoredOnKernelResponse() method.
public scopeTableProvider ( ) : array
Résultat array

testInstantiation() public méthode

Tests the object instantiation.
public testInstantiation ( )

testListenerSkipIfNoContaoUserOnKernelRequest() public méthode

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

testListenerSkipIfNoContaoUserOnKernelResponse() public méthode

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

testListenerSkipIfNoUserOnKernelRequest() public méthode

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 méthode

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 méthode

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

testListenerSkipUponSubRequestOnKernelResponse() public méthode

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

testSessionReplacedOnKernelRequest() public méthode

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 méthode

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