Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getRequestStackWithEmptyNamespaceMocks example
$this
->
assertGetNonExistingToken
(
...
$this
->
getRequestStackMocks
(
)
)
;
}
public
function
testGetNonExistingTokenClosure
(
)
{
$this
->
assertGetNonExistingToken
(
...
$this
->
getClosureMocks
(
)
)
;
}
public
function
testGetNonExistingTokenRequestStackEmptyNamespace
(
)
{
$this
->
assertGetNonExistingToken
(
...
$this
->
getRequestStackWithEmptyNamespaceMocks
(
)
)
;
}
private
function
assertGetNonExistingToken
(
$namespace
,
$manager
,
$storage
,
$generator
)
: void
{
$storage
->
expects
(
$this
->
once
(
)
)
->
method
(
'hasToken'
)
->
with
(
$namespace
.'token_id'
)
->
willReturn
(
false
)
;
$generator
->
expects
(
$this
->
once
(
)
)
->
method
(
'generateToken'
)