private function setCache($iterator, $value, $files)
 {
     $key = $this->target->generateCacheKey($iterator);
     $entry = new CacheBinderEntry($value, $files, new DateTime());
     $entry->setMimeType('text/css');
     $entry->setContext(new Context());
     $this->cache->setHas($key);
     $this->cache->setEntry($key, $entry->serialize());
 }
 /**
  * @test
  */
 public function unserialize_success()
 {
     $context = new Context();
     $context->enableDebug(true);
     $entry = new CacheBinderEntry();
     $entry->setContext($context);
     $entry->setMimeType('text/css');
     $result = $this->target->unserialize($entry->serialize());
     $this->assertEquals('text/css', $result->getMimeType());
     $this->assertTrue($result->getContext()->hasDebug());
     $this->assertFalse($result->getContext()->hasMinifier());
 }
 private function process($key, $files, $compiler)
 {
     $result = $this->binder->bind($files, $compiler);
     $entry = new CacheBinderEntry($result, $this->binder->getFiles(), $this->binder->getLastModified());
     $entry->setMimeType($this->binder->getMimeType());
     $entry->setContext($this->context);
     $this->cache->setEntry($key, $entry);
     return $entry;
 }