Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
IsGrantedAttributeMethodsController example
$listener
->
onKernelControllerArguments
(
$event
)
;
}
public
function
testNothingHappensWithNoConfig
(
)
{
$authChecker
=
$this
->
createMock
(
AuthorizationCheckerInterface::
class
)
;
$authChecker
->
expects
(
$this
->
never
(
)
)
->
method
(
'isGranted'
)
;
$event
=
new
ControllerArgumentsEvent
(
$this
->
createMock
(
HttpKernelInterface::
class
)
,
[
new
IsGrantedAttributeMethodsController
(
)
, 'noAttribute'
]
,
[
]
,
new
Request
(
)
,
null
)
;
$listener
=
new
IsGrantedAttributeListener
(
$authChecker
)
;
$listener
->
onKernelControllerArguments
(
$event
)
;
}
public
function
testIsGrantedCalledCorrectly
(
)
{