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