‪TYPO3CMS  10.4
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 42 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 256 of file FrontendUserAuthenticationTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ canLogUserInWithoutAnonymousSession()

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

Definition at line 330 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 405 of file FrontendUserAuthenticationTest.php.

◆ canRemoveSessionData()

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

removeSessionData should clear all session data

Test:

Definition at line 475 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 139 of file FrontendUserAuthenticationTest.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and 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 188 of file FrontendUserAuthenticationTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ 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 505 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 558 of file FrontendUserAuthenticationTest.php.

◆ storeSessionDataOnAnonymousUserWithNoData()

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

Definition at line 97 of file FrontendUserAuthenticationTest.php.

◆ userFieldIsNotSetForAnonymousSessions()

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

Member Data Documentation

◆ $resetSingletonInstances

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

Reset singletons created by subject

Definition at line 48 of file FrontendUserAuthenticationTest.php.

◆ NOT_CHECKED_INDICATOR

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