Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
c8a29ec942
commit
d2fe30d464
|
@ -156,7 +156,7 @@ class ObjectTree extends CachingTree {
|
|||
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