is()){ $this->fail("is not set"); } touch($fileName); if(! $cache->is()){ $this->fail("could not set"); } touch($fileName,0); if($cache->is()){ $this->fail("does not reset"); } } public function testGet(){ $fileName = __DIR__ . "/asserts/testfile.txt"; $time = 60*60;//1h $cache = new CacheOneFile($fileName,$time); foreach ($this->validContent as $value) { $cache->set($value); if($cache->get() !== (string)$value){ $this->fail("get set dosen't match for value{" . print_r($value,true) . "}"); } } unlink($fileName); foreach ($this->invalidContent as $value) { $cache->set($value); if($cache->get() === $value){ $this->fail("get set does match for value{" . print_r($value,true) . "}"); } } } }