public function dataTestEnableTheme() {
return [
- ['default', [], ['default']],
- ['dark', [], ['dark']],
+ ['default', ['default'], ['default']],
+ ['dark', ['default'], ['dark']],
['dark', ['dark'], ['dark']],
['opendyslexic', ['dark'], ['dark', 'opendyslexic']],
['dark', ['light-highcontrast', 'opendyslexic'], ['opendyslexic', 'dark']],
$this->config->expects($this->once())
->method('getUserValue')
- ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
->willReturn(json_encode($enabledThemes));
$this->assertEquals($expectedEnabled, $this->themesService->enableTheme($this->themes[$toEnable]));
public function dataTestDisableTheme() {
return [
- ['dark', [], []],
+ ['dark', ['default'], ['default']],
['dark', ['dark'], []],
['opendyslexic', ['dark', 'opendyslexic'], ['dark'], ],
['light-highcontrast', ['opendyslexic'], ['opendyslexic']],
$this->config->expects($this->once())
->method('getUserValue')
- ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
->willReturn(json_encode($enabledThemes));
$this->config->expects($this->once())
->method('getUserValue')
- ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
->willReturn(json_encode($enabledThemes));
$this->config->expects($this->once())
->method('getUserValue')
- ->with('user', Application::APP_ID, 'enabled-themes', '[]')
- ->willReturn(json_encode([]));
+ ->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
+ ->willReturn(json_encode(['default']));
$this->config->expects($this->once())
->method('getSystemValueString')
->with('enforce_theme', '')
->willReturn('');
- $this->assertEquals([], $this->themesService->getEnabledThemes());
+ $this->assertEquals(['default'], $this->themesService->getEnabledThemes());
}
public function testGetEnabledThemesEnforced() {
$this->config->expects($this->once())
->method('getUserValue')
- ->with('user', Application::APP_ID, 'enabled-themes', '[]')
+ ->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
->willReturn(json_encode([]));
$this->config->expects($this->once())
->method('getSystemValueString')