summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests/ThemingDefaultsTest.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-10-19 12:22:54 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-10-19 12:57:35 +0200
commit746710ad5b55127826bb52d5c9923002ea443b0a (patch)
tree52512cc33969beb89381471f5836abbcaa88b1a8 /apps/theming/tests/ThemingDefaultsTest.php
parentef760e0337018c8a45bb380d1a1d50f912ca23ee (diff)
downloadnextcloud-server-746710ad5b55127826bb52d5c9923002ea443b0a.tar.gz
nextcloud-server-746710ad5b55127826bb52d5c9923002ea443b0a.zip
Fix tests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/theming/tests/ThemingDefaultsTest.php')
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 5106b2551b8..d8940670137 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -424,20 +424,30 @@ class ThemingDefaultsTest extends TestCase {
public function testGetColorPrimaryWithDefault() {
$this->config
- ->expects($this->once())
+ ->expects($this->at(0))
->method('getAppValue')
->with('theming', 'color', null)
->willReturn($this->defaults->getColorPrimary());
+ $this->config
+ ->expects($this->at(1))
+ ->method('getAppValue')
+ ->with('theming', 'disable-user-theming', 'no')
+ ->willReturn('no');
$this->assertEquals($this->defaults->getColorPrimary(), $this->template->getColorPrimary());
}
- public function testgetColorPrimaryWithCustom() {
+ public function testGetColorPrimaryWithCustom() {
$this->config
- ->expects($this->once())
+ ->expects($this->at(0))
->method('getAppValue')
->with('theming', 'color', null)
->willReturn('#fff');
+ $this->config
+ ->expects($this->at(1))
+ ->method('getAppValue')
+ ->with('theming', 'disable-user-theming', 'no')
+ ->willReturn('no');
$this->assertEquals('#fff', $this->template->getColorPrimary());
}
@@ -613,14 +623,16 @@ class ThemingDefaultsTest extends TestCase {
->method('deleteAppValue')
->with('theming', 'color');
$this->config
- ->expects($this->exactly(2))
+ ->expects($this->exactly(3))
->method('getAppValue')
->withConsecutive(
['theming', 'cachebuster', '0'],
['theming', 'color', null],
+ ['theming', 'disable-user-theming', 'no'],
)->willReturnOnConsecutiveCalls(
'15',
$this->defaults->getColorPrimary(),
+ 'no',
);
$this->config
->expects($this->once())