Extends
lithium\test\UnitSource
public function testExpiredRead() {
$key = 'expired_key';
$time = time() + 1;
$closure = $this->File->read($key);
$this->assertTrue(is_callable($closure));
$path = Libraries::get(true, 'resources') . "/tmp/cache/{$key}";
file_put_contents($path, "{:expiry:$time}\ndata");
$this->assertTrue(file_exists($path));
sleep(2);
$params = compact('key');
$this->assertFalse($closure($this->File, $params, null));
}