Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
Symfony51Store example
public
function
getStore
(
)
: PersistingStoreInterface
{
return
new
RedisStore
(
$this
->
getRedisConnection
(
)
)
;
}
public
function
testBackwardCompatibility
(
)
{
$resource
=
uniqid
(
__METHOD__, true
)
;
$key1
=
new
Key
(
$resource
)
;
$key2
=
new
Key
(
$resource
)
;
$oldStore
=
new
Symfony51Store
(
$this
->
getRedisConnection
(
)
)
;
$newStore
=
$this
->
getStore
(
)
;
$oldStore
->
save
(
$key1
)
;
$this
->
assertTrue
(
$oldStore
->
exists
(
$key1
)
)
;
$this
->
expectException
(
LockConflictedException::
class
)
;
$newStore
->
save
(
$key2
)
;
}
}
class
Symfony51Store
{