diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-17 19:19:08 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-17 19:19:08 +0200 |
commit | 2bdc97741cd42843f85750421cba032942d860ed (patch) | |
tree | b5f28a171e01ed48ca00194f0691366ef0575dc5 | |
parent | 9a9dd10c0cadeedf4fc2fd156b3825a115908a0b (diff) | |
download | nextcloud-server-2bdc97741cd42843f85750421cba032942d860ed.tar.gz nextcloud-server-2bdc97741cd42843f85750421cba032942d860ed.zip |
fix(tests): Fix Folder tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | tests/lib/Files/Node/FolderTest.php | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index 5af409a1a93..3cc2623e046 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -353,6 +353,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $cache->insert('files', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('files/foo', ['size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']); @@ -391,6 +393,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $cache->insert('foo', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('foo/qwerty', ['size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']); @@ -442,9 +446,13 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $subStorage->method('getCache') ->willReturn($subCache); + $subStorage->method('getOwner') + ->willReturn('owner'); $cache->insert('foo', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('foo/qwerty', ['size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']); @@ -496,6 +504,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $this->userMountCache->expects($this->any()) ->method('getMountsForFileId') @@ -543,6 +553,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $this->userMountCache->expects($this->any()) ->method('getMountsForFileId') @@ -586,6 +598,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $this->userMountCache->expects($this->any()) ->method('getMountsForFileId') @@ -629,6 +643,8 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $this->userMountCache->method('getMountsForFileId') ->with(1) @@ -644,9 +660,6 @@ class FolderTest extends NodeTest { ), ]); - $storage->method('getCache') - ->willReturn($cache); - $cache->method('get') ->with(1) ->willReturn($fileInfo); @@ -948,9 +961,13 @@ class FolderTest extends NodeTest { $storage->method('getCache') ->willReturn($cache); + $storage->method('getOwner') + ->willReturn('owner'); $subStorage1->method('getCache') ->willReturn($subCache1); + $subStorage1->method('getOwner') + ->willReturn('owner'); $subMount2->method('getStorage') ->willReturn($subStorage2); @@ -960,6 +977,8 @@ class FolderTest extends NodeTest { $subStorage2->method('getCache') ->willReturn($subCache2); + $subStorage2->method('getOwner') + ->willReturn('owner'); $cache->insert('foo/foo1', ['size' => 200, 'mtime' => 10, 'mimetype' => 'text/plain']); $cache->insert('foo/foo2', ['size' => 200, 'mtime' => 20, 'mimetype' => 'text/plain']); |