lithium\tests\cases\storage\cache\adapter\FileTest::testRead PHP Method

testRead() public method

public testRead ( )
    public function testRead()
    {
        $key = 'key';
        $keys = array($key);
        $time = time() + 60;
        $path = Libraries::get(true, 'resources') . "/tmp/cache/{$key}";
        file_put_contents($path, "{:expiry:{$time}}\ndata");
        $this->assertFileExists($path);
        $params = compact('keys');
        $result = $this->File->read($keys);
        $this->assertEqual(array($key => 'data'), $result);
        unlink($path);
    }