Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertNonMatchingTokenIsNotValid example
$storage
->
expects
(
$this
->
once
(
)
)
->
method
(
'getToken'
)
->
with
(
$namespace
.'token_id'
)
->
willReturn
(
'TOKEN'
)
;
$this
->
assertTrue
(
$manager
->
isTokenValid
(
new
CsrfToken
(
'token_id', 'TOKEN'
)
)
)
;
}
public
function
testNonMatchingTokenIsNotValidEmptyNamespace
(
)
{
$this
->
assertNonMatchingTokenIsNotValid
(
...
$this
->
getEmptyNamespaceMocks
(
)
)
;
}
public
function
testNonMatchingTokenIsNotValidHttpsNamespace
(
)
{
$this
->
assertNonMatchingTokenIsNotValid
(
...
$this
->
getHttpsNamespaceMocks
(
)
)
;
}
public
function
testNonMatchingTokenIsNotValidCustomNamespace
(
)
{
$this
->
assertNonMatchingTokenIsNotValid
(
...
$this
->
getCustomNamespaceMocks
(
)
)
;
}