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

Public Member Functions

 containsMultipleTypesReturnsFalseOnEmptyArray ()
 
 containsMultipleTypesReturnsFalseOnArrayWithIntegers ()
 
 containsMultipleTypesReturnsFalseOnArrayWithObjects ()
 
 containsMultipleTypesReturnsTrueOnMixedArray ()
 
 getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenSimplePath ()
 
 getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPath ()
 
 getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPathIfPathIsString ()
 
 getValueByPathThrowsExceptionIfPathIsNoArrayOrString ()
 
 getValueByPathReturnsNullIfTheSegementsOfThePathDontExist ()
 
 getValueByPathReturnsNullIfThePathHasMoreSegmentsThanTheGivenArray ()
 
 convertObjectToArrayConvertsNestedObjectsToArray ()
 
 setValueByPathSetsValueRecursivelyIfPathIsArray ()
 
 setValueByPathSetsValueRecursivelyIfPathIsString ()
 
 setValueByPathRecursivelyMergesAnArray ()
 
 setValueByPathThrowsExceptionIfPathIsNoArrayOrString ()
 
 setValueByPathThrowsExceptionIfSubjectIsNoArray ()
 
 setValueByPathThrowsExceptionIfSubjectIsNoArrayAccess ()
 
 setValueByLeavesInputArrayUnchanged ()
 
 unsetValueByPathDoesNotModifyAnArrayIfThePathWasNotFound ()
 
 unsetValueByPathRemovesSpecifiedKey ()
 
 unsetValueByPathRemovesSpecifiedKeyIfPathIsString ()
 
 unsetValueByPathRemovesSpecifiedBranch ()
 
 unsetValueByPathThrowsExceptionIfPathIsNoArrayOrString ()
 
 removeEmptyElementsRecursivelyRemovesNullValues ()
 
 removeEmptyElementsRecursivelyRemovesEmptySubArrays ()
 
 arrayMergeRecursiveOverruleData ()
 
 arrayMergeRecursiveOverruleMergesSimpleArrays (array $inputArray1, array $inputArray2, $dontAddNewKeys, $emptyValuesOverride, array $expected)
 
 integerExplodeReturnsArrayOfIntegers ()
 
 integerExplodeReturnsZeroForStringValues ()
 
 sortArrayWithIntegerKeysDataProvider ()
 
 sortArrayWithIntegerKeysSortsNumericArrays (array $arrayToSort, array $expectedArray)
 

Additional Inherited Members

- 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 inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 20 of file extbase/Tests/Unit/Utility/ArrayUtilityTest.php.

Member Function Documentation

arrayMergeRecursiveOverruleData ( )
arrayMergeRecursiveOverruleMergesSimpleArrays ( array  $inputArray1,
array  $inputArray2,
  $dontAddNewKeys,
  $emptyValuesOverride,
array  $expected 
)
Test:
Parameters
array$inputArray1
array$inputArray2
bool$dontAddNewKeys
bool$emptyValuesOverride
array$expectedarrayMergeRecursiveOverruleData

Definition at line 406 of file extbase/Tests/Unit/Utility/ArrayUtilityTest.php.

containsMultipleTypesReturnsFalseOnArrayWithIntegers ( )
containsMultipleTypesReturnsFalseOnArrayWithObjects ( )
containsMultipleTypesReturnsFalseOnEmptyArray ( )
containsMultipleTypesReturnsTrueOnMixedArray ( )
convertObjectToArrayConvertsNestedObjectsToArray ( )
getValueByPathReturnsNullIfThePathHasMoreSegmentsThanTheGivenArray ( )
getValueByPathReturnsNullIfTheSegementsOfThePathDontExist ( )
getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPath ( )
getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPathIfPathIsString ( )
getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenSimplePath ( )
getValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )
integerExplodeReturnsArrayOfIntegers ( )
integerExplodeReturnsZeroForStringValues ( )
removeEmptyElementsRecursivelyRemovesEmptySubArrays ( )
removeEmptyElementsRecursivelyRemovesNullValues ( )
setValueByLeavesInputArrayUnchanged ( )
setValueByPathRecursivelyMergesAnArray ( )
setValueByPathSetsValueRecursivelyIfPathIsArray ( )
setValueByPathSetsValueRecursivelyIfPathIsString ( )
setValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )
setValueByPathThrowsExceptionIfSubjectIsNoArray ( )
setValueByPathThrowsExceptionIfSubjectIsNoArrayAccess ( )
sortArrayWithIntegerKeysDataProvider ( )

dataProvider for sortArrayWithIntegerKeys

Returns
array

Definition at line 436 of file extbase/Tests/Unit/Utility/ArrayUtilityTest.php.

sortArrayWithIntegerKeysSortsNumericArrays ( array  $arrayToSort,
array  $expectedArray 
)
Test:
Parameters
array$arrayToSort
array$expectedArraysortArrayWithIntegerKeysDataProvider

Definition at line 486 of file extbase/Tests/Unit/Utility/ArrayUtilityTest.php.

References ArrayUtility\sortArrayWithIntegerKeys().

unsetValueByPathDoesNotModifyAnArrayIfThePathWasNotFound ( )
unsetValueByPathRemovesSpecifiedBranch ( )
unsetValueByPathRemovesSpecifiedKey ( )
unsetValueByPathRemovesSpecifiedKeyIfPathIsString ( )
unsetValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )