@@ -121,8 +121,8 @@ public function testGetThemesEnforcedInvalid() {
121121
122122 public function dataTestEnableTheme () {
123123 return [
124- ['default ' , [], ['default ' ]],
125- ['dark ' , [], ['dark ' ]],
124+ ['default ' , [' default ' ], ['default ' ]],
125+ ['dark ' , [' default ' ], ['dark ' ]],
126126 ['dark ' , ['dark ' ], ['dark ' ]],
127127 ['opendyslexic ' , ['dark ' ], ['dark ' , 'opendyslexic ' ]],
128128 ['dark ' , ['light-highcontrast ' , 'opendyslexic ' ], ['opendyslexic ' , 'dark ' ]],
@@ -147,7 +147,7 @@ public function testEnableTheme(string $toEnable, array $enabledThemes, array $e
147147
148148 $ this ->config ->expects ($ this ->once ())
149149 ->method ('getUserValue ' )
150- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
150+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
151151 ->willReturn (json_encode ($ enabledThemes ));
152152
153153 $ this ->assertEquals ($ expectedEnabled , $ this ->themesService ->enableTheme ($ this ->themes [$ toEnable ]));
@@ -156,7 +156,7 @@ public function testEnableTheme(string $toEnable, array $enabledThemes, array $e
156156
157157 public function dataTestDisableTheme () {
158158 return [
159- ['dark ' , [], []],
159+ ['dark ' , [' default ' ], [' default ' ]],
160160 ['dark ' , ['dark ' ], []],
161161 ['opendyslexic ' , ['dark ' , 'opendyslexic ' ], ['dark ' ], ],
162162 ['light-highcontrast ' , ['opendyslexic ' ], ['opendyslexic ' ]],
@@ -181,7 +181,7 @@ public function testDisableTheme(string $toDisable, array $enabledThemes, array
181181
182182 $ this ->config ->expects ($ this ->once ())
183183 ->method ('getUserValue ' )
184- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
184+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
185185 ->willReturn (json_encode ($ enabledThemes ));
186186
187187
@@ -215,7 +215,7 @@ public function testIsEnabled(string $themeId, array $enabledThemes, $expected)
215215
216216 $ this ->config ->expects ($ this ->once ())
217217 ->method ('getUserValue ' )
218- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
218+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
219219 ->willReturn (json_encode ($ enabledThemes ));
220220
221221
@@ -234,14 +234,14 @@ public function testGetEnabledThemes() {
234234
235235 $ this ->config ->expects ($ this ->once ())
236236 ->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 ' ]));
239239 $ this ->config ->expects ($ this ->once ())
240240 ->method ('getSystemValueString ' )
241241 ->with ('enforce_theme ' , '' )
242242 ->willReturn ('' );
243243
244- $ this ->assertEquals ([], $ this ->themesService ->getEnabledThemes ());
244+ $ this ->assertEquals ([' default ' ], $ this ->themesService ->getEnabledThemes ());
245245 }
246246
247247 public function testGetEnabledThemesEnforced () {
@@ -256,7 +256,7 @@ public function testGetEnabledThemesEnforced() {
256256
257257 $ this ->config ->expects ($ this ->once ())
258258 ->method ('getUserValue ' )
259- ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '[] ' )
259+ ->with ('user ' , Application::APP_ID , 'enabled-themes ' , '["default" ] ' )
260260 ->willReturn (json_encode ([]));
261261 $ this ->config ->expects ($ this ->once ())
262262 ->method ('getSystemValueString ' )
0 commit comments