‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest:

Public Member Functions

 userFieldIsNotSetForAnonymousSessions ()
 
 storeSessionDataOnAnonymousUserWithNoData ()
 
 canSetAndUnsetSessionKey ()
 
 canSetSessionDataForAnonymousUser ()
 
 canLoadExistingAuthenticatedSession ()
 
 canLogUserInWithoutAnonymousSession ()
 
 canPreserveSessionDataWhenAuthenticating ()
 
 canRemoveSessionData ()
 
 destroysAnonymousSessionIfDataIsNull ()
 
 sessionDataShouldBePreservedOnLogout ()
 

Protected Attributes

bool $resetSingletonInstances = true
 

Private Attributes

const NOT_CHECKED_INDICATOR = '--not-checked--'
 

Detailed Description

Test cases for FrontendUserAuthentication

Todo:
‪: Some of these tests would be better suited as functional tests

Definition at line 39 of file FrontendUserAuthenticationTest.php.

Member Function Documentation

◆ canLoadExistingAuthenticatedSession()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canLoadExistingAuthenticatedSession ( )

Session data should be loaded when a session cookie is available and user user is authenticated

Test:

Definition at line 253 of file FrontendUserAuthenticationTest.php.

References $GLOBALS.

◆ canLogUserInWithoutAnonymousSession()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canLogUserInWithoutAnonymousSession ( )
Test:

Definition at line 327 of file FrontendUserAuthenticationTest.php.

References $GLOBALS.

◆ canPreserveSessionDataWhenAuthenticating()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canPreserveSessionDataWhenAuthenticating ( )

Session data set before a user is signed in should be preserved when signing in

Test:

Definition at line 401 of file FrontendUserAuthenticationTest.php.

◆ canRemoveSessionData()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canRemoveSessionData ( )

removeSessionData should clear all session data

Test:

Definition at line 471 of file FrontendUserAuthenticationTest.php.

◆ canSetAndUnsetSessionKey()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canSetAndUnsetSessionKey ( )

Setting and immediately removing session data should be handled correctly. No write operations should be made

Test:

Definition at line 136 of file FrontendUserAuthenticationTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest\NOT_CHECKED_INDICATOR.

◆ canSetSessionDataForAnonymousUser()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::canSetSessionDataForAnonymousUser ( )

A user that is not signed in should be able to have associated session data

Test:

Definition at line 185 of file FrontendUserAuthenticationTest.php.

References $GLOBALS.

◆ destroysAnonymousSessionIfDataIsNull()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::destroysAnonymousSessionIfDataIsNull ( )
Test:

If a user has an anonymous session, and its data is set to null, then the record is removed

Definition at line 501 of file FrontendUserAuthenticationTest.php.

◆ sessionDataShouldBePreservedOnLogout()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::sessionDataShouldBePreservedOnLogout ( )
Test:
‪Any session data set when logged in should be preserved when logging out

Definition at line 554 of file FrontendUserAuthenticationTest.php.

◆ storeSessionDataOnAnonymousUserWithNoData()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::storeSessionDataOnAnonymousUserWithNoData ( )
Test:

Definition at line 94 of file FrontendUserAuthenticationTest.php.

◆ userFieldIsNotSetForAnonymousSessions()

TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::userFieldIsNotSetForAnonymousSessions ( )

User properties should not be set for anonymous sessions

Test:

Definition at line 52 of file FrontendUserAuthenticationTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest\NOT_CHECKED_INDICATOR.

Member Data Documentation

◆ $resetSingletonInstances

bool TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::$resetSingletonInstances = true
protected

Reset singletons created by subject

Definition at line 45 of file FrontendUserAuthenticationTest.php.

◆ NOT_CHECKED_INDICATOR

const TYPO3\CMS\Frontend\Tests\Unit\Authentication\FrontendUserAuthenticationTest::NOT_CHECKED_INDICATOR = '--not-checked--'
private