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