aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/tests/ThemingDefaultsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/tests/ThemingDefaultsTest.php')
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php88
1 files changed, 44 insertions, 44 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 8edbcbc53c1..d8f169e7f3d 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -85,7 +85,7 @@ class ThemingDefaultsTest extends TestCase {
);
}
- public function testGetNameWithDefault() {
+ public function testGetNameWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -95,7 +95,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('Nextcloud', $this->template->getName());
}
- public function testGetNameWithCustom() {
+ public function testGetNameWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -105,7 +105,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('MyCustomCloud', $this->template->getName());
}
- public function testGetHTMLNameWithDefault() {
+ public function testGetHTMLNameWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -115,7 +115,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('Nextcloud', $this->template->getHTMLName());
}
- public function testGetHTMLNameWithCustom() {
+ public function testGetHTMLNameWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -125,7 +125,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('MyCustomCloud', $this->template->getHTMLName());
}
- public function testGetTitleWithDefault() {
+ public function testGetTitleWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -135,7 +135,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('Nextcloud', $this->template->getTitle());
}
- public function testGetTitleWithCustom() {
+ public function testGetTitleWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -146,7 +146,7 @@ class ThemingDefaultsTest extends TestCase {
}
- public function testGetEntityWithDefault() {
+ public function testGetEntityWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -156,7 +156,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('Nextcloud', $this->template->getEntity());
}
- public function testGetEntityWithCustom() {
+ public function testGetEntityWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -166,7 +166,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('MyCustomCloud', $this->template->getEntity());
}
- public function testGetBaseUrlWithDefault() {
+ public function testGetBaseUrlWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -176,7 +176,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($this->defaults->getBaseUrl(), $this->template->getBaseUrl());
}
- public function testGetBaseUrlWithCustom() {
+ public function testGetBaseUrlWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -197,7 +197,7 @@ class ThemingDefaultsTest extends TestCase {
* @param $imprintUrl
* @dataProvider legalUrlProvider
*/
- public function testGetImprintURL($imprintUrl) {
+ public function testGetImprintURL($imprintUrl): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -211,7 +211,7 @@ class ThemingDefaultsTest extends TestCase {
* @param $privacyUrl
* @dataProvider legalUrlProvider
*/
- public function testGetPrivacyURL($privacyUrl) {
+ public function testGetPrivacyURL($privacyUrl): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -221,7 +221,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($privacyUrl, $this->template->getPrivacyUrl());
}
- public function testGetSloganWithDefault() {
+ public function testGetSloganWithDefault(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -231,7 +231,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($this->defaults->getSlogan(), $this->template->getSlogan());
}
- public function testGetSloganWithCustom() {
+ public function testGetSloganWithCustom(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -241,7 +241,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('My custom Slogan', $this->template->getSlogan());
}
- public function testGetShortFooter() {
+ public function testGetShortFooter(): void {
$this->config
->expects($this->exactly(5))
->method('getAppValue')
@@ -256,7 +256,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter());
}
- public function testGetShortFooterEmptyUrl() {
+ public function testGetShortFooterEmptyUrl(): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -272,7 +272,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<span class="entity-name">Name</span> – Slogan', $this->template->getShortFooter());
}
- public function testGetShortFooterEmptySlogan() {
+ public function testGetShortFooterEmptySlogan(): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -288,7 +288,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a>', $this->template->getShortFooter());
}
- public function testGetShortFooterImprint() {
+ public function testGetShortFooterImprint(): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -309,7 +309,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a></span>', $this->template->getShortFooter());
}
- public function testGetShortFooterPrivacy() {
+ public function testGetShortFooterPrivacy(): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -330,7 +330,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a></span>', $this->template->getShortFooter());
}
- public function testGetShortFooterAllLegalLinks() {
+ public function testGetShortFooterAllLegalLinks(): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -362,7 +362,7 @@ class ThemingDefaultsTest extends TestCase {
* @param $invalidImprintUrl
* @dataProvider invalidLegalUrlProvider
*/
- public function testGetShortFooterInvalidImprint($invalidImprintUrl) {
+ public function testGetShortFooterInvalidImprint($invalidImprintUrl): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -382,7 +382,7 @@ class ThemingDefaultsTest extends TestCase {
* @param $invalidPrivacyUrl
* @dataProvider invalidLegalUrlProvider
*/
- public function testGetShortFooterInvalidPrivacy($invalidPrivacyUrl) {
+ public function testGetShortFooterInvalidPrivacy($invalidPrivacyUrl): void {
$this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]);
$this->config
->expects($this->exactly(5))
@@ -398,7 +398,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan', $this->template->getShortFooter());
}
- public function testGetColorPrimaryWithDefault() {
+ public function testGetColorPrimaryWithDefault(): void {
$this->appConfig
->expects(self::once())
->method('getValueBool')
@@ -413,7 +413,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($this->defaults->getColorPrimary(), $this->template->getColorPrimary());
}
- public function testGetColorPrimaryWithCustom() {
+ public function testGetColorPrimaryWithCustom(): void {
$this->appConfig
->expects(self::once())
->method('getValueBool')
@@ -472,7 +472,7 @@ class ThemingDefaultsTest extends TestCase {
/**
* @dataProvider dataGetColorPrimary
*/
- public function testGetColorPrimary(bool $disableTheming, string $primaryColor, string $userPrimaryColor, string $expected) {
+ public function testGetColorPrimary(bool $disableTheming, string $primaryColor, string $userPrimaryColor, string $expected): void {
$user = $this->createMock(IUser::class);
$this->userSession->expects($this->any())
->method('getUser')
@@ -499,7 +499,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($expected, $this->template->getColorPrimary());
}
- public function testSet() {
+ public function testSet(): void {
$this->config
->expects($this->exactly(2))
->method('setAppValue')
@@ -527,7 +527,7 @@ class ThemingDefaultsTest extends TestCase {
$this->template->set('MySetting', 'MyValue');
}
- public function testUndoName() {
+ public function testUndoName(): void {
$this->config
->expects($this->once())
->method('deleteAppValue')
@@ -550,7 +550,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertSame('Nextcloud', $this->template->undo('name'));
}
- public function testUndoBaseUrl() {
+ public function testUndoBaseUrl(): void {
$this->config
->expects($this->once())
->method('deleteAppValue')
@@ -573,7 +573,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertSame($this->defaults->getBaseUrl(), $this->template->undo('url'));
}
- public function testUndoSlogan() {
+ public function testUndoSlogan(): void {
$this->config
->expects($this->once())
->method('deleteAppValue')
@@ -596,7 +596,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertSame($this->defaults->getSlogan(), $this->template->undo('slogan'));
}
- public function testUndoPrimaryColor() {
+ public function testUndoPrimaryColor(): void {
$this->config
->expects($this->once())
->method('deleteAppValue')
@@ -614,7 +614,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertSame($this->defaults->getColorPrimary(), $this->template->undo('primary_color'));
}
- public function testUndoDefaultAction() {
+ public function testUndoDefaultAction(): void {
$this->config
->expects($this->once())
->method('deleteAppValue')
@@ -632,7 +632,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertSame('', $this->template->undo('defaultitem'));
}
- public function testGetBackground() {
+ public function testGetBackground(): void {
$this->imageManager
->expects($this->once())
->method('getImageUrl')
@@ -663,15 +663,15 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('core-logo?v=0', $this->template->getLogo($useSvg));
}
- public function testGetLogoDefaultWithSvg() {
+ public function testGetLogoDefaultWithSvg(): void {
$this->getLogoHelper('logo/logo.svg', true);
}
- public function testGetLogoDefaultWithoutSvg() {
+ public function testGetLogoDefaultWithoutSvg(): void {
$this->getLogoHelper('logo/logo.png', false);
}
- public function testGetLogoCustom() {
+ public function testGetLogoCustom(): void {
$this->config
->expects($this->exactly(2))
->method('getAppValue')
@@ -689,7 +689,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('custom-logo' . '?v=0', $this->template->getLogo());
}
- public function testGetScssVariablesCached() {
+ public function testGetScssVariablesCached(): void {
$this->config->expects($this->any())->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('1');
$this->cacheFactory->expects($this->once())
->method('createDistributed')
@@ -699,7 +699,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals(['foo' => 'bar'], $this->template->getScssVariables());
}
- public function testGetScssVariables() {
+ public function testGetScssVariables(): void {
$this->config
->expects($this->any())
->method('getAppValue')
@@ -754,7 +754,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals($expected, $this->template->getScssVariables());
}
- public function testGetDefaultAndroidURL() {
+ public function testGetDefaultAndroidURL(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -764,7 +764,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('https://play.google.com/store/apps/details?id=com.nextcloud.client', $this->template->getAndroidClientUrl());
}
- public function testGetCustomAndroidURL() {
+ public function testGetCustomAndroidURL(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -774,7 +774,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('https://play.google.com/store/apps/details?id=com.mycloud.client', $this->template->getAndroidClientUrl());
}
- public function testGetDefaultiOSURL() {
+ public function testGetDefaultiOSURL(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -784,7 +784,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8', $this->template->getiOSClientUrl());
}
- public function testGetCustomiOSURL() {
+ public function testGetCustomiOSURL(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -794,7 +794,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('https://geo.itunes.apple.com/us/app/nextcloud/id1234567890?mt=8', $this->template->getiOSClientUrl());
}
- public function testGetDefaultiTunesAppId() {
+ public function testGetDefaultiTunesAppId(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -804,7 +804,7 @@ class ThemingDefaultsTest extends TestCase {
$this->assertEquals('1125420102', $this->template->getiTunesAppId());
}
- public function testGetCustomiTunesAppId() {
+ public function testGetCustomiTunesAppId(): void {
$this->config
->expects($this->once())
->method('getAppValue')
@@ -824,7 +824,7 @@ class ThemingDefaultsTest extends TestCase {
}
/** @dataProvider dataReplaceImagePath */
- public function testReplaceImagePath($app, $image, $result = 'themingRoute?v=1234abcd') {
+ public function testReplaceImagePath($app, $image, $result = 'themingRoute?v=1234abcd'): void {
$this->cache->expects($this->any())
->method('get')
->with('shouldReplaceIcons')