From ad10a3331693c90c47d04c7ac6883aa5ca1ed5c6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 25 Feb 2022 15:49:30 +0100 Subject: make share cache test resilient against skeleton files not being there Signed-off-by: Robin Appelman --- apps/files_sharing/tests/CacheTest.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index 2623b4c34b5..f4f64bc6a32 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -243,17 +243,15 @@ class CacheTest extends TestCase { public function testGetFolderContentsInRoot() { $results = $this->user2View->getDirectoryContent('/'); + $results = (array_filter($results, function($file) { + return $file->getName() !== 'welcome.txt'; + })); // we should get the shared items "shareddir" and "shared single file.txt" // additional root will always contain the example file "welcome.txt", // so this will be part of the result $this->verifyFiles( [ - [ - 'name' => 'welcome.txt', - 'path' => 'files/welcome.txt', - 'mimetype' => 'text/plain', - ], [ 'name' => 'shareddir', 'path' => 'files/shareddir', -- cgit v1.2.3