Redaxscript\Tests\CacheTest::testClear PHP Метод

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

testClear
С версии: 3.0.0
public testClear ( )
    public function testClear()
    {
        /* setup */
        $cache = new Cache();
        $cache->init(Stream::url('root'), 'cache')->store('test1', 'test')->store('test2', 'test')->clear()->store('test3', 'test')->store('test4', 'test')->clear('test3');
        /* compare */
        $this->assertFalse(file_exists($cache->getPath('test1')));
        $this->assertFalse(file_exists($cache->getPath('test2')));
        $this->assertFalse(file_exists($cache->getPath('test3')));
        $this->assertTrue(file_exists($cache->getPath('test4')));
    }