So as it's know xcache is not working under CLI but still want to test some functionality what is related partially to xcache under symfony2. Having the following snippet
//this is a working snippet
$key = 'likes';
$cache = $this->getXcacheCache();
if ($cache->contains($key)) {
$likes = $cache->fetch($key);
} elseif ($profile = $this->getProfile()) {
$likes = $this->getProfile()->getProperty('likes');
$cache->save($key, $likes, 3600);
}
Is there a way to unit test xcache if contains a specific key and run other tests based on this condition?