Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
try {
$info = $this->fileView->getFileInfo($path);
- if ($info->getStorage()->instanceOfStorage(FailedStorage::class)) {
+ if ($info instanceof \OCP\Files\FileInfo && $info->getStorage()->instanceOfStorage(FailedStorage::class)) {
throw new StorageNotAvailableException();
}
} catch (StorageNotAvailableException $e) {
$fileInfo->expects($this->once())
->method('getName')
->will($this->returnValue($outputFileName));
+ $fileInfo->method('getStorage')
+ ->willReturn($this->createMock(\OC\Files\Storage\Common::class));
$view->expects($this->once())
->method('getFileInfo')