CacheBasicTest::clear PHP Метод

clear() публичный Метод

public clear ( CacheAbstract $cache )
$cache Cachearium\CacheAbstract
    public function clear(CacheAbstract $cache)
    {
        $key = new CacheKey('clear', 'it');
        $cd = new CacheData($key, 789);
        $this->assertTrue($cache->storeData($cd));
        $cache->clear();
        try {
            $cache->get($key);
            $this->fail();
        } catch (Cachearium\Exceptions\NotCachedException $e) {
            $this->assertTrue(true);
        }
    }