‪TYPO3CMS  10.4
TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest:

Public Member Functions

 fixtureCanBeCreated ()
 
 adminIsAllowedToModifyNonAdminTable ()
 
 nonAdminIsNorAllowedToModifyNonAdminTable ()
 
 nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable ()
 
 adminIsAllowedToModifyAdminTable ()
 
 nonAdminIsNotAllowedToModifyAdminTable ()
 
 nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable ()
 
 checkValueInputEvalWithEvalDouble2 ()
 
array checkValueInputEvalWithEvalDatetimeDataProvider ()
 
 checkValueInputEvalWithEvalDatetime ($input, $serverTimezone, $expectedOutput)
 
 checkValueInputEvalWithSaltedPasswordKeepsExistingHash ()
 
 checkValueInputEvalWithSaltedPasswordReturnsHashForSaltedPassword ()
 
array inputValuesStringsDataProvider ()
 
 inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly ($value, $expectedReturnValue)
 
array inputValuesRangeDoubleDataProvider ()
 
 inputValueCheckRespectsRightLowerAndUpperLimitForDouble ($value, $expectedReturnValue)
 
 inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble ($value, $expectedReturnValue)
 
array inputValuesDataTimeDataProvider ()
 
 inputValueCheckRecognizesDateTimeValuesAsIntegerValuesCorrectly ($value, int $expected)
 
 inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider ()
 
 inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmpty ($inputValue, $expected, $expectedEvalInt)
 
array inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider ()
 
 inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFields ($tcaFieldConf)
 
 inputValueCheckDbtypeIsIndependentFromTimezoneDataProvider ()
 
 inputValueCheckDbtypeIsIndependentFromTimezone ($value, $dbtype, $expectedOutput)
 
 doesCheckModifyAccessListThrowExceptionOnWrongHookInterface ()
 
 doesCheckModifyAccessListHookGetsCalled ()
 
 doesCheckModifyAccessListHookModifyAccessAllowed ()
 
 processDatamapForFrozenNonZeroWorkspaceReturnsFalse ()
 
 doesCheckFlexFormValueHookGetsCalled ()
 
 logCallsWriteLogOfBackendUserIfLoggingIsEnabled ()
 
 logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled ()
 
 logAddsEntryToLocalErrorLogArray ()
 
 logFormatsDetailMessageWithAdditionalDataInLocalErrorArray ()
 
 equalSubmittedAndStoredValuesAreDetermined ($expected, $submittedValue, $storedValue, $storedType, $allowNull)
 
array equalSubmittedAndStoredValuesAreDeterminedDataProvider ()
 
 getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditions ($expected, $eval)
 
array getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider ()
 
 deletePagesOnRootLevelIsDenied ()
 
 deleteRecord_procBasedOnFieldTypeRespectsEnableCascadingDelete ()
 
array checkValue_checkReturnsExpectedValuesDataProvider ()
 
 checkValue_checkReturnsExpectedValues ($value, $expectedValue)
 
 checkValueForInputConvertsNullToEmptyString ()
 
 referenceValuesAreCasted ($value, array $configuration, $expected)
 
array referenceValuesAreCastedDataProvider ()
 
array clearPrefixFromValueRemovesPrefixDataProvider ()
 
 clearPrefixFromValueRemovesPrefix (string $input, string $expected)
 

Protected Member Functions

 setUp ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
array $singletonInstances = array( )
 
DataHandler PHPUnit Framework MockObject MockObject AccessibleObjectInterface $subject
 
BackendUserAuthentication $backEndUser
 

Detailed Description

Test case

Definition at line 41 of file DataHandlerTest.php.

Member Function Documentation

◆ adminIsAllowedToModifyAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::adminIsAllowedToModifyAdminTable ( )
Test:

Definition at line 118 of file DataHandlerTest.php.

◆ adminIsAllowedToModifyNonAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::adminIsAllowedToModifyNonAdminTable ( )
Test:

Definition at line 90 of file DataHandlerTest.php.

◆ checkValue_checkReturnsExpectedValues()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_checkReturnsExpectedValues (   $value,
  $expectedValue 
)
Parameters
string$value
string$expectedValue‪@dataProvider checkValue_checkReturnsExpectedValuesDataProvider
Test:

Definition at line 1043 of file DataHandlerTest.php.

◆ checkValue_checkReturnsExpectedValuesDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_checkReturnsExpectedValuesDataProvider ( )
Returns
‪array

Definition at line 1006 of file DataHandlerTest.php.

◆ checkValueForInputConvertsNullToEmptyString()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForInputConvertsNullToEmptyString ( )
Test:

Definition at line 1062 of file DataHandlerTest.php.

◆ checkValueInputEvalWithEvalDatetime()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueInputEvalWithEvalDatetime (   $input,
  $serverTimezone,
  $expectedOutput 
)
Test:
‪@dataProvider checkValueInputEvalWithEvalDatetimeDataProvider

Definition at line 190 of file DataHandlerTest.php.

References $output.

◆ checkValueInputEvalWithEvalDatetimeDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueInputEvalWithEvalDatetimeDataProvider ( )
Returns
‪array

Definition at line 173 of file DataHandlerTest.php.

◆ checkValueInputEvalWithEvalDouble2()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueInputEvalWithEvalDouble2 ( )
Test:

Definition at line 154 of file DataHandlerTest.php.

◆ checkValueInputEvalWithSaltedPasswordKeepsExistingHash()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueInputEvalWithSaltedPasswordKeepsExistingHash ( )

◆ checkValueInputEvalWithSaltedPasswordReturnsHashForSaltedPassword()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueInputEvalWithSaltedPasswordReturnsHashForSaltedPassword ( )

◆ clearPrefixFromValueRemovesPrefix()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::clearPrefixFromValueRemovesPrefix ( string  $input,
string  $expected 
)
Test:
‪@dataProvider clearPrefixFromValueRemovesPrefixDataProvider
Parameters
string$input
string$expected

Definition at line 1140 of file DataHandlerTest.php.

References $GLOBALS.

◆ clearPrefixFromValueRemovesPrefixDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::clearPrefixFromValueRemovesPrefixDataProvider ( )
Returns
‪array

Definition at line 1119 of file DataHandlerTest.php.

◆ deletePagesOnRootLevelIsDenied()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::deletePagesOnRootLevelIsDenied ( )
Test:

Definition at line 958 of file DataHandlerTest.php.

◆ deleteRecord_procBasedOnFieldTypeRespectsEnableCascadingDelete()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::deleteRecord_procBasedOnFieldTypeRespectsEnableCascadingDelete ( )

◆ doesCheckFlexFormValueHookGetsCalled()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::doesCheckFlexFormValueHookGetsCalled ( )

◆ doesCheckModifyAccessListHookGetsCalled()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::doesCheckModifyAccessListHookGetsCalled ( )

Tests whether the 'checkModifyAccessList' hook is called correctly.

Test:

Definition at line 581 of file DataHandlerTest.php.

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

◆ doesCheckModifyAccessListHookModifyAccessAllowed()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::doesCheckModifyAccessListHookModifyAccessAllowed ( )

Tests whether the 'checkModifyAccessList' hook modifies the $accessAllowed variable.

Test:

Definition at line 599 of file DataHandlerTest.php.

References $GLOBALS.

◆ doesCheckModifyAccessListThrowExceptionOnWrongHookInterface()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::doesCheckModifyAccessListThrowExceptionOnWrongHookInterface ( )

Tests whether a wrong interface on the 'checkModifyAccessList' hook throws an exception.

Test:

Definition at line 567 of file DataHandlerTest.php.

References $GLOBALS.

◆ equalSubmittedAndStoredValuesAreDetermined()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::equalSubmittedAndStoredValuesAreDetermined (   $expected,
  $submittedValue,
  $storedValue,
  $storedType,
  $allowNull 
)
Parameters
bool$expected
string$submittedValue
string$storedValue
string$storedType
bool$allowNull‪@dataProvider equalSubmittedAndStoredValuesAreDeterminedDataProvider
Test:

Definition at line 708 of file DataHandlerTest.php.

References TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\$subject.

◆ equalSubmittedAndStoredValuesAreDeterminedDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::equalSubmittedAndStoredValuesAreDeterminedDataProvider ( )
Returns
‪array

Definition at line 719 of file DataHandlerTest.php.

◆ fixtureCanBeCreated()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::fixtureCanBeCreated ( )
Test:

Definition at line 79 of file DataHandlerTest.php.

◆ getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditions()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditions (   $expected,
  $eval 
)
Parameters
bool$expected
array$eval‪@dataProvider getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider
Test:

Definition at line 903 of file DataHandlerTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\$subject.

◆ getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider ( )
Returns
‪array

Definition at line 933 of file DataHandlerTest.php.

◆ inputValueCheckDbtypeIsIndependentFromTimezone()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckDbtypeIsIndependentFromTimezone (   $value,
  $dbtype,
  $expectedOutput 
)

Tests whether native dbtype inputs are parsed independent from the server timezone.

Parameters
$value
$dbtype
$expectedOutput
Test:
‪@dataProvider inputValueCheckDbtypeIsIndependentFromTimezoneDataProvider

Definition at line 541 of file DataHandlerTest.php.

◆ inputValueCheckDbtypeIsIndependentFromTimezoneDataProvider()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckDbtypeIsIndependentFromTimezoneDataProvider ( )
Returns
‪array

Definition at line 494 of file DataHandlerTest.php.

◆ inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFields()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFields (   $tcaFieldConf)
Test:
Parameters
array$tcaFieldConf‪@dataProvider inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider

Definition at line 486 of file DataHandlerTest.php.

◆ inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider ( )
Returns
‪array

Definition at line 464 of file DataHandlerTest.php.

◆ inputValueCheckRecognizesDateTimeValuesAsIntegerValuesCorrectly()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRecognizesDateTimeValuesAsIntegerValuesCorrectly (   $value,
int  $expected 
)
Parameters
string$value
int$expected
Test:
‪@dataProvider inputValuesDataTimeDataProvider

Definition at line 382 of file DataHandlerTest.php.

◆ inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly (   $value,
  $expectedReturnValue 
)
Test:
‪@dataProvider inputValuesStringsDataProvider
Parameters
string$value
int$expectedReturnValue

Definition at line 264 of file DataHandlerTest.php.

◆ inputValueCheckRespectsRightLowerAndUpperLimitForDouble()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRespectsRightLowerAndUpperLimitForDouble (   $value,
  $expectedReturnValue 
)
Test:
‪@dataProvider inputValuesRangeDoubleDataProvider
Parameters
string$value
int$expectedReturnValue

Definition at line 315 of file DataHandlerTest.php.

◆ inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble (   $value,
  $expectedReturnValue 
)
Test:
‪@dataProvider inputValuesRangeDoubleDataProvider
Parameters
string$value
int$expectedReturnValue

Definition at line 335 of file DataHandlerTest.php.

◆ inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmpty()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmpty (   $inputValue,
  $expected,
  $expectedEvalInt 
)

@dataProvider inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider

Test:
Parameters
$inputValue
$expected
$expectedEvalInt

Definition at line 434 of file DataHandlerTest.php.

◆ inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider ( )

Definition at line 406 of file DataHandlerTest.php.

◆ inputValuesDataTimeDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValuesDataTimeDataProvider ( )
Returns
‪array

Definition at line 353 of file DataHandlerTest.php.

◆ inputValuesRangeDoubleDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValuesRangeDoubleDataProvider ( )

Data provider for inputValuesRangeDoubleDataProvider

Returns
‪array

Definition at line 283 of file DataHandlerTest.php.

◆ inputValuesStringsDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValuesStringsDataProvider ( )

Data provider for inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly

Returns
‪array

Definition at line 232 of file DataHandlerTest.php.

◆ logAddsEntryToLocalErrorLogArray()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::logAddsEntryToLocalErrorLogArray ( )

◆ logCallsWriteLogOfBackendUserIfLoggingIsEnabled()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::logCallsWriteLogOfBackendUserIfLoggingIsEnabled ( )
Test:

Definition at line 648 of file DataHandlerTest.php.

◆ logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled ( )
Test:

Definition at line 660 of file DataHandlerTest.php.

◆ logFormatsDetailMessageWithAdditionalDataInLocalErrorArray()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::logFormatsDetailMessageWithAdditionalDataInLocalErrorArray ( )

◆ nonAdminIsNorAllowedToModifyNonAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::nonAdminIsNorAllowedToModifyNonAdminTable ( )
Test:

Definition at line 99 of file DataHandlerTest.php.

◆ nonAdminIsNotAllowedToModifyAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::nonAdminIsNotAllowedToModifyAdminTable ( )
Test:

Definition at line 127 of file DataHandlerTest.php.

◆ nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable ( )
Test:

Definition at line 108 of file DataHandlerTest.php.

◆ nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable ( )

◆ processDatamapForFrozenNonZeroWorkspaceReturnsFalse()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::processDatamapForFrozenNonZeroWorkspaceReturnsFalse ( )

◆ referenceValuesAreCasted()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::referenceValuesAreCasted (   $value,
array  $configuration,
  $expected 
)
Parameters
mixed$value
array$configuration
int | string$expected
Test:
‪@dataProvider referenceValuesAreCastedDataProvider

Definition at line 1075 of file DataHandlerTest.php.

◆ referenceValuesAreCastedDataProvider()

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::referenceValuesAreCastedDataProvider ( )
Returns
‪array

Definition at line 1086 of file DataHandlerTest.php.

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::setUp ( )
protected

Set up the tests

Definition at line 63 of file DataHandlerTest.php.

References $GLOBALS.

Member Data Documentation

◆ $backEndUser

BackendUserAuthentication TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::$backEndUser
protected

◆ $resetSingletonInstances

bool TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::$resetSingletonInstances = true
protected

Reset singletons created by subject

Definition at line 46 of file DataHandlerTest.php.

◆ $singletonInstances

array TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::$singletonInstances = array( )
protected

A backup of registered singleton instances

Definition at line 50 of file DataHandlerTest.php.

◆ $subject