Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AuthenticatorManagerListener example
->
willReturn
(
false
)
;
$tokenStorage
=
$this
->
createMock
(
TokenStorageInterface::
class
)
;
$dispatcher
=
new
EventDispatcher
(
)
;
$authenticatorManager
=
new
AuthenticatorManager
(
[
$notSupportingAuthenticator
,
$supportingAuthenticator
]
,
$tokenStorage
,
$dispatcher
,
'main'
)
;
$listener
=
new
TraceableAuthenticatorManagerListener
(
new
AuthenticatorManagerListener
(
$authenticatorManager
)
)
;
$firewallMap
=
$this
->
createMock
(
FirewallMap::
class
)
;
$firewallMap
->
expects
(
$this
->
once
(
)
)
->
method
(
'getFirewallConfig'
)
->
with
(
$request
)
->
willReturn
(
null
)
;
$firewallMap
->
expects
(
$this
->
once
(
)
)
->
method
(
'getListeners'
)
->
with
(
$request
)
->
willReturn
(
[
[
$listener
]
, null, null
]
)
;