Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
lessThanOrEqual example
public
function
testputOffExpirationThrowsExceptionOnFailure
(
)
{
$this
->
expectException
(
LockConflictedException::
class
)
;
$key
=
new
Key
(
uniqid
(
__METHOD__, true
)
)
;
$ttl
=
random_int
(
1, 10
)
;
$this
->store1
->
expects
(
$this
->
once
(
)
)
->
method
(
'putOffExpiration'
)
->
with
(
$key
,
$this
->
lessThanOrEqual
(
$ttl
)
)
->
willThrowException
(
new
LockConflictedException
(
)
)
;
$this
->store2
->
expects
(
$this
->
once
(
)
)
->
method
(
'putOffExpiration'
)
->
with
(
$key
,
$this
->
lessThanOrEqual
(
$ttl
)
)
->
willThrowException
(
new
LockConflictedException
(
)
)
;
$this
->strategy
->
expects
(
$this
->
any
(
)
)
->
method
(
'canBeMet'
)
->
willReturn
(
true
)
;