Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setupDefaultExpectations example
$this
->sessionMetadata->
expects
(
$this
->
any
(
)
)
->
method
(
'getCsrfTokenSeed'
)
->
willReturn
(
$seed
)
;
}
/** * Tests CsrfTokenGenerator::get(). * * @covers ::get */
public
function
testGet
(
)
{
$this
->
setupDefaultExpectations
(
)
;
$this
->
assertIsString
(
$this
->generator->
get
(
)
)
;
$this
->
assertNotSame
(
$this
->generator->
get
(
)
,
$this
->generator->
get
(
$this
->
randomMachineName
(
)
)
)
;
$this
->
assertNotSame
(
$this
->generator->
get
(
$this
->
randomMachineName
(
)
)
,
$this
->generator->
get
(
$this
->
randomMachineName
(
)
)
)
;
}
/** * Tests that a new token seed is generated upon first use. * * @covers ::get */