/** @test */ public function it_caches_the_given_key() { $post = $this->makePost(); $cache = new \Illuminate\Cache\Repository(new \Illuminate\Cache\ArrayStore()); $cache = new Katching($cache); $cache->put($post, '<div>view fragment</div>'); $this->assertTrue($cache->has($post->getCacheKey())); $this->assertTrue($cache->has($post)); }
/** * Handle the @endcache teardown. */ public function teardown() { return $this->cache->put(array_pop($this->keys), ob_get_clean()); }