Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
HttpCacheKeyGenerator example
$item
=
new
CacheItem
(
)
;
$cache
->
expects
(
static
::
once
(
)
)
->
method
(
'getItem'
)
->
willReturn
(
$item
)
;
$cache
->
expects
(
static
::
once
(
)
)
->
method
(
'save'
)
->
with
(
$item
)
;
$store
=
new
CacheStore
(
$cache
,
$this
->
createMock
(
CacheStateValidator::
class
)
,
new
EventDispatcher
(
)
,
$this
->
createMock
(
AbstractCacheTracer::
class
)
,
new
HttpCacheKeyGenerator
(
'test',
new
EventDispatcher
(
)
,
[
]
)
,
$this
->
createMock
(
MaintenanceModeResolver::
class
)
,
[
]
)
;
$store
->
lock
(
$request
)
;
static
::
assertTrue
(
$item
->
get
(
)
)
;
$reflectionClass
=
new
\
ReflectionClass
(
$item
)
;
$prop
=
$reflectionClass
->
getProperty
(
'expiry'
)
;
$prop
->
setAccessible
(
true
)
;