mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(theming): use IAppConfig instead of IConfig to set theming config
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue