Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
logicalXor example
$profiler
->
expects
(
$this
->
atLeastOnce
(
)
)
->
method
(
'loadProfile'
)
->
with
(
$profile
->
getToken
(
)
)
->
willReturn
(
$profile
)
;
$collectorsNames
=
array_keys
(
$profile
->
getCollectors
(
)
)
;
$profiler
->
expects
(
$this
->
atLeastOnce
(
)
)
->
method
(
'has'
)
->
with
(
$this
->
logicalXor
(
...
$collectorsNames
)
)
->
willReturn
(
true
)
;
$expectedTemplate
= 'expected_template.html.twig';
if
(
Environment::MAJOR_VERSION > 1
)
{
$loader
=
$this
->
createMock
(
LoaderInterface::
class
)
;
$loader
->
expects
(
$this
->
atLeastOnce
(
)
)
->
method
(
'exists'
)
->
with
(
$this
->
logicalXor
(
$expectedTemplate
, 'other_template.html.twig'
)
)
->
willReturn
(
true
)
;
}