diff options
author | Robin Appelman <robin@icewind.nl> | 2020-08-26 15:46:24 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-08-26 19:17:43 +0000 |
commit | a004eedd1effdea70e3bb2afb062c94069d7b648 (patch) | |
tree | 5c89120af8a22385aff5de4373a6248fef5b5639 /apps/dav | |
parent | 4025b95e0316595d5e3bc04a9b32caf2aeda4a37 (diff) | |
download | nextcloud-server-a004eedd1effdea70e3bb2afb062c94069d7b648.tar.gz nextcloud-server-a004eedd1effdea70e3bb2afb062c94069d7b648.zip |
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 69b2dd5877e..db79ea21b0e 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -32,6 +32,7 @@ use OC\Files\FileInfo; use OC\Files\Storage\Wrapper\Quota; use OCA\DAV\Connector\Sabre\Directory; use OCP\Files\ForbiddenException; +use OCP\Files\Mount\IMountPoint; class TestViewDirectory extends \OC\Files\View { private $updatables; @@ -269,9 +270,12 @@ class DirectoryTest extends \Test\TestCase { } public function testGetQuotaInfoUnlimited() { + $mountPoint = $this->createMock(IMountPoint::class); $storage = $this->getMockBuilder(Quota::class) ->disableOriginalConstructor() ->getMock(); + $mountPoint->method('getStorage') + ->willReturn($storage); $storage->expects($this->any()) ->method('instanceOfStorage') @@ -292,8 +296,8 @@ class DirectoryTest extends \Test\TestCase { ->willReturn(200); $this->info->expects($this->once()) - ->method('getStorage') - ->willReturn($storage); + ->method('getMountPoint') + ->willReturn($mountPoint); $this->view->expects($this->once()) ->method('getFileInfo') @@ -304,9 +308,12 @@ class DirectoryTest extends \Test\TestCase { } public function testGetQuotaInfoSpecific() { + $mountPoint = $this->createMock(IMountPoint::class); $storage = $this->getMockBuilder(Quota::class) ->disableOriginalConstructor() ->getMock(); + $mountPoint->method('getStorage') + ->willReturn($storage); $storage->expects($this->any()) ->method('instanceOfStorage') @@ -328,8 +335,8 @@ class DirectoryTest extends \Test\TestCase { ->willReturn(200); $this->info->expects($this->once()) - ->method('getStorage') - ->willReturn($storage); + ->method('getMountPoint') + ->willReturn($mountPoint); $this->view->expects($this->once()) ->method('getFileInfo') |