コード例 #1
0
 public function it_should_cache_deletes()
 {
     $delete = 'delete.txt';
     $this->adapter->delete($delete)->willReturn(true);
     $this->cache->delete($delete)->shouldBeCalled();
     $this->delete($delete)->shouldBe(true);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function delete($path)
 {
     $result = $this->adapter->delete($path);
     if ($result !== false) {
         $this->cache->delete($path);
     }
     return $result;
 }