aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-09-17 19:19:08 +0200
committerRobin Appelman <robin@icewind.nl>2024-09-19 17:51:51 +0200
commit617c663c3b19a3f9157936baf6777b25f7371e96 (patch)
tree83c5e89045909bbd8f5795fb9b52fcaefca938b3
parentee9f3115d93768da65587559aa7e70830633c802 (diff)
downloadnextcloud-server-617c663c3b19a3f9157936baf6777b25f7371e96.tar.gz
nextcloud-server-617c663c3b19a3f9157936baf6777b25f7371e96.zip
fix(tests): Fix Folder tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--tests/lib/Files/Node/FolderTest.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index f5ae33c3995..5e7a70d8f5a 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -357,6 +357,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$cache->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
$cache->insert('files', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
@@ -396,6 +398,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$cache->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
$cache->insert('foo', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
@@ -448,9 +452,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('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
$cache->insert('foo', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
@@ -504,6 +512,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$this->userMountCache->expects($this->any())
->method('getMountsForFileId')
@@ -551,6 +561,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$this->userMountCache->expects($this->any())
->method('getMountsForFileId')
@@ -594,6 +606,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$this->userMountCache->expects($this->any())
->method('getMountsForFileId')
@@ -637,6 +651,8 @@ class FolderTest extends NodeTest {
$storage->method('getCache')
->willReturn($cache);
+ $storage->method('getOwner')
+ ->willReturn('owner');
$this->userMountCache->method('getMountsForFileId')
->with(1)
@@ -652,9 +668,6 @@ class FolderTest extends NodeTest {
),
]);
- $storage->method('getCache')
- ->willReturn($cache);
-
$cache->method('get')
->with(1)
->willReturn($fileInfo);
@@ -966,9 +979,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);
@@ -978,6 +995,8 @@ class FolderTest extends NodeTest {
$subStorage2->method('getCache')
->willReturn($subCache2);
+ $subStorage2->method('getOwner')
+ ->willReturn('owner');
$cache->insert('', ['size' => 0, 'mtime' => 10, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);