‪TYPO3CMS  ‪main
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 ()
 
 checkValueForDatetime ($input, $serverTimezone, $expectedOutput)
 
 checkValueForColor (string $input, mixed $expected, array $additionalFieldConfig=[])
 
 checkValuePasswordWithSaltedPasswordKeepsExistingHash ()
 
 checkValuePasswordWithSaltedPasswordReturnsHashForSaltedPassword ()
 
 numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectly (string $value, int $expectedReturnValue)
 
 numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectly (string $input, string $expected)
 
 inputValueCheckRespectsRightLowerAndUpperLimitForDouble (string $value, string|int $expectedReturnValue)
 
 inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble (string $value, string|int $expectedReturnValue)
 
 valueCheckRecognizesDatetimeValuesAsIntegerValuesCorrectly (string $value, int $expected)
 
 inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmpty (string|int $inputValue, int $expected,)
 
 datetimeValueCheckDbtypeIsIndependentFromTimezone (string $value, string $dbtype, string $expectedOutput)
 
 inputValueCheckNativeDbType (string|null $value, string $dbType, string $format, bool $nullable, $expectedOutput)
 
 doesCheckModifyAccessListThrowExceptionOnWrongHookInterface ()
 
 doesCheckModifyAccessListHookGetsCalled ()
 
 doesCheckModifyAccessListHookModifyAccessAllowed ()
 
 processDatamapForFrozenNonZeroWorkspaceReturnsFalse ()
 
 checkValue_flex_procInData_travDS (array $dataValues, array $DSelements, array $expected)
 
 logCallsWriteLogOfBackendUserIfLoggingIsEnabled ()
 
 logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled ()
 
 logAddsEntryToLocalErrorLogArray ()
 
 logFormatsDetailMessageWithAdditionalDataInLocalErrorArray ()
 
 logFormatsDetailMessageWithPlaceholders ()
 
 equalSubmittedAndStoredValuesAreDetermined (bool $expected, string|int|null $submittedValue, string|int|null $storedValue, string $storedType, bool $allowNull)
 
 deletePagesOnRootLevelIsDenied ()
 
 deleteRecord_procBasedOnFieldTypeRespectsEnableCascadingDelete ()
 
 checkValue_checkReturnsExpectedValues (string|int $value, string|int $expectedValue)
 
 checkValueForInputConvertsNullToEmptyString ()
 
 checkValueForJson (string|array $input, array $expected)
 
 checkValueForUuidReturnsValidUuidUnmodified ()
 
 checkValueForUuidCreatesValidUuidValueForReqiredFieldsWithInvalidUuidGiven ()
 
 checkValueForUuidDiscardsInvalidUuidIfFieldIsNotRequired ()
 
 checkValueForUuidCreatesValidUuidValueWithDefinedVersion ()
 
 referenceValuesAreCasted (string $value, array $configuration, bool $isNew, int|string $expected)
 
 clearPrefixFromValueRemovesPrefix (string $input, string $expected)
 
 applyFiltersToValuesFiltersValues (array $tcaFieldConfiguration, array $values, array $expected)
 
 applyFiltersToValuesExpectsArray ()
 
 validateValueForRequiredReturnsExpectedValue (array $tcaFieldConfig, $input, bool $expectation)
 

Static Public Member Functions

static checkValueForDatetimeDataProvider ()
 
static checkValueForColorDataProvider ()
 
static numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectlyDataProvider ()
 
static numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectlyDataProvider ()
 
static inputValuesRangeDoubleDataProvider ()
 
static datetimeValuesDataProvider ()
 
static inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider ()
 
static datetimeValueCheckDbtypeIsIndependentFromTimezoneDataProvider ()
 
static inputValueCheckNativeDbTypeDataProvider ()
 
static checkValue_flex_procInData_travDSDataProvider ()
 
static equalSubmittedAndStoredValuesAreDeterminedDataProvider ()
 
static checkValue_checkReturnsExpectedValuesDataProvider ()
 
static checkValueForJsonDataProvider ()
 
static referenceValuesAreCastedDataProvider ()
 
static clearPrefixFromValueRemovesPrefixDataProvider ()
 
static applyFiltersToValuesFiltersValuesDataProvider ()
 
static validateValueForRequiredReturnsExpectedValueDataHandler ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
DataHandler &MockObject &AccessibleObjectInterface $subject
 
BackendUserAuthentication &MockObject $backendUserMock
 

Detailed Description

Definition at line 44 of file DataHandlerTest.php.

Member Function Documentation

◆ adminIsAllowedToModifyAdminTable()

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

Definition at line 94 of file DataHandlerTest.php.

◆ adminIsAllowedToModifyNonAdminTable()

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

Definition at line 72 of file DataHandlerTest.php.

◆ applyFiltersToValuesExpectsArray()

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

Definition at line 1275 of file DataHandlerTest.php.

◆ applyFiltersToValuesFiltersValues()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::applyFiltersToValuesFiltersValues ( array  $tcaFieldConfiguration,
array  $values,
array  $expected 
)

Definition at line 1269 of file DataHandlerTest.php.

◆ applyFiltersToValuesFiltersValuesDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::applyFiltersToValuesFiltersValuesDataProvider ( )
static

Definition at line 1231 of file DataHandlerTest.php.

◆ checkValue_checkReturnsExpectedValues()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_checkReturnsExpectedValues ( string|int  $value,
string|int  $expectedValue 
)

Definition at line 1073 of file DataHandlerTest.php.

◆ checkValue_checkReturnsExpectedValuesDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_checkReturnsExpectedValuesDataProvider ( )
static

Definition at line 1041 of file DataHandlerTest.php.

◆ checkValue_flex_procInData_travDS()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_flex_procInData_travDS ( array  $dataValues,
array  $DSelements,
array  $expected 
)

This test ensures, that the eval method checkValue_SW is called on flexform structures.

Definition at line 736 of file DataHandlerTest.php.

References $GLOBALS.

◆ checkValue_flex_procInData_travDSDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValue_flex_procInData_travDSDataProvider ( )
static

Definition at line 652 of file DataHandlerTest.php.

◆ checkValueForColor()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForColor ( string  $input,
mixed  $expected,
array  $additionalFieldConfig = [] 
)

Definition at line 169 of file DataHandlerTest.php.

References $output.

◆ checkValueForColorDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForColorDataProvider ( )
static

Definition at line 151 of file DataHandlerTest.php.

◆ checkValueForDatetime()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForDatetime (   $input,
  $serverTimezone,
  $expectedOutput 
)

Definition at line 138 of file DataHandlerTest.php.

References $output.

◆ checkValueForDatetimeDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForDatetimeDataProvider ( )
static

Definition at line 123 of file DataHandlerTest.php.

◆ checkValueForInputConvertsNullToEmptyString()

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

Definition at line 1090 of file DataHandlerTest.php.

◆ checkValueForJson()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForJson ( string|array  $input,
array  $expected 
)

Definition at line 1118 of file DataHandlerTest.php.

◆ checkValueForJsonDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::checkValueForJsonDataProvider ( )
static

Definition at line 1096 of file DataHandlerTest.php.

◆ checkValueForUuidCreatesValidUuidValueForReqiredFieldsWithInvalidUuidGiven()

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

Definition at line 1140 of file DataHandlerTest.php.

◆ checkValueForUuidCreatesValidUuidValueWithDefinedVersion()

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

Definition at line 1154 of file DataHandlerTest.php.

◆ checkValueForUuidDiscardsInvalidUuidIfFieldIsNotRequired()

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

Definition at line 1147 of file DataHandlerTest.php.

◆ checkValueForUuidReturnsValidUuidUnmodified()

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

Definition at line 1131 of file DataHandlerTest.php.

◆ checkValuePasswordWithSaltedPasswordKeepsExistingHash()

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

Definition at line 181 of file DataHandlerTest.php.

◆ checkValuePasswordWithSaltedPasswordReturnsHashForSaltedPassword()

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

Definition at line 190 of file DataHandlerTest.php.

◆ clearPrefixFromValueRemovesPrefix()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::clearPrefixFromValueRemovesPrefix ( string  $input,
string  $expected 
)

Definition at line 1222 of file DataHandlerTest.php.

References $GLOBALS.

◆ clearPrefixFromValueRemovesPrefixDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::clearPrefixFromValueRemovesPrefixDataProvider ( )
static

Definition at line 1205 of file DataHandlerTest.php.

◆ datetimeValueCheckDbtypeIsIndependentFromTimezone()

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

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

Definition at line 490 of file DataHandlerTest.php.

◆ datetimeValueCheckDbtypeIsIndependentFromTimezoneDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::datetimeValueCheckDbtypeIsIndependentFromTimezoneDataProvider ( )
static

Definition at line 447 of file DataHandlerTest.php.

◆ datetimeValuesDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::datetimeValuesDataProvider ( )
static

Definition at line 364 of file DataHandlerTest.php.

◆ deletePagesOnRootLevelIsDenied()

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

Definition at line 1001 of file DataHandlerTest.php.

◆ deleteRecord_procBasedOnFieldTypeRespectsEnableCascadingDelete()

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

◆ doesCheckModifyAccessListHookGetsCalled()

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

Tests whether the 'checkModifyAccessList' hook is called correctly.

Definition at line 614 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.

Definition at line 631 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.

Definition at line 601 of file DataHandlerTest.php.

References $GLOBALS.

◆ equalSubmittedAndStoredValuesAreDetermined()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::equalSubmittedAndStoredValuesAreDetermined ( bool  $expected,
string|int|null  $submittedValue,
string|int|null  $storedValue,
string  $storedType,
bool  $allowNull 
)

◆ equalSubmittedAndStoredValuesAreDeterminedDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::equalSubmittedAndStoredValuesAreDeterminedDataProvider ( )
static

Definition at line 822 of file DataHandlerTest.php.

◆ fixtureCanBeCreated()

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

Definition at line 63 of file DataHandlerTest.php.

◆ inputValueCheckNativeDbType()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckNativeDbType ( string|null  $value,
string  $dbType,
string  $format,
bool  $nullable,
  $expectedOutput 
)
Parameters
string | null$value
string$dbType
string$format
bool$nullable
mixed | null$expectedOutput

Definition at line 579 of file DataHandlerTest.php.

◆ inputValueCheckNativeDbTypeDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckNativeDbTypeDataProvider ( )
static

Definition at line 508 of file DataHandlerTest.php.

◆ inputValueCheckRespectsRightLowerAndUpperLimitForDouble()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRespectsRightLowerAndUpperLimitForDouble ( string  $value,
string|int  $expectedReturnValue 
)

Definition at line 333 of file DataHandlerTest.php.

◆ inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::inputValueCheckRespectsRightLowerAndUpperLimitWithDefaultValueForDouble ( string  $value,
string|int  $expectedReturnValue 
)

Definition at line 349 of file DataHandlerTest.php.

◆ inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmpty()

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

Definition at line 431 of file DataHandlerTest.php.

◆ inputValueRangeCheckIsIgnoredWhenDefaultIsZeroAndInputValueIsEmptyDataProvider()

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

Definition at line 411 of file DataHandlerTest.php.

◆ inputValuesRangeDoubleDataProvider()

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

Data provider for inputValuesRangeDoubleDataProvider

Definition at line 301 of file DataHandlerTest.php.

◆ logAddsEntryToLocalErrorLogArray()

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

◆ logCallsWriteLogOfBackendUserIfLoggingIsEnabled()

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

◆ logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled()

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

◆ logFormatsDetailMessageWithAdditionalDataInLocalErrorArray()

◆ logFormatsDetailMessageWithPlaceholders()

◆ nonAdminIsNorAllowedToModifyNonAdminTable()

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

Definition at line 79 of file DataHandlerTest.php.

◆ nonAdminIsNotAllowedToModifyAdminTable()

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

Definition at line 101 of file DataHandlerTest.php.

◆ nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable()

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

Definition at line 86 of file DataHandlerTest.php.

◆ nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable()

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

◆ numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectly()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectly ( string  $input,
string  $expected 
)

Definition at line 288 of file DataHandlerTest.php.

◆ numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectlyDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::numberValueCheckRecognizesDecimalStringValuesAsFloatValuesCorrectlyDataProvider ( )
static

Definition at line 248 of file DataHandlerTest.php.

◆ numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectly()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectly ( string  $value,
int  $expectedReturnValue 
)

Definition at line 235 of file DataHandlerTest.php.

◆ numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectlyDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::numberValueCheckRecognizesStringValuesAsIntegerValuesCorrectlyDataProvider ( )
static

Definition at line 203 of file DataHandlerTest.php.

◆ processDatamapForFrozenNonZeroWorkspaceReturnsFalse()

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

◆ referenceValuesAreCasted()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::referenceValuesAreCasted ( string  $value,
array  $configuration,
bool  $isNew,
int|string  $expected 
)

Definition at line 1167 of file DataHandlerTest.php.

◆ referenceValuesAreCastedDataProvider()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::referenceValuesAreCastedDataProvider ( )
static

Definition at line 1175 of file DataHandlerTest.php.

◆ setUp()

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

Definition at line 50 of file DataHandlerTest.php.

References $GLOBALS.

◆ validateValueForRequiredReturnsExpectedValue()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::validateValueForRequiredReturnsExpectedValue ( array  $tcaFieldConfig,
  $input,
bool  $expectation 
)

Definition at line 1336 of file DataHandlerTest.php.

◆ validateValueForRequiredReturnsExpectedValueDataHandler()

static TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::validateValueForRequiredReturnsExpectedValueDataHandler ( )
static

Definition at line 1295 of file DataHandlerTest.php.

◆ valueCheckRecognizesDatetimeValuesAsIntegerValuesCorrectly()

TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::valueCheckRecognizesDatetimeValuesAsIntegerValuesCorrectly ( string  $value,
int  $expected 
)

Definition at line 388 of file DataHandlerTest.php.

Member Data Documentation

◆ $backendUserMock

BackendUserAuthentication& MockObject TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest::$backendUserMock
protected

◆ $resetSingletonInstances

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

Definition at line 46 of file DataHandlerTest.php.

◆ $subject