Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2019-11-26 12:55:20 +0300
committerGitHub <noreply@github.com>2019-11-26 12:55:20 +0300
commitfe6dc8082c8f370cd1136bb0a0494b902ffbbea0 (patch)
tree7149df5d8ba57fd764761c34683cae49e3f9d901 /apps/theming/tests
parentdfe85ae0c2c542178657a0a610ecea9f7cd1cea6 (diff)
parent6d883f3641b769bda17d7267bdde42027f051e7d (diff)
add var for theming images , advanced options (#16815)
add var for theming images , advanced options
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/CapabilitiesTest.php14
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php4
2 files changed, 13 insertions, 5 deletions
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php
index 87c544b2a2c..f007de1dbdb 100644
--- a/apps/theming/tests/CapabilitiesTest.php
+++ b/apps/theming/tests/CapabilitiesTest.php
@@ -78,6 +78,8 @@ class CapabilitiesTest extends TestCase {
'background' => 'http://absolute/background',
'background-plain' => false,
'background-default' => false,
+ 'logoheader' => 'http://absolute/logo',
+ 'favicon' => 'http://absolute/logo',
]],
['name1', 'url2', 'slogan3', '#01e4a0', '#ffffff', 'logo5', 'background6', 'http://localhost/', false, [
'name' => 'name1',
@@ -90,6 +92,8 @@ class CapabilitiesTest extends TestCase {
'background' => 'http://localhost/background6',
'background-plain' => false,
'background-default' => true,
+ 'logoheader' => 'http://localhost/logo5',
+ 'favicon' => 'http://localhost/logo5',
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', 'http://localhost/', true, [
'name' => 'name1',
@@ -102,6 +106,8 @@ class CapabilitiesTest extends TestCase {
'background' => '#000000',
'background-plain' => true,
'background-default' => false,
+ 'logoheader' => 'http://localhost/logo5',
+ 'favicon' => 'http://localhost/logo5',
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', 'http://localhost/', false, [
'name' => 'name1',
@@ -114,6 +120,8 @@ class CapabilitiesTest extends TestCase {
'background' => '#000000',
'background-plain' => true,
'background-default' => true,
+ 'logoheader' => 'http://localhost/logo5',
+ 'favicon' => 'http://localhost/logo5',
]],
];
}
@@ -147,7 +155,7 @@ class CapabilitiesTest extends TestCase {
$this->theming->expects($this->atLeast(1))
->method('getColorPrimary')
->willReturn($color);
- $this->theming->expects($this->once())
+ $this->theming->expects($this->exactly(3))
->method('getLogo')
->willReturn($logo);
$this->theming->expects($this->once())
@@ -168,13 +176,13 @@ class CapabilitiesTest extends TestCase {
$this->theming->expects($this->once())
->method('getBackground')
->willReturn($background);
- $this->url->expects($this->exactly(2))
+ $this->url->expects($this->exactly(4))
->method('getAbsoluteURL')
->willReturnCallback(function($url) use($baseUrl) {
return $baseUrl . $url;
});
} else {
- $this->url->expects($this->once())
+ $this->url->expects($this->exactly(3))
->method('getAbsoluteURL')
->willReturnCallback(function($url) use($baseUrl) {
return $baseUrl . $url;
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 3c69490bef5..71b8ba97e9b 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -681,8 +681,8 @@ class ThemingDefaultsTest extends TestCase {
'color-primary-element' => '#aaaaaa',
'theming-logoheader-mime' => '\'jpeg\'',
'theming-favicon-mime' => '\'jpeg\'',
- 'image-logoheader' => '\'custom-logoheader?v=0\'',
- 'image-favicon' => '\'custom-favicon?v=0\'',
+ 'image-logoheader' => "url('custom-logoheader?v=0')",
+ 'image-favicon' => "url('custom-favicon?v=0')",
'has-legal-links' => 'false'
];
$this->assertEquals($expected, $this->template->getScssVariables());