mirror of
https://github.com/nextcloud/server.git
synced 2026-04-25 08:08:33 -04:00
test: adjust tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
43a9335355
commit
94f33463ff
2 changed files with 13 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ use OC\Files\Mount\MountPoint;
|
|||
use OCP\Constants;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\Mount\IMountManager;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Server;
|
||||
use OCP\Share\IShare;
|
||||
|
||||
|
|
@ -48,7 +49,11 @@ class Updater {
|
|||
throw new \Exception('user folder has no owner');
|
||||
}
|
||||
|
||||
$src = $userFolder->get($path);
|
||||
try {
|
||||
$src = $userFolder->get($path);
|
||||
} catch (NotFoundException) {
|
||||
return;
|
||||
}
|
||||
|
||||
$shareManager = Server::get(\OCP\Share\IManager::class);
|
||||
|
||||
|
|
|
|||
|
|
@ -1565,10 +1565,15 @@ class ViewTest extends \Test\TestCase {
|
|||
return new \OC\Files\Cache\Storage($storage, true, Server::get(IDBConnection::class));
|
||||
});
|
||||
|
||||
$mounts[] = $this->getMockBuilder(TestMoveableMountPoint::class)
|
||||
->onlyMethods(['moveMount'])
|
||||
$mount = $this->getMockBuilder(TestMoveableMountPoint::class)
|
||||
->onlyMethods(['moveMount', 'getNumericStorageId'])
|
||||
->setConstructorArgs([$storage, $mountPoint])
|
||||
->getMock();
|
||||
|
||||
$mount->method('getNumericStorageId')
|
||||
->willReturn(1);
|
||||
|
||||
$mounts[] = $mount;
|
||||
}
|
||||
|
||||
/** @var IMountProvider|\PHPUnit\Framework\MockObject\MockObject $mountProvider */
|
||||
|
|
|
|||
Loading…
Reference in a new issue