aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-08-26 21:15:47 +0200
committerGitHub <noreply@github.com>2020-08-26 21:15:47 +0200
commit7685d1fc615231edb144a4a3057389d7deb3daa9 (patch)
tree1ad1c898b39c89c09a91a62d807b38c05e76fd49 /apps/dav
parentdf99d8f0e02c23b8b9fb43c72183eef5e49430ba (diff)
parent06ae93b270a63574ae486acbcbaa35bec3fbd43a (diff)
downloadnextcloud-server-7685d1fc615231edb144a4a3057389d7deb3daa9.tar.gz
nextcloud-server-7685d1fc615231edb144a4a3057389d7deb3daa9.zip
Merge pull request #22421 from nextcloud/group-folder-quota-warning
show better quota warning for group folders and external storage
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php15
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 b05c7cdca2a..6e0cac8e9cc 100644
--- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
@@ -33,6 +33,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;
@@ -270,9 +271,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')
@@ -293,8 +297,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')
@@ -305,9 +309,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')
@@ -329,8 +336,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')