public function it_should_cache_copies() { $old = 'old.txt'; $new = 'new.txt'; $this->adapter->copy($old, $new)->willReturn(true); $this->cache->copy($old, $new)->shouldBeCalled(); $this->copy($old, $new)->shouldBe(true); }
/** * {@inheritdoc} */ public function copy($path, $newpath) { $result = $this->adapter->copy($path, $newpath); if ($result !== false) { $this->cache->copy($path, $newpath); } return $result; }