TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\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 TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\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)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 20 of file ArrayUtilityTest.php.

Member Function Documentation

◆ arrayMergeRecursiveOverruleData()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::arrayMergeRecursiveOverruleData ( )

Definition at line 294 of file ArrayUtilityTest.php.

◆ arrayMergeRecursiveOverruleMergesSimpleArrays()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::arrayMergeRecursiveOverruleMergesSimpleArrays ( array  $inputArray1,
array  $inputArray2,
  $dontAddNewKeys,
  $emptyValuesOverride,
array  $expected 
)
Test:
Parameters
array$inputArray1
array$inputArray2
bool$dontAddNewKeys
bool$emptyValuesOverride
array$expectedarrayMergeRecursiveOverruleData

Definition at line 401 of file ArrayUtilityTest.php.

◆ containsMultipleTypesReturnsFalseOnArrayWithIntegers()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::containsMultipleTypesReturnsFalseOnArrayWithIntegers ( )
Test:

Definition at line 33 of file ArrayUtilityTest.php.

◆ containsMultipleTypesReturnsFalseOnArrayWithObjects()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::containsMultipleTypesReturnsFalseOnArrayWithObjects ( )
Test:

Definition at line 41 of file ArrayUtilityTest.php.

◆ containsMultipleTypesReturnsFalseOnEmptyArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::containsMultipleTypesReturnsFalseOnEmptyArray ( )
Test:

Definition at line 25 of file ArrayUtilityTest.php.

◆ containsMultipleTypesReturnsTrueOnMixedArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::containsMultipleTypesReturnsTrueOnMixedArray ( )
Test:

Definition at line 49 of file ArrayUtilityTest.php.

◆ convertObjectToArrayConvertsNestedObjectsToArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::convertObjectToArrayConvertsNestedObjectsToArray ( )

◆ getValueByPathReturnsNullIfThePathHasMoreSegmentsThanTheGivenArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathReturnsNullIfThePathHasMoreSegmentsThanTheGivenArray ( )
Test:

Definition at line 106 of file ArrayUtilityTest.php.

◆ getValueByPathReturnsNullIfTheSegementsOfThePathDontExist()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathReturnsNullIfTheSegementsOfThePathDontExist ( )
Test:

Definition at line 97 of file ArrayUtilityTest.php.

◆ getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPath()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPath ( )
Test:

Definition at line 66 of file ArrayUtilityTest.php.

◆ getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPathIfPathIsString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenPathIfPathIsString ( )

◆ getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenSimplePath()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathReturnsTheValueOfANestedArrayByFollowingTheGivenSimplePath ( )
Test:

Definition at line 57 of file ArrayUtilityTest.php.

◆ getValueByPathThrowsExceptionIfPathIsNoArrayOrString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::getValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )

◆ integerExplodeReturnsArrayOfIntegers()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::integerExplodeReturnsArrayOfIntegers ( )
Test:

Definition at line 409 of file ArrayUtilityTest.php.

◆ integerExplodeReturnsZeroForStringValues()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::integerExplodeReturnsZeroForStringValues ( )
Test:

Definition at line 419 of file ArrayUtilityTest.php.

◆ removeEmptyElementsRecursivelyRemovesEmptySubArrays()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::removeEmptyElementsRecursivelyRemovesEmptySubArrays ( )

◆ removeEmptyElementsRecursivelyRemovesNullValues()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::removeEmptyElementsRecursivelyRemovesNullValues ( )

◆ setValueByLeavesInputArrayUnchanged()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByLeavesInputArrayUnchanged ( )

◆ setValueByPathRecursivelyMergesAnArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathRecursivelyMergesAnArray ( )

◆ setValueByPathSetsValueRecursivelyIfPathIsArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathSetsValueRecursivelyIfPathIsArray ( )

◆ setValueByPathSetsValueRecursivelyIfPathIsString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathSetsValueRecursivelyIfPathIsString ( )

◆ setValueByPathThrowsExceptionIfPathIsNoArrayOrString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )

◆ setValueByPathThrowsExceptionIfSubjectIsNoArray()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathThrowsExceptionIfSubjectIsNoArray ( )

◆ setValueByPathThrowsExceptionIfSubjectIsNoArrayAccess()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::setValueByPathThrowsExceptionIfSubjectIsNoArrayAccess ( )

◆ sortArrayWithIntegerKeysDataProvider()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::sortArrayWithIntegerKeysDataProvider ( )

dataProvider for sortArrayWithIntegerKeys

Returns
array

Definition at line 431 of file ArrayUtilityTest.php.

◆ sortArrayWithIntegerKeysSortsNumericArrays()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::sortArrayWithIntegerKeysSortsNumericArrays ( array  $arrayToSort,
array  $expectedArray 
)
Test:
Parameters
array$arrayToSort
array$expectedArraysortArrayWithIntegerKeysDataProvider

Definition at line 481 of file ArrayUtilityTest.php.

References TYPO3\CMS\Extbase\Utility\ArrayUtility\sortArrayWithIntegerKeys().

◆ unsetValueByPathDoesNotModifyAnArrayIfThePathWasNotFound()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::unsetValueByPathDoesNotModifyAnArrayIfThePathWasNotFound ( )

◆ unsetValueByPathRemovesSpecifiedBranch()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::unsetValueByPathRemovesSpecifiedBranch ( )

◆ unsetValueByPathRemovesSpecifiedKey()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::unsetValueByPathRemovesSpecifiedKey ( )

◆ unsetValueByPathRemovesSpecifiedKeyIfPathIsString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::unsetValueByPathRemovesSpecifiedKeyIfPathIsString ( )

◆ unsetValueByPathThrowsExceptionIfPathIsNoArrayOrString()

TYPO3\CMS\Extbase\Tests\Unit\Utility\ArrayUtilityTest::unsetValueByPathThrowsExceptionIfPathIsNoArrayOrString ( )