‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest:

Public Member Functions

 calcAgeDataProvider ()
 
 calcAgeReturnsExpectedValues (int $seconds, string $expectedLabel)
 
 getProcessedValueForZeroStringIsZero ()
 
 getProcessedValueForGroup ()
 
 getProcessedValueForFlexNull ()
 
 getProcessedValueForDatetimeDbTypeDateNull ()
 
 getProcessedValueForDatetimeDbTypeDatetimeNull ()
 
 getProcessedValueForFlex ()
 
 getProcessedValueForGroupWithOneAllowedTable ()
 
 getProcessedValueForGroupWithMultipleAllowedTables ()
 
 getProcessedValueForSelectWithMMRelation ()
 
 getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent ()
 
 inputTypeDateDisplayOptions ()
 
 getProcessedValueHandlesAgeDisplayCorrectly ($input, string $expected)
 
 getProcessedValueForCheckWithSingleItem ()
 
 getProcessedValueForCheckWithSingleItemInvertStateDisplay ()
 
 getCommonSelectFieldsReturnsCorrectFieldsDataProvider ()
 
 getCommonSelectFieldsReturnsCorrectFields (string $table, string $prefix, array $presetFields, array $tca, string $expectedFields='')
 
 getLabelFromItemlistReturnsCorrectFieldsDataProvider ()
 
 getLabelFromItemlistReturnsCorrectFields (string $table, string $col, string $key, array $tca, ?string $expectedLabel='')
 
 getLabelFromItemListMergedReturnsCorrectFieldsDataProvider ()
 
 getLabelFromItemListMergedReturnsCorrectFields (string $pageId, string $table, string $column, string $key, array $tca, string $expectedLabel='')
 
 getFuncCheckReturnsInputTagWithValueAttribute ()
 
 getLabelsFromItemsListDataProvider ()
 
 getLabelsFromItemsListReturnsCorrectValue (string $table, string $col, string $keyList, array $tca, array $pageTsConfig, string $expectedLabel)
 
 getProcessedValueReturnsLabelsForExistingValuesSolely ()
 
 getProcessedValueReturnsPlainValueIfItemIsNotFound ()
 
 dateTimeAgeReturnsCorrectValues ()
 
 purgeComputedPropertyNamesRemovesPropertiesStartingWithUnderscore ()
 
 purgeComputedPropertiesFromRecordRemovesPropertiesStartingWithUnderscore ()
 
 splitTableUidDataProvider ()
 
 splitTableUid ($input, $expected)
 
 getPagesTSconfigWorksWithoutInitializedBackendUser ()
 
 returnNullForMissingTcaConfigInResolveFileReferences ()
 
 returnNullForUnfitTableConfigInResolveFileReferences (array $config)
 
 unfitResolveFileReferencesTableConfig ()
 
 workspaceOLDoesNotChangeValuesForNoBeUserAvailable ()
 
 resolveFileReferencesReturnsEmptyResultForNoReferencesAvailable ()
 
 wsMapIdReturnsLiveIdIfNoBeUserIsAvailable ()
 
 getAllowedFieldsForTableReturnsEmptyArrayOnBrokenTca ()
 
 getAllowedFieldsForTableReturnsUniqueList ()
 

Protected Attributes

bool $resetSingletonInstances = true
 

Detailed Description

Definition at line 39 of file BackendUtilityTest.php.

Member Function Documentation

◆ calcAgeDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::calcAgeDataProvider ( )

Data provider for calcAge function

Definition at line 52 of file BackendUtilityTest.php.

◆ calcAgeReturnsExpectedValues()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::calcAgeReturnsExpectedValues ( int  $seconds,
string  $expectedLabel 
)
Test:
‪@dataProvider calcAgeDataProvider

Definition at line 130 of file BackendUtilityTest.php.

◆ dateTimeAgeReturnsCorrectValues()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::dateTimeAgeReturnsCorrectValues ( )
Test:

Definition at line 1044 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getAllowedFieldsForTableReturnsEmptyArrayOnBrokenTca()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getAllowedFieldsForTableReturnsEmptyArrayOnBrokenTca ( )
Test:

Definition at line 1282 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getAllowedFieldsForTableReturnsUniqueList()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getAllowedFieldsForTableReturnsUniqueList ( )
Test:

Definition at line 1291 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getCommonSelectFieldsReturnsCorrectFields()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getCommonSelectFieldsReturnsCorrectFields ( string  $table,
string  $prefix,
array  $presetFields,
array  $tca,
string  $expectedFields = '' 
)
Test:
‪@dataProvider getCommonSelectFieldsReturnsCorrectFieldsDataProvider

Definition at line 753 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ getCommonSelectFieldsReturnsCorrectFieldsDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getCommonSelectFieldsReturnsCorrectFieldsDataProvider ( )

Definition at line 654 of file BackendUtilityTest.php.

◆ getFuncCheckReturnsInputTagWithValueAttribute()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getFuncCheckReturnsInputTagWithValueAttribute ( )
Test:

Definition at line 911 of file BackendUtilityTest.php.

◆ getLabelFromItemListMergedReturnsCorrectFields()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelFromItemListMergedReturnsCorrectFields ( string  $pageId,
string  $table,
string  $column,
string  $key,
array  $tca,
string  $expectedLabel = '' 
)
Test:
‪@dataProvider getLabelFromItemListMergedReturnsCorrectFieldsDataProvider

Definition at line 895 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ getLabelFromItemListMergedReturnsCorrectFieldsDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelFromItemListMergedReturnsCorrectFieldsDataProvider ( )

Definition at line 845 of file BackendUtilityTest.php.

◆ getLabelFromItemlistReturnsCorrectFields()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelFromItemlistReturnsCorrectFields ( string  $table,
string  $col,
string  $key,
array  $tca,
?string  $expectedLabel = '' 
)
Test:
‪@dataProvider getLabelFromItemlistReturnsCorrectFieldsDataProvider

Definition at line 833 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ getLabelFromItemlistReturnsCorrectFieldsDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelFromItemlistReturnsCorrectFieldsDataProvider ( )

Definition at line 765 of file BackendUtilityTest.php.

◆ getLabelsFromItemsListDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelsFromItemsListDataProvider ( )

Definition at line 916 of file BackendUtilityTest.php.

◆ getLabelsFromItemsListReturnsCorrectValue()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getLabelsFromItemsListReturnsCorrectValue ( string  $table,
string  $col,
string  $keyList,
array  $tca,
array  $pageTsConfig,
string  $expectedLabel 
)
Test:
‪@dataProvider getLabelsFromItemsListDataProvider

Definition at line 967 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ getPagesTSconfigWorksWithoutInitializedBackendUser()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getPagesTSconfigWorksWithoutInitializedBackendUser ( )

Tests if the method getPagesTSconfig can be called without having a GLOBAL['BE_USER'] object. However, this test also shows all the various other dependencies this method has.

Test:

Definition at line 1125 of file BackendUtilityTest.php.

◆ getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent ( )
Test:

Definition at line 521 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForCheckWithSingleItem()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForCheckWithSingleItem ( )
Test:

Definition at line 600 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForCheckWithSingleItemInvertStateDisplay()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForCheckWithSingleItemInvertStateDisplay ( )
Test:

Definition at line 628 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForDatetimeDbTypeDateNull()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForDatetimeDbTypeDateNull ( )
Test:

Definition at line 206 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForDatetimeDbTypeDatetimeNull()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForDatetimeDbTypeDatetimeNull ( )
Test:

Definition at line 230 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForFlex()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForFlex ( )
Test:

Definition at line 253 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForFlexNull()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForFlexNull ( )
Test:

Definition at line 184 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForGroup()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForGroup ( )
Test:

Definition at line 162 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForGroupWithMultipleAllowedTables()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForGroupWithMultipleAllowedTables ( )
Test:

Definition at line 362 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForGroupWithOneAllowedTable()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForGroupWithOneAllowedTable ( )
Test:

Definition at line 298 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForSelectWithMMRelation()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForSelectWithMMRelation ( )
Test:

Definition at line 432 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueForZeroStringIsZero()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueForZeroStringIsZero ( )
Test:
See also
https://forge.typo3.org/issues/20994

Definition at line 142 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueHandlesAgeDisplayCorrectly()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueHandlesAgeDisplayCorrectly (   $input,
string  $expected 
)
Test:
‪@dataProvider inputTypeDateDisplayOptions
Parameters
bool | int$input
string$expected

Definition at line 573 of file BackendUtilityTest.php.

References $GLOBALS.

◆ getProcessedValueReturnsLabelsForExistingValuesSolely()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueReturnsLabelsForExistingValuesSolely ( )
Test:

Definition at line 987 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ getProcessedValueReturnsPlainValueIfItemIsNotFound()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::getProcessedValueReturnsPlainValueIfItemIsNotFound ( )
Test:

Definition at line 1016 of file BackendUtilityTest.php.

References $GLOBALS, and $tca.

◆ inputTypeDateDisplayOptions()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::inputTypeDateDisplayOptions ( )

Definition at line 544 of file BackendUtilityTest.php.

◆ purgeComputedPropertiesFromRecordRemovesPropertiesStartingWithUnderscore()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::purgeComputedPropertiesFromRecordRemovesPropertiesStartingWithUnderscore ( )
Test:

Definition at line 1072 of file BackendUtilityTest.php.

◆ purgeComputedPropertyNamesRemovesPropertiesStartingWithUnderscore()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::purgeComputedPropertyNamesRemovesPropertiesStartingWithUnderscore ( )
Test:

Definition at line 1058 of file BackendUtilityTest.php.

◆ resolveFileReferencesReturnsEmptyResultForNoReferencesAvailable()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::resolveFileReferencesReturnsEmptyResultForNoReferencesAvailable ( )
Test:

Definition at line 1239 of file BackendUtilityTest.php.

References $GLOBALS.

◆ returnNullForMissingTcaConfigInResolveFileReferences()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::returnNullForMissingTcaConfigInResolveFileReferences ( )
Test:

Definition at line 1164 of file BackendUtilityTest.php.

References $GLOBALS.

◆ returnNullForUnfitTableConfigInResolveFileReferences()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::returnNullForUnfitTableConfigInResolveFileReferences ( array  $config)
Test:
‪@dataProvider unfitResolveFileReferencesTableConfig

Definition at line 1176 of file BackendUtilityTest.php.

References $GLOBALS.

◆ splitTableUid()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::splitTableUid (   $input,
  $expected 
)
Test:
‪@dataProvider splitTableUidDataProvider

Definition at line 1113 of file BackendUtilityTest.php.

◆ splitTableUidDataProvider()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::splitTableUidDataProvider ( )

Definition at line 1087 of file BackendUtilityTest.php.

◆ unfitResolveFileReferencesTableConfig()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::unfitResolveFileReferencesTableConfig ( )

Definition at line 1184 of file BackendUtilityTest.php.

◆ workspaceOLDoesNotChangeValuesForNoBeUserAvailable()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::workspaceOLDoesNotChangeValuesForNoBeUserAvailable ( )
Test:

Definition at line 1223 of file BackendUtilityTest.php.

References $GLOBALS.

◆ wsMapIdReturnsLiveIdIfNoBeUserIsAvailable()

TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::wsMapIdReturnsLiveIdIfNoBeUserIsAvailable ( )
Test:

Definition at line 1271 of file BackendUtilityTest.php.

References $GLOBALS.

Member Data Documentation

◆ $resetSingletonInstances

bool TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest::$resetSingletonInstances = true
protected

Definition at line 44 of file BackendUtilityTest.php.