fix(theming): use IAppConfig instead of IConfig to set theming config

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
pull/54740/head
Salvatore Martire 2025-08-25 15:33:49 +07:00 committed by backportbot[bot]
parent d0758cdc48
commit fc09daee17
2 changed files with 7 additions and 11 deletions

@ -432,7 +432,7 @@ class ThemingDefaults extends \OC_Defaults {
* @param string $value
*/
public function set($setting, $value): void {
$this->config->setAppValue('theming', $setting, $value);
$this->appConfig->setValueString('theming', $setting, $value);
$this->increaseCacheBuster();
}

@ -500,18 +500,14 @@ class ThemingDefaultsTest extends TestCase {
}
public function testSet(): void {
$expectedCalls = [
['theming', 'MySetting', 'MyValue'],
['theming', 'cachebuster', 16],
];
$i = 0;
$this->config
->expects($this->exactly(2))
->expects($this->once())
->method('setAppValue')
->willReturnCallback(function () use ($expectedCalls, &$i): void {
$this->assertEquals($expectedCalls[$i], func_get_args());
$i++;
});
->with('theming', 'cachebuster', 16);
$this->appConfig
->expects($this->once())
->method('setValueString')
->with('theming', 'MySetting', 'MyValue');
$this->config
->expects($this->once())
->method('getAppValue')