/** * Sets mock expectations for called method setDir in FileCache * @return void */ private function setDir($path = self::PATH) { $this->filemanagerMock->fileExists($path)->atLeastOnce()->andReturn(true); $this->filemanagerMock->isDir($path)->atLeastOnce()->andReturn(true); $this->filemanagerMock->isWritable($path)->atLeastOnce()->andReturn(true); $this->filemanagerMock->getDirectory($path)->atLeastOnce()->andReturn($this->directoryMock); }