diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-02-18 15:41:01 +0100 |
---|---|---|
committer | Julius Härtl (Rebase PR Action) <github@juliushaertl.de> | 2023-03-06 22:46:07 +0000 |
commit | d515da502f34af151e156ba383c1d2e5c8289520 (patch) | |
tree | ec10b1749ed0b4018bf8917f96c0abf54ca88ec7 /apps/dav/tests | |
parent | 3287eddbbc4465ee5fcb39016b3ad0ad27959ea6 (diff) | |
download | nextcloud-server-d515da502f34af151e156ba383c1d2e5c8289520.tar.gz nextcloud-server-d515da502f34af151e156ba383c1d2e5c8289520.zip |
fix: Use proper path for quota fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index edbe4278c3a..a74cb139966 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -304,6 +304,10 @@ class DirectoryTest extends \Test\TestCase { ->method('free_space') ->willReturn(800); + $this->info->expects($this->any()) + ->method('getPath') + ->willReturn('/admin/files/foo'); + $this->info->expects($this->once()) ->method('getSize') ->willReturn(200); @@ -312,6 +316,10 @@ class DirectoryTest extends \Test\TestCase { ->method('getMountPoint') ->willReturn($mountPoint); + $this->view->expects($this->any()) + ->method('getRelativePath') + ->willReturn('/foo'); + $mountPoint->method('getMountPoint') ->willReturn('/user/files/mymountpoint'); @@ -359,6 +367,10 @@ class DirectoryTest extends \Test\TestCase { $mountPoint->method('getMountPoint') ->willReturn('/user/files/mymountpoint'); + $this->view->expects($this->any()) + ->method('getRelativePath') + ->willReturn('/foo'); + $dir = new Directory($this->view, $this->info); $this->assertEquals([200, 800], $dir->getQuotaInfo()); //200 used, 800 free } |