/**
* @test
*/
public function shouldNeedReloadAfterSourceChanged()
{
$source = new InMemory();
$cache = new InMemory();
$cachedFs = new Cache($source, $cache);
// The source has been updated after the cache has been created.
$mtime = time();
$source->setFile('foo', 'baz', $mtime - 10);
$cache->setFile('foo', 'bar', $mtime - 20);
$this->assertTrue($cachedFs->needsReload('foo'));
$this->assertEquals('baz', $cachedFs->read('foo'));
}