diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-06-05 16:59:05 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-06-06 13:15:52 +0200 |
commit | 5b0ce806a3679b34ae3a6f8e6ae32a0b513a4ca9 (patch) | |
tree | bdda614353703033cfa26bfd9b8687b2579be3e0 /apps/theming/tests/Controller | |
parent | d132527aa9c4baad344b11adef3a6f4a46cde3ab (diff) | |
download | nextcloud-server-5b0ce806a3679b34ae3a6f8e6ae32a0b513a4ca9.tar.gz nextcloud-server-5b0ce806a3679b34ae3a6f8e6ae32a0b513a4ca9.zip |
Minor fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/tests/Controller')
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 13 | ||||
-rw-r--r-- | apps/theming/tests/Controller/ThemingControllerTest.php | 4 |
2 files changed, 10 insertions, 7 deletions
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'); |