@@ -121,8 +121,8 @@ public function testGetThemesEnforcedInvalid(): void {
121
121
122
122
public function dataTestEnableTheme () {
123
123
return [
124
- ['default ' , [], ['default ' ]],
125
- ['dark ' , [], ['dark ' ]],
124
+ ['default ' , [' default ' ], ['default ' ]],
125
+ ['dark ' , [' default ' ], ['dark ' ]],
126
126
['dark ' , ['dark ' ], ['dark ' ]],
127
127
['opendyslexic ' , ['dark ' ], ['dark ' , 'opendyslexic ' ]],
128
128
['dark ' , ['light-highcontrast ' , 'opendyslexic ' ], ['opendyslexic ' , 'dark ' ]],
@@ -147,7 +147,7 @@ public function testEnableTheme(string $toEnable, array $enabledThemes, array $e
147
147
148
148
$ this ->config ->expects ($ this ->once ())
149
149
->method ('getUserValue ' )
150
- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
150
+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
151
151
->willReturn (json_encode ($ enabledThemes ));
152
152
153
153
$ this ->assertEquals ($ expectedEnabled , $ this ->themesService ->enableTheme ($ this ->themes [$ toEnable ]));
@@ -156,7 +156,7 @@ public function testEnableTheme(string $toEnable, array $enabledThemes, array $e
156
156
157
157
public function dataTestDisableTheme () {
158
158
return [
159
- ['dark ' , [], []],
159
+ ['dark ' , [' default ' ], [' default ' ]],
160
160
['dark ' , ['dark ' ], []],
161
161
['opendyslexic ' , ['dark ' , 'opendyslexic ' ], ['dark ' ], ],
162
162
['light-highcontrast ' , ['opendyslexic ' ], ['opendyslexic ' ]],
@@ -181,7 +181,7 @@ public function testDisableTheme(string $toDisable, array $enabledThemes, array
181
181
182
182
$ this ->config ->expects ($ this ->once ())
183
183
->method ('getUserValue ' )
184
- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
184
+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
185
185
->willReturn (json_encode ($ enabledThemes ));
186
186
187
187
@@ -215,7 +215,7 @@ public function testIsEnabled(string $themeId, array $enabledThemes, $expected):
215
215
216
216
$ this ->config ->expects ($ this ->once ())
217
217
->method ('getUserValue ' )
218
- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
218
+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
219
219
->willReturn (json_encode ($ enabledThemes ));
220
220
221
221
@@ -234,14 +234,14 @@ public function testGetEnabledThemes(): void {
234
234
235
235
$ this ->config ->expects ($ this ->once ())
236
236
->method ('getUserValue ' )
237
- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
238
- ->willReturn (json_encode ([]));
237
+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
238
+ ->willReturn (json_encode ([' default ' ]));
239
239
$ this ->config ->expects ($ this ->once ())
240
240
->method ('getSystemValueString ' )
241
241
->with ('enforce_theme ' , '' )
242
242
->willReturn ('' );
243
243
244
- $ this ->assertEquals ([], $ this ->themesService ->getEnabledThemes ());
244
+ $ this ->assertEquals ([' default ' ], $ this ->themesService ->getEnabledThemes ());
245
245
}
246
246
247
247
public function testGetEnabledThemesEnforced (): void {
@@ -256,7 +256,7 @@ public function testGetEnabledThemesEnforced(): void {
256
256
257
257
$ this ->config ->expects ($ this ->once ())
258
258
->method ('getUserValue ' )
259
- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
259
+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
260
260
->willReturn (json_encode ([]));
261
261
$ this ->config ->expects ($ this ->once ())
262
262
->method ('getSystemValueString ' )
0 commit comments