Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
7e6dd02441
commit
aedc59c636
|
@ -160,7 +160,7 @@ class ObjectTree extends \Sabre\DAV\Tree {
|
|||
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) {
|
||||
|
|
|
@ -174,6 +174,8 @@ class ObjectTreeTest extends \Test\TestCase {
|
|||
$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')
|
||||
|
|
Loading…
Reference in New Issue