diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-05-08 14:51:55 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-05-08 14:51:55 +0200 |
commit | 099234cf12c4d1ec2d1942ed506f463b28ef738c (patch) | |
tree | 371d6475df8e76f1c1ce62d983f2059cad4b7eae /apps/theming/tests/ThemingDefaultsTest.php | |
parent | 6acae94a021a6e961a00fe2c33e5468461e65893 (diff) | |
download | nextcloud-server-099234cf12c4d1ec2d1942ed506f463b28ef738c.tar.gz nextcloud-server-099234cf12c4d1ec2d1942ed506f463b28ef738c.zip |
Add function to request SVG or regular fallback image
Fixes https://github.com/nextcloud/server/issues/4647
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/theming/tests/ThemingDefaultsTest.php')
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index e3acab78bb7..a7cb7790aa6 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -431,7 +431,7 @@ class ThemingDefaultsTest extends TestCase { $this->assertEquals('custom-background?v=0', $this->template->getBackground()); } - public function testGetLogoDefault() { + private function getLogoHelper($withName, $useSvg) { $this->appData->expects($this->once()) ->method('getFolder') ->willThrowException(new NotFoundException()); @@ -452,9 +452,17 @@ class ThemingDefaultsTest extends TestCase { ->willThrowException(new \Exception()); $this->urlGenerator->expects($this->once()) ->method('imagePath') - ->with('core', 'logo.svg') + ->with('core', $withName) ->willReturn('core-logo'); - $this->assertEquals('core-logo?v=0', $this->template->getLogo()); + $this->assertEquals('core-logo?v=0', $this->template->getLogo($useSvg)); + } + + public function testGetLogoDefaultWithSvg() { + $this->getLogoHelper('logo.svg', true); + } + + public function testGetLogoDefaultWithoutSvg() { + $this->getLogoHelper('logo.png', false); } public function testGetLogoCustom() { |