Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ifInArray example
$test
=
$this
->
getTestBuilder
(
)
->
ifArray
(
)
->
then
(
$this
->
returnClosure
(
'new_value'
)
)
->
end
(
)
;
$this
->
assertFinalizedValueIs
(
'value',
$test
)
;
}
public
function
testIfInArrayExpression
(
)
{
$test
=
$this
->
getTestBuilder
(
)
->
ifInArray
(
[
'foo', 'bar', 'value'
]
)
->
then
(
$this
->
returnClosure
(
'new_value'
)
)
->
end
(
)
;
$this
->
assertFinalizedValueIs
(
'new_value',
$test
)
;
$test
=
$this
->
getTestBuilder
(
)
->
ifInArray
(
[
'foo', 'bar'
]
)
->
then
(
$this
->
returnClosure
(
'new_value'
)
)
->
end
(
)
;
$this
->
assertFinalizedValueIs
(
'value',
$test
)
;
}