Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setCacheMissData example
$this
->collector =
new
CacheCollectorHelper
(
$this
->cid,
$this
->cacheBackend,
$this
->lock
)
;
$this
->
getContainerWithCacheTagsInvalidator
(
$this
->cacheTagsInvalidator
)
;
}
/** * Tests the resolve cache miss function. */
public
function
testResolveCacheMiss
(
)
{
$key
=
$this
->
randomMachineName
(
)
;
$value
=
$this
->
randomMachineName
(
)
;
$this
->collector->
setCacheMissData
(
$key
,
$value
)
;
$this
->
assertEquals
(
$value
,
$this
->collector->
get
(
$key
)
)
;
}
/** * Tests setting and getting values when the cache is empty. */
public
function
testSetAndGet
(
)
{
$key
=
$this
->
randomMachineName
(
)
;
$value
=
$this
->
randomMachineName
(
)
;