Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-26 17:42:19 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-12-16 11:43:29 +0300
commit37f8f7a5a18e57507330036b747d4b12e58efae4 (patch)
tree4a057e03cae53d21092d06e373fa91fbad2b258f /apps/theming
parent6b770eb5799f58c41db2b3249e6e71cf69049fac (diff)
Fix tests on PHP 8.1 for encryption, files_sharing, files_version,
files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/tests/Controller/IconControllerTest.php2
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php3
2 files changed, 5 insertions, 0 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php
index 821291427d9..04954782168 100644
--- a/apps/theming/tests/Controller/IconControllerTest.php
+++ b/apps/theming/tests/Controller/IconControllerTest.php
@@ -91,6 +91,8 @@ class IconControllerTest extends TestCase {
$icon->expects($this->any())->method('getContent')->willReturn($data);
$icon->expects($this->any())->method('getMimeType')->willReturn('image type');
$icon->expects($this->any())->method('getEtag')->willReturn('my etag');
+ $icon->expects($this->any())->method('getName')->willReturn('my name');
+ $icon->expects($this->any())->method('getMTime')->willReturn(42);
$icon->method('getName')->willReturn($filename);
return new SimpleFile($icon);
}
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index b85b2bb6ad0..cff2028809d 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -748,6 +748,7 @@ class ThemingControllerTest extends TestCase {
$this->appManager->expects($this->once())->method('getAppPath')->with('theming')->willReturn(\OC::$SERVERROOT . '/theming');
$file = $this->createMock(ISimpleFile::class);
$file->expects($this->any())->method('getName')->willReturn('theming.css');
+ $file->expects($this->any())->method('getMTime')->willReturn(42);
$file->expects($this->any())->method('getContent')->willReturn('compiled');
$this->scssCacher->expects($this->once())->method('process')->willReturn(true);
$this->scssCacher->expects($this->once())->method('getCachedCSS')->willReturn($file);
@@ -763,6 +764,7 @@ class ThemingControllerTest extends TestCase {
$this->appManager->expects($this->once())->method('getAppPath')->with('theming')->willReturn(\OC::$SERVERROOT . '/theming');
$file = $this->createMock(ISimpleFile::class);
$file->expects($this->any())->method('getName')->willReturn('theming.css');
+ $file->expects($this->any())->method('getMTime')->willReturn(42);
$file->expects($this->any())->method('getContent')->willReturn('compiled');
$this->scssCacher->expects($this->once())->method('process')->willReturn(true);
$this->scssCacher->expects($this->once())->method('getCachedCSS')->willThrowException(new NotFoundException());
@@ -776,6 +778,7 @@ class ThemingControllerTest extends TestCase {
$this->appManager->expects($this->once())->method('getAppPath')->with('theming')->willReturn('/outside/serverroot/theming');
$file = $this->createMock(ISimpleFile::class);
$file->expects($this->any())->method('getName')->willReturn('theming.css');
+ $file->expects($this->any())->method('getMTime')->willReturn(42);
$file->expects($this->any())->method('getContent')->willReturn('compiled');
$this->scssCacher->expects($this->once())->method('process')->with('/outside/serverroot/theming', 'css/theming.scss', 'theming')->willReturn(true);
$this->scssCacher->expects($this->once())->method('getCachedCSS')->willReturn($file);