Skip to content

Commit d2cfe74

Browse files
committed
fix(theming): use IAppConfig instead of IConfig to set theming config
Signed-off-by: Salvatore Martire <[email protected]>
1 parent 10ef3a5 commit d2cfe74

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

apps/theming/lib/ThemingDefaults.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ public function increaseCacheBuster(): void {
433433
* @param string $value
434434
*/
435435
public function set($setting, $value): void {
436-
$this->config->setAppValue('theming', $setting, $value);
436+
$this->appConfig->setValueString('theming', $setting, $value);
437437
$this->increaseCacheBuster();
438438
}
439439

apps/theming/tests/ThemingDefaultsTest.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,18 +476,14 @@ public function testGetColorPrimary(bool $disableTheming, string $primaryColor,
476476
}
477477

478478
public function testSet(): void {
479-
$expectedCalls = [
480-
['theming', 'MySetting', 'MyValue'],
481-
['theming', 'cachebuster', 16],
482-
];
483-
$i = 0;
484479
$this->config
485-
->expects($this->exactly(2))
480+
->expects($this->once())
486481
->method('setAppValue')
487-
->willReturnCallback(function () use ($expectedCalls, &$i): void {
488-
$this->assertEquals($expectedCalls[$i], func_get_args());
489-
$i++;
490-
});
482+
->with('theming', 'cachebuster', 16);
483+
$this->appConfig
484+
->expects($this->once())
485+
->method('setValueString')
486+
->with('theming', 'MySetting', 'MyValue');
491487
$this->config
492488
->expects($this->once())
493489
->method('getAppValue')

0 commit comments

Comments
 (0)