Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
controllerDisablingResolver example
$controller
=
$this
->
controllerTargetingResolverWithNullableValue
(
...
)
;
$this
->
assertSame
(
[
null
]
,
$resolver
->
getArguments
(
$request
,
$controller
)
)
;
}
public
function
testDisabledResolver
(
)
{
$resolver
= self::
getResolver
(
namedResolvers:
[
]
)
;
$request
= Request::
create
(
'/'
)
;
$request
->attributes->
set
(
'foo', 'bar'
)
;
$controller
=
$this
->
controllerDisablingResolver
(
...
)
;
$this
->
assertSame
(
[
1
]
,
$resolver
->
getArguments
(
$request
,
$controller
)
)
;
}
public
function
testManyTargetedResolvers
(
)
{
$resolver
= self::
getResolver
(
namedResolvers:
[
]
)
;
$request
= Request::
create
(
'/'
)
;
$controller
=
$this
->
controllerTargetingManyResolvers
(
...
)
;