TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DataHandlerTest Class Reference
Inheritance diagram for DataHandlerTest:
UnitTestCase BaseTestCase

Public Member Functions

 fixtureCanBeCreated ()
 
 adminIsAllowedToModifyNonAdminTable ()
 
 nonAdminIsNorAllowedToModifyNonAdminTable ()
 
 nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable ()
 
 adminIsAllowedToModifyAdminTable ()
 
 nonAdminIsNotAllowedToModifyAdminTable ()
 
 nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable ()
 
 evalCheckValueDouble2 ()
 
 dataProviderDatetime ()
 
 evalCheckValueDatetime ($input, $serverTimezone, $expectedOutput)
 
 inputValuesStringsDataProvider ()
 
 inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly ($value, $expectedReturnValue)
 
 inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider ()
 
 inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFields ($tcaFieldConf)
 
 doesCheckModifyAccessListThrowExceptionOnWrongHookInterface ()
 
 doesCheckModifyAccessListHookGetsCalled ()
 
 doesCheckModifyAccessListHookModifyAccessAllowed ()
 
 doesCheckFlexFormValueHookGetsCalled ()
 
 logCallsWriteLogOfBackendUserIfLoggingIsEnabled ()
 
 logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled ()
 
 logAddsEntryToLocalErrorLogArray ()
 
 logFormatsDetailMessageWithAdditionalDataInLocalErrorArray ()
 
 equalSubmittedAndStoredValuesAreDetermined ($expected, $submittedValue, $storedValue, $storedType, $allowNull)
 
 equalSubmittedAndStoredValuesAreDeterminedDataProvider ()
 
 getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider ()
 
 checkValue_checkReturnsExpectedValuesDataProvider ()
 
 checkValue_checkReturnsExpectedValues ($value, $expectedValue)
 
 checkValueForInputConvertsNullToEmptyString ()
 
 referenceValuesAreCasted ($value, array $configuration, $expected)
 
 referenceValuesAreCastedDataProvider ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from BaseTestCase
 getAccessibleMock ($originalClassName, $methods=[], array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name,...$arguments)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix= '')
 

Protected Attributes

 $singletonInstances = []
 
 $subject
 
 $backEndUser
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 30 of file DataHandlerTest.php.

Member Function Documentation

adminIsAllowedToModifyAdminTable ( )
Test:

Definition at line 113 of file DataHandlerTest.php.

adminIsAllowedToModifyNonAdminTable ( )
Test:

Definition at line 85 of file DataHandlerTest.php.

checkValue_checkReturnsExpectedValues (   $value,
  $expectedValue 
)
Parameters
string$value
string$expectedValuecheckValue_checkReturnsExpectedValuesDataProvider
Test:

Definition at line 835 of file DataHandlerTest.php.

checkValue_checkReturnsExpectedValuesDataProvider ( )
Returns
array

Definition at line 798 of file DataHandlerTest.php.

checkValueForInputConvertsNullToEmptyString ( )
Test:

Definition at line 854 of file DataHandlerTest.php.

References $GLOBALS, and GeneralUtility\makeInstance().

dataProviderDatetime ( )

Definition at line 165 of file DataHandlerTest.php.

doesCheckFlexFormValueHookGetsCalled ( )
doesCheckModifyAccessListHookGetsCalled ( )

Tests whether the 'checkModifyAccessList' hook is called correctly.

Test:

Definition at line 298 of file DataHandlerTest.php.

References $GLOBALS, GeneralUtility\addInstance(), and BaseTestCase\getUniqueId().

doesCheckModifyAccessListHookModifyAccessAllowed ( )

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

Test:

Definition at line 316 of file DataHandlerTest.php.

References $GLOBALS.

doesCheckModifyAccessListThrowExceptionOnWrongHookInterface ( )

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

Test:

Definition at line 284 of file DataHandlerTest.php.

References $GLOBALS.

equalSubmittedAndStoredValuesAreDetermined (   $expected,
  $submittedValue,
  $storedValue,
  $storedType,
  $allowNull 
)
Parameters
bool$expected
string$submittedValue
string$storedValue
string$storedType
bool$allowNullequalSubmittedAndStoredValuesAreDeterminedDataProvider
Test:

Definition at line 498 of file DataHandlerTest.php.

References BaseTestCase\callInaccessibleMethod().

equalSubmittedAndStoredValuesAreDeterminedDataProvider ( )
Returns
array

Definition at line 511 of file DataHandlerTest.php.

evalCheckValueDatetime (   $input,
  $serverTimezone,
  $expectedOutput 
)
Test:
dataProviderDatetime

Definition at line 190 of file DataHandlerTest.php.

evalCheckValueDouble2 ( )
Test:

Definition at line 149 of file DataHandlerTest.php.

fixtureCanBeCreated ( )
Test:

Definition at line 74 of file DataHandlerTest.php.

getPlaceholderTitleForTableLabelReturnsLabelThatsMatchesLabelFieldConditionsDataProvider ( )
Returns
array

Definition at line 725 of file DataHandlerTest.php.

inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFields (   $tcaFieldConf)
Test:
Parameters
array$tcaFieldConfinputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider

Definition at line 271 of file DataHandlerTest.php.

inputValueCheckDoesNotCallGetDateTimeFormatsForNonDatetimeFieldsDataProvider ( )
Returns
array

Definition at line 249 of file DataHandlerTest.php.

inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly (   $value,
  $expectedReturnValue 
)
Test:
inputValuesStringsDataProvider
Parameters
string$value
int$expectedReturnValue

Definition at line 232 of file DataHandlerTest.php.

inputValuesStringsDataProvider ( )

Data provider for inputValueCheckRecognizesStringValuesAsIntegerValuesCorrectly

Returns
array

Definition at line 208 of file DataHandlerTest.php.

logAddsEntryToLocalErrorLogArray ( )
Test:

Definition at line 462 of file DataHandlerTest.php.

References BaseTestCase\getUniqueId().

logCallsWriteLogOfBackendUserIfLoggingIsEnabled ( )
Test:

Definition at line 438 of file DataHandlerTest.php.

logDoesNotCallWriteLogOfBackendUserIfLoggingIsDisabled ( )
Test:

Definition at line 450 of file DataHandlerTest.php.

logFormatsDetailMessageWithAdditionalDataInLocalErrorArray ( )
Test:

Definition at line 476 of file DataHandlerTest.php.

References BaseTestCase\getUniqueId().

nonAdminIsNorAllowedToModifyNonAdminTable ( )
Test:

Definition at line 94 of file DataHandlerTest.php.

nonAdminIsNotAllowedToModifyAdminTable ( )
Test:

Definition at line 122 of file DataHandlerTest.php.

nonAdminWithTableModifyAccessIsAllowedToModifyNonAdminTable ( )
Test:

Definition at line 103 of file DataHandlerTest.php.

nonAdminWithTableModifyAccessIsNotAllowedToModifyAdminTable ( )
Test:

Definition at line 131 of file DataHandlerTest.php.

References $GLOBALS, and BaseTestCase\getUniqueId().

referenceValuesAreCasted (   $value,
array  $configuration,
  $expected 
)
Parameters
mixed$value
array$configuration
int | string$expected
Test:
referenceValuesAreCastedDataProvider

Definition at line 871 of file DataHandlerTest.php.

referenceValuesAreCastedDataProvider ( )
Returns
array

Definition at line 882 of file DataHandlerTest.php.

setUp ( )
protected

Set up the tests

Definition at line 50 of file DataHandlerTest.php.

References $GLOBALS, BaseTestCase\getAccessibleMock(), and GeneralUtility\getSingletonInstances().

tearDown ( )
protected

Tear down the tests

Definition at line 62 of file DataHandlerTest.php.

References GeneralUtility\resetSingletonInstances().

Member Data Documentation

$backEndUser
protected

Definition at line 45 of file DataHandlerTest.php.

$singletonInstances = []
protected

Definition at line 35 of file DataHandlerTest.php.

$subject
protected

Definition at line 40 of file DataHandlerTest.php.