‪TYPO3CMS  11.5
TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest:

Public Member Functions

 logoffCleansFormProtectionIfBackendUserIsLoggedIn ()
 
array getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider ()
 
 getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin (array $userTsConfiguration)
 
array getFilePermissionsFromStorageDataProvider ()
 
 getFilePermissionsFromStorageOverwritesDefaultPermissions (array $defaultPermissions, $storageUid, array $storagePermissions, array $expectedPermissions)
 
 getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins (array $defaultPermissions, int $storageUid, array $storagePermissions)
 
array getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider ()
 
 getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin (string $permissionValue, array $expectedPermissions)
 
 getFilePermissionsGrantsAllPermissionsToAdminUsers ()
 
 jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration ()
 
 jsConfirmationAllowsSettingMultipleBitsInValue ()
 
 jsConfirmationAllowsUnsettingBitsInValue ($jsConfirmation, $typeChangeAllowed, $copyMovePasteAllowed, $deleteAllowed, $feEditAllowed, $otherAllowed)
 
array jsConfirmationsWithUnsetBits ()
 
 jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet ()
 
 jsConfirmationReturnsTrueIfConfigurationIsMissing ()
 
array getPagePermissionsClauseWithValidUserDataProvider ()
 
 getPagePermissionsClauseWithValidUser (int $perms, bool $admin, array $groups, string $expected)
 
 checkAuthModeReturnsExpectedValue (string $theValue, string $authMode, bool $expectedResult)
 
 checkAuthModeReturnsExpectedValueDataProvider ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

array $defaultFilePermissions
 

Detailed Description

Test case

Definition at line 42 of file BackendUserAuthenticationTest.php.

Member Function Documentation

◆ checkAuthModeReturnsExpectedValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::checkAuthModeReturnsExpectedValue ( string  $theValue,
string  $authMode,
bool  $expectedResult 
)
Test:
‪@dataProvider checkAuthModeReturnsExpectedValueDataProvider
Parameters
string$theValue
string$authMode
bool$expectedResult

Definition at line 773 of file BackendUserAuthenticationTest.php.

◆ checkAuthModeReturnsExpectedValueDataProvider()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::checkAuthModeReturnsExpectedValueDataProvider ( )

Definition at line 792 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageAlwaysReturnsDefaultPermissionsForAdmins ( array  $defaultPermissions,
int  $storageUid,
array  $storagePermissions 
)
Test:
‪@dataProvider getFilePermissionsFromStorageDataProvider

Definition at line 361 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageDataProvider ( )
Returns
‪array

Definition at line 222 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsFromStorageOverwritesDefaultPermissions()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsFromStorageOverwritesDefaultPermissions ( array  $defaultPermissions,
  $storageUid,
array  $storagePermissions,
array  $expectedPermissions 
)
Parameters
array$defaultPermissions
int$storageUid
array$storagePermissions
array$expectedPermissions
Test:
‪@dataProvider getFilePermissionsFromStorageDataProvider

Definition at line 326 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsGrantsAllPermissionsToAdminUsers()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsGrantsAllPermissionsToAdminUsers ( )
Test:

Definition at line 529 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider ( )
Returns
‪array

Definition at line 133 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdmin ( string  $permissionValue,
array  $expectedPermissions 
)
Test:
Parameters
string$permissionValue
array$expectedPermissions‪@dataProvider getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider

Definition at line 509 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromRecordIntoAccountIfUserIsNotAdminDataProvider ( )
Returns
‪array

Definition at line 395 of file BackendUserAuthenticationTest.php.

◆ getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getFilePermissionsTakesUserDefaultPermissionsFromTsConfigIntoAccountIfUserIsNotAdmin ( array  $userTsConfiguration)
Parameters
array$userTsConfiguration
Test:
‪@dataProvider getFilePermissionsTakesUserDefaultAndStoragePermissionsIntoAccountIfUserIsNotAdminDataProvider

Definition at line 187 of file BackendUserAuthenticationTest.php.

◆ getPagePermissionsClauseWithValidUser()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getPagePermissionsClauseWithValidUser ( int  $perms,
bool  $admin,
array  $groups,
string  $expected 
)
Test:
‪@dataProvider getPagePermissionsClauseWithValidUserDataProvider
Parameters
int$perms
bool$admin
array$groups
string$expected

Definition at line 727 of file BackendUserAuthenticationTest.php.

References $args.

◆ getPagePermissionsClauseWithValidUserDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::getPagePermissionsClauseWithValidUserDataProvider ( )

Data provider to test page permissions constraints returns an array of test conditions:

  • ‪permission bit(s) as integer
  • ‪admin flag
  • ‪groups for user
  • ‪expected SQL fragment
Returns
‪array

Definition at line 686 of file BackendUserAuthenticationTest.php.

◆ jsConfirmationAllowsSettingMultipleBitsInValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAllowsSettingMultipleBitsInValue ( )

◆ jsConfirmationAllowsUnsettingBitsInValue()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAllowsUnsettingBitsInValue (   $jsConfirmation,
  $typeChangeAllowed,
  $copyMovePasteAllowed,
  $deleteAllowed,
  $feEditAllowed,
  $otherAllowed 
)
Test:
‪@dataProvider jsConfirmationsWithUnsetBits
Parameters
int$jsConfirmation
int$typeChangeAllowed
int$copyMovePasteAllowed
int$deleteAllowed
int$feEditAllowed
int$otherAllowed

Definition at line 605 of file BackendUserAuthenticationTest.php.

References TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\COPY_MOVE_PASTE, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\DELETE, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\FE_EDIT, TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\OTHER, and TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\TYPE_CHANGE.

◆ jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationAlwaysReturnsFalseIfNoConfirmationIsSet ( )

◆ jsConfirmationReturnsTrueIfConfigurationIsMissing()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationReturnsTrueIfConfigurationIsMissing ( )

◆ jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationReturnsTrueIfPassedValueEqualsConfiguration ( )

◆ jsConfirmationsWithUnsetBits()

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::jsConfirmationsWithUnsetBits ( )
Returns
‪array

Definition at line 625 of file BackendUserAuthenticationTest.php.

◆ logoffCleansFormProtectionIfBackendUserIsLoggedIn()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::logoffCleansFormProtectionIfBackendUserIsLoggedIn ( )

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::setUp ( )
protected

Definition at line 65 of file BackendUserAuthenticationTest.php.

References $GLOBALS.

◆ tearDown()

TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::tearDown ( )
protected

Member Data Documentation

◆ $defaultFilePermissions

array TYPO3\CMS\Core\Tests\Unit\Authentication\BackendUserAuthenticationTest::$defaultFilePermissions
protected
Initial value:
= [
'addFile' => false,
'readFile' => false,
'writeFile' => false,
'copyFile' => false,
'moveFile' => false,
'renameFile' => false,
'deleteFile' => false,
'addFolder' => false,
'readFolder' => false,
'writeFolder' => false,
'copyFolder' => false,
'moveFolder' => false,
'renameFolder' => false,
'deleteFolder' => false,
'recursivedeleteFolder' => false,
]

Definition at line 45 of file BackendUserAuthenticationTest.php.