Ejemplo n.º 1
0
 /**
  * @test
  */
 public function unserialize_sucessEmpty()
 {
     $input = new CacheEntry();
     $target = new CacheEntry('example', ['example.file' => new DateTime()], new DateTime());
     $target->unserialize($input->serialize());
     $this->assertNull($target->getContent());
     $this->assertNull($target->getFiles());
     $this->assertNull($target->getLastModified());
 }
Ejemplo n.º 2
0
 private function hasChanged(CacheEntry $entry)
 {
     foreach ($entry->getFiles() as $file => $lastModified) {
         if ($this->checkFileChanged($file, $lastModified)) {
             return true;
         }
     }
     return false;
 }