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

Public Member Functions

 calcAgeDataProvider ()
 
 calcAgeReturnsExpectedValues ($seconds, $expectedLabel)
 
 getProcessedValueForZeroStringIsZero ()
 
 getProcessedValueForGroup ()
 
 getProcessedValueForGroupWithOneAllowedTable ()
 
 getProcessedValueForGroupWithMultipleAllowedTables ()
 
 inputTypeDateDisplayOptions ()
 
 getCommonSelectFieldsReturnsCorrectFieldsDataProvider ()
 
 getCommonSelectFieldsReturnsCorrectFields ($table, $prefix= '', array $presetFields, array $tca, $expectedFields= '')
 
 getLabelFromItemlistReturnsCorrectFieldsDataProvider ()
 
 getLabelFromItemlistReturnsCorrectFields ($table, $col= '', $key= '', array $tca, $expectedLabel= '')
 
 getLabelFromItemListMergedReturnsCorrectFieldsDataProvider ()
 
 getLabelFromItemListMergedReturnsCorrectFields ($pageId, $table, $column= '', $key= '', array $tca, $expectedLabel= '')
 
 getFuncCheckReturnsInputTagWithValueAttribute ()
 
 getLabelsFromItemsListDataProvider ()
 
 getLabelsFromItemsListReturnsCorrectValue ($table, $col, $keyList, $tca, array $pageTsConfig, $expectedLabel)
 
 getProcessedValueReturnsLabelsForExistingValuesSolely ()
 
 getProcessedValueReturnsPlainValueIfItemIsNotFound ()
 
 viewOnClickReturnsOnClickCodeWithAlternativeUrl ()
 
 getModTSconfigIgnoresValuesFromUserTsConfigIfNoSet ()
 
 replaceL10nModeFieldsReplacesFieldsDataProvider ()
 
 getSpecConfPartsSplitsDefaultExtras ()
 
 getTCAtypesReturnsCorrectValuesDataProvider ()
 
 getTCAtypesReturnsCorrectValues ($table, $rec, $useFieldNameAsKey, $expected)
 

Protected Member Functions

 mockDatabaseConnection ($tableName= 'sys_category')
 
- 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= '')
 

Additional Inherited Members

- 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 39 of file BackendUtilityTest.php.

Member Function Documentation

calcAgeDataProvider ( )

Data provider for calcAge function

Returns
array

Definition at line 49 of file BackendUtilityTest.php.

calcAgeReturnsExpectedValues (   $seconds,
  $expectedLabel 
)
Test:
calcAgeDataProvider
Parameters
int$seconds
string$expectedLabel

Definition at line 130 of file BackendUtilityTest.php.

References BackendUtility\calcAge().

getCommonSelectFieldsReturnsCorrectFields (   $table,
  $prefix = '',
array  $presetFields,
array  $tca,
  $expectedFields = '' 
)
Test:
getCommonSelectFieldsReturnsCorrectFieldsDataProvider
Parameters
string$table
string$prefix
array$presetFields
array$tca
string$expectedFields

Definition at line 548 of file BackendUtilityTest.php.

References $tca, and BackendUtility\getCommonSelectFields().

getCommonSelectFieldsReturnsCorrectFieldsDataProvider ( )

Tests concerning getCommonSelectFields Data provider for getCommonSelectFieldsReturnsCorrectFields

Returns
array The test data with $table, $prefix, $presetFields, $tca, $expectedFields

Definition at line 443 of file BackendUtilityTest.php.

getFuncCheckReturnsInputTagWithValueAttribute ( )

Tests concerning getFuncCheck

Test:

Definition at line 725 of file BackendUtilityTest.php.

References BackendUtility\getFuncCheck().

getLabelFromItemListMergedReturnsCorrectFields (   $pageId,
  $table,
  $column = '',
  $key = '',
array  $tca,
  $expectedLabel = '' 
)
Test:
getLabelFromItemListMergedReturnsCorrectFieldsDataProvider
Parameters
int$pageId
string$table
string$column
string$key
array$tca
string$expectedLabel

Definition at line 711 of file BackendUtilityTest.php.

References $tca, and BackendUtility\getLabelFromItemListMerged().

getLabelFromItemListMergedReturnsCorrectFieldsDataProvider ( )

Tests concerning getLabelFromItemListMerged Data provider for getLabelFromItemListMerged

Returns
array The test data with $pageId, $table, $column, $key, $expectedLabel

Definition at line 654 of file BackendUtilityTest.php.

getLabelFromItemlistReturnsCorrectFields (   $table,
  $col = '',
  $key = '',
array  $tca,
  $expectedLabel = '' 
)
Test:
getLabelFromItemlistReturnsCorrectFieldsDataProvider
Parameters
string$table
string$col
string$key
array$tca
string$expectedLabel

Definition at line 638 of file BackendUtilityTest.php.

References $tca, and BackendUtility\getLabelFromItemlist().

getLabelFromItemlistReturnsCorrectFieldsDataProvider ( )

Tests concerning getLabelFromItemlist Data provider for getLabelFromItemlistReturnsCorrectFields

Returns
array The test data with $table, $col, $key, $expectedLabel

Definition at line 564 of file BackendUtilityTest.php.

getLabelsFromItemsListDataProvider ( )
Returns
array

Definition at line 737 of file BackendUtilityTest.php.

getLabelsFromItemsListReturnsCorrectValue (   $table,
  $col,
  $keyList,
  $tca,
array  $pageTsConfig,
  $expectedLabel 
)
Test:
getLabelsFromItemsListDataProvider
Parameters
string$table
string$col
string$keyList
array$tca
array$pageTsConfig
string$expectedLabel

Definition at line 795 of file BackendUtilityTest.php.

References $tca, and BackendUtility\getLabelsFromItemsList().

getModTSconfigIgnoresValuesFromUserTsConfigIfNoSet ( )
Test:

Definition at line 887 of file BackendUtilityTest.php.

References BackendUtility\getModTSconfig().

getProcessedValueForGroup ( )
Test:

Definition at line 161 of file BackendUtilityTest.php.

References $GLOBALS.

getProcessedValueForGroupWithMultipleAllowedTables ( )
Test:

Definition at line 206 of file BackendUtilityTest.php.

References $GLOBALS.

getProcessedValueForGroupWithOneAllowedTable ( )
Test:

Definition at line 180 of file BackendUtilityTest.php.

References $GLOBALS.

getProcessedValueForZeroStringIsZero ( )
Test:
See also
http://forge.typo3.org/issues/20994

Definition at line 142 of file BackendUtilityTest.php.

References $GLOBALS.

getProcessedValueReturnsLabelsForExistingValuesSolely ( )
Test:

Definition at line 809 of file BackendUtilityTest.php.

References $tca.

getProcessedValueReturnsPlainValueIfItemIsNotFound ( )
Test:

Definition at line 838 of file BackendUtilityTest.php.

References $tca.

getSpecConfPartsSplitsDefaultExtras ( )
Test:

Definition at line 1028 of file BackendUtilityTest.php.

References BackendUtility\getSpecConfParts().

getTCAtypesReturnsCorrectValues (   $table,
  $rec,
  $useFieldNameAsKey,
  $expected 
)
Test:
getTCAtypesReturnsCorrectValuesDataProvider
Parameters
string$table
array$rec
bool$useFieldNameAsKey
array$expected

Definition at line 1259 of file BackendUtilityTest.php.

References BackendUtility\getTCAtypes().

getTCAtypesReturnsCorrectValuesDataProvider ( )
Test:

Definition at line 1074 of file BackendUtilityTest.php.

inputTypeDateDisplayOptions ( )
Returns
array

Definition at line 379 of file BackendUtilityTest.php.

mockDatabaseConnection (   $tableName = 'sys_category')
protected

Prepare a mock database setup for a Doctrine connection and return an array of all prophets to set expectations upon.

Parameters
string$tableName
Returns
array

Definition at line 233 of file BackendUtilityTest.php.

References GeneralUtility\makeInstance().

replaceL10nModeFieldsReplacesFieldsDataProvider ( )

Data provider for replaceL10nModeFieldsReplacesFields

Returns
array

Definition at line 914 of file BackendUtilityTest.php.

viewOnClickReturnsOnClickCodeWithAlternativeUrl ( )

Tests concerning viewOnClick

Test:

Definition at line 870 of file BackendUtilityTest.php.

References GeneralUtility\quoteJSvalue(), and BackendUtility\viewOnClick().