diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-07-19 10:20:47 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-07-19 10:20:47 +0200 |
commit | e48ca730fe90c889d06acbfdf799006b46b4bf84 (patch) | |
tree | c51aae1293fd710d73fade32a8519a69aadafeed /apps/theming/tests | |
parent | e2298e0a717da87926bbdbfb80755aa0dbeabdab (diff) | |
download | nextcloud-server-e48ca730fe90c889d06acbfdf799006b46b4bf84.tar.gz nextcloud-server-e48ca730fe90c889d06acbfdf799006b46b4bf84.zip |
Add Android and iOS URLs to theming app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 8646eaf865f..057229483e9 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -543,4 +543,65 @@ class ThemingDefaultsTest extends TestCase { ]; $this->assertEquals($expected, $this->template->getScssVariables()); } + + public function testGetDefaultAndroidURL() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'AndroidClientUrl', 'https://play.google.com/store/apps/details?id=com.nextcloud.client') + ->willReturn('https://play.google.com/store/apps/details?id=com.nextcloud.client'); + + $this->assertEquals('https://play.google.com/store/apps/details?id=com.nextcloud.client', $this->template->getAndroidClientUrl()); + } + + public function testGetCustomAndroidURL() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'AndroidClientUrl', 'https://play.google.com/store/apps/details?id=com.nextcloud.client') + ->willReturn('https://play.google.com/store/apps/details?id=com.mycloud.client'); + + $this->assertEquals('https://play.google.com/store/apps/details?id=com.mycloud.client', $this->template->getAndroidClientUrl()); + } + + public function testGetDefaultiOSURL() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'iOSClientUrl', 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8') + ->willReturn('https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'); + + $this->assertEquals('https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8', $this->template->getiOSClientUrl()); + } + + public function testGetCustomiOSURL() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'iOSClientUrl', 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8') + ->willReturn('https://itunes.apple.com/us/app/nextcloud/id1234567890?mt=8'); + + $this->assertEquals('https://itunes.apple.com/us/app/nextcloud/id1234567890?mt=8', $this->template->getiOSClientUrl()); + } + + public function testGetDefaultiTunesAppId() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'iTunesAppId', '1125420102') + ->willReturn('1125420102'); + + $this->assertEquals('1125420102', $this->template->getiTunesAppId()); + } + + public function testGetCustomiTunesAppId() { + $this->config + ->expects($this->once()) + ->method('getAppValue') + ->with('theming', 'iTunesAppId', '1125420102') + ->willReturn('1234567890'); + + $this->assertEquals('1234567890', $this->template->getiTunesAppId()); + } + } |