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 process_successInternalRequestEntryCache() { $file = 'example.file'; $time = new DateTime(); $files = [$file => $time]; $this->stubProcessor($file, 'content', $time, $files); $this->target->process($file); $this->cache->setHas($file); $this->stubProcessor($file, 'changed', $time, $files); $this->assertEquals('content', $this->target->process($file)); $this->assertCacheEntry($file, 'content', $time, $files); }