CacheCallbackTest::_callback PHP Метод

_callback() защищенный Метод

protected _callback ( CacheAbstract $cache )
$cache Cachearium\CacheAbstract
    protected function _callback(CacheAbstract $cache)
    {
        $base = 'callback';
        $key1 = new CacheKey($base, 1);
        $cache->clean($key1);
        $this->assertEquals(CALLBACKVALUE, $cache->startCallback($key1, 'callbackTester'));
        try {
            $data = $cache->getData($key1);
            $this->assertEquals(CALLBACKVALUE, $data->stringify($cache));
        } catch (Cachearium\Exceptions\NotCachedException $e) {
            $this->fail();
        }
    }