Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
thenEmptyArray example
$test
=
$this
->
getTestBuilder
(
)
->
ifNotInArray
(
[
'foo', 'bar', 'value_from_config'
]
)
->
then
(
$this
->
returnClosure
(
'new_value'
)
)
->
end
(
)
;
$this
->
assertFinalizedValueIs
(
'new_value',
$test
)
;
}
public
function
testThenEmptyArrayExpression
(
)
{
$test
=
$this
->
getTestBuilder
(
)
->
ifString
(
)
->
thenEmptyArray
(
)
->
end
(
)
;
$this
->
assertFinalizedValueIs
(
[
]
,
$test
)
;
}
/** * @dataProvider castToArrayValues */
public
function
testCastToArrayExpression
(
$configValue
, array
$expectedValue
)
{
$test
=
$this
->
getTestBuilder
(
)
->
castToArray
(
)