From 5b0ce806a3679b34ae3a6f8e6ae32a0b513a4ca9 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 5 Jun 2018 16:59:05 +0200 Subject: Minor fixes and cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/theming/tests/Controller/IconControllerTest.php | 13 ++++++++----- apps/theming/tests/Controller/ThemingControllerTest.php | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'apps/theming/tests/Controller') diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index f509005d32c..cc83bae32a7 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -118,7 +118,7 @@ class IconControllerTest extends TestCase { ->method('getImage') ->with('favicon') ->will($this->throwException(new NotFoundException())); - $this->themingDefaults->expects($this->any()) + $this->imageManager->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(true); $this->imageManager->expects($this->once()) @@ -142,7 +142,7 @@ class IconControllerTest extends TestCase { ->method('getImage') ->with('favicon') ->will($this->throwException(new NotFoundException())); - $this->themingDefaults->expects($this->any()) + $this->imageManager->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(false); $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon.png'; @@ -163,10 +163,13 @@ class IconControllerTest extends TestCase { if (count($checkImagick->queryFormats('SVG')) < 1) { $this->markTestSkipped('No SVG provider present.'); } - $this->themingDefaults->expects($this->any()) + + $this->imageManager->expects($this->once()) + ->method('getImage') + ->will($this->throwException(new NotFoundException())); + $this->imageManager->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(true); - $this->iconBuilder->expects($this->once()) ->method('getTouchIcon') ->with('core') @@ -189,7 +192,7 @@ class IconControllerTest extends TestCase { ->method('getImage') ->with('favicon') ->will($this->throwException(new NotFoundException())); - $this->themingDefaults->expects($this->any()) + $this->imageManager->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(false); $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon-touch.png'; diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 4a2b780076c..aaed61016e4 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -688,7 +688,7 @@ class ThemingControllerTest extends TestCase { ->method('getImage') ->willReturn($file); $this->config - ->expects($this->once()) + ->expects($this->any()) ->method('getAppValue') ->with('theming', 'logoMime', '') ->willReturn('text/svg'); @@ -716,7 +716,7 @@ class ThemingControllerTest extends TestCase { ->willReturn($file); $this->config - ->expects($this->once()) + ->expects($this->any()) ->method('getAppValue') ->with('theming', 'backgroundMime', '') ->willReturn('image/png'); -- cgit v1.2.3