PHP Class Kraken\_Unit\Util\Support\ArraySupportTest

Inheritance: extends Kraken\Test\TUnit
Datei anzeigen Open project: kraken-php/framework

Public Methods

Method Description
createArraySupportMock ( ) : ArraySupport
getArray ( ) : array
getFlattenedArray ( array $array ) : array
testApiExists_ReturnsFalse_ForComplexKey_WhichDoesNotExist ( )
testApiExists_ReturnsFalse_ForSimpleKey_WhichDoesNotExist ( )
testApiExists_ReturnsTrue_ForComplexKey_WhichExistsDirectly ( )
testApiExists_ReturnsTrue_ForComplexKey_WhichExistsIndirectly ( )
testApiExists_ReturnsTrue_ForSimpleKey_WhichExists ( )
testApiExpand_ExpandsArray ( )
testApiFlatten_FlattensArray ( )
testApiGet_ReturnsArray_ForEmptyStringKey ( )
testApiGet_ReturnsArray_ForNullKey ( )
testApiGet_ReturnsDefault_ForNonExistingElement ( )
testApiGet_ReturnsElement_ForDottedKeyIsSingleRealKey ( )
testApiGet_ReturnsElement_ForExistingElement ( )
testApiGet_ReturnsElement_ForExistingKey_WhenKeyIsDottedAndSingleRealKey ( )
testApiGet_ReturnsNull_ForNonExistingElement ( )
testApiIsEmpty_ReturnsFalse_ForNonEmptyArray ( )
testApiIsEmpty_ReturnsTrue_ForEmptyArray ( )
testApiMerge_MergesMultipleArraysPreservingDotNotation ( )
testApiMerge_ReturnsEmptyArray_ForEmptyArray ( )
testApiMerge_ReturnsSameArray_WhenOnlyOneArrayPassed ( )
testApiNormalizeKey_NormalizesKey ( )
testApiNormalizeKey_ReturnsNull_ForNullKey ( )
testApiRemove_DoesNothing_ForNonExistingKey ( )
testApiRemove_EmptiesArray_ForEmptyStringKey ( )
testApiRemove_EmptiesArray_ForNullKey ( )
testApiRemove_RemovesElement_ForExistingKey ( )
testApiReplace_ReplacesMultipleArraysPreservingDotNotation ( )
testApiReplace_ReturnsEmptyArray_ForEmptyArray ( )
testApiReplace_ReturnsSameArray_WhenOnlyOneArrayPassed ( )
testApiSet_ReplacesArray_ForEmptyStringKey ( )
testApiSet_ReplacesArray_ForNullKey ( )
testApiSet_ReturnsSameArray ( )
testApiSet_SetsValue_ForExistingKey ( )
testApiSet_SetsValue_ForNonExistingKey ( )

Method Details

createArraySupportMock() public method

public createArraySupportMock ( ) : ArraySupport
return Kraken\Util\Support\ArraySupport

getArray() public method

public getArray ( ) : array
return array

getFlattenedArray() public method

public getFlattenedArray ( array $array ) : array
$array array
return array

testApiExists_ReturnsFalse_ForComplexKey_WhichDoesNotExist() public method

testApiExists_ReturnsFalse_ForSimpleKey_WhichDoesNotExist() public method

testApiExists_ReturnsTrue_ForComplexKey_WhichExistsDirectly() public method

testApiExists_ReturnsTrue_ForComplexKey_WhichExistsIndirectly() public method

testApiExists_ReturnsTrue_ForSimpleKey_WhichExists() public method

testApiExpand_ExpandsArray() public method

testApiFlatten_FlattensArray() public method

testApiGet_ReturnsArray_ForEmptyStringKey() public method

testApiGet_ReturnsArray_ForNullKey() public method

testApiGet_ReturnsDefault_ForNonExistingElement() public method

testApiGet_ReturnsElement_ForDottedKeyIsSingleRealKey() public method

testApiGet_ReturnsElement_ForExistingElement() public method

testApiGet_ReturnsElement_ForExistingKey_WhenKeyIsDottedAndSingleRealKey() public method

testApiGet_ReturnsNull_ForNonExistingElement() public method

testApiIsEmpty_ReturnsFalse_ForNonEmptyArray() public method

testApiIsEmpty_ReturnsTrue_ForEmptyArray() public method

testApiMerge_MergesMultipleArraysPreservingDotNotation() public method

testApiMerge_ReturnsEmptyArray_ForEmptyArray() public method

testApiMerge_ReturnsSameArray_WhenOnlyOneArrayPassed() public method

testApiNormalizeKey_NormalizesKey() public method

testApiNormalizeKey_ReturnsNull_ForNullKey() public method

testApiRemove_DoesNothing_ForNonExistingKey() public method

testApiRemove_EmptiesArray_ForEmptyStringKey() public method

testApiRemove_EmptiesArray_ForNullKey() public method

testApiRemove_RemovesElement_ForExistingKey() public method

testApiReplace_ReplacesMultipleArraysPreservingDotNotation() public method

testApiReplace_ReturnsEmptyArray_ForEmptyArray() public method

testApiReplace_ReturnsSameArray_WhenOnlyOneArrayPassed() public method

testApiSet_ReplacesArray_ForEmptyStringKey() public method

testApiSet_ReplacesArray_ForNullKey() public method

testApiSet_ReturnsSameArray() public method

testApiSet_SetsValue_ForExistingKey() public method

testApiSet_SetsValue_ForNonExistingKey() public method