diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-06-15 17:02:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-15 17:02:14 +0200 |
commit | 8f6acbff621b02cead64219eb9e6b03f4951075a (patch) | |
tree | 68dec6474e476078801be1cd2de3036401c3fc8b /apps/theming/tests/Controller | |
parent | d82ef721611654aa3a3aab0ea3c8c85c7e0187d6 (diff) | |
parent | ceee91d9d455eed8b01942bc56767c69077e9f3f (diff) | |
download | nextcloud-server-8f6acbff621b02cead64219eb9e6b03f4951075a.tar.gz nextcloud-server-8f6acbff621b02cead64219eb9e6b03f4951075a.zip |
Merge pull request #9258 from nextcloud/theming-logo-png
Convert theming app logo to PNG to show it properly in emails
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 6d8ede159b3..b4b45a065b0 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -120,7 +120,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()) @@ -144,7 +144,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'; @@ -165,10 +165,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') @@ -191,7 +194,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 60ec2c1dc63..360eb7083a4 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -690,7 +690,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'); @@ -718,7 +718,7 @@ class ThemingControllerTest extends TestCase { ->willReturn($file); $this->config - ->expects($this->once()) + ->expects($this->any()) ->method('getAppValue') ->with('theming', 'backgroundMime', '') ->willReturn('image/png'); |