lithium\tests\integration\storage\CacheTest::testFileAdapterReadThroughWithStrategies PHP Method

testFileAdapterReadThroughWithStrategies() public method

    public function testFileAdapterReadThroughWithStrategies()
    {
        $resources = Libraries::get(true, 'resources');
        $path = "{$resources}/tmp/cache";
        $this->skipIf(!$this->_checkPath(), "{$path} does not have the proper permissions.");
        Cache::config(array('default' => array('adapter' => 'File', 'strategies' => array('Serializer'), 'filters' => array(), 'path' => $path)));
        $expected = 'bar';
        $result = Cache::read('default', 'foo', array('write' => array('+5 seconds' => 'bar')));
        $this->assertEqual($expected, $result);
        $expected = 'bar';
        $result = Cache::read('default', 'foo');
        $this->assertEqual($expected, $result);
    }