diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-17 16:48:08 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-11 18:23:48 +0200 |
commit | d73a50c980784ffab8fc90bc07f4dde5416081c9 (patch) | |
tree | ca4adb4f813fd6d55c1398f4d35c486f3444ab67 /apps/theming/tests/Settings | |
parent | 931a7ce28201e0675ac194e0f966f2c84c29ef9e (diff) | |
download | nextcloud-server-d73a50c980784ffab8fc90bc07f4dde5416081c9.tar.gz nextcloud-server-d73a50c980784ffab8fc90bc07f4dde5416081c9.zip |
feat(theming): Add checkbox for force enable / disable blurry background
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/tests/Settings')
-rw-r--r-- | apps/theming/tests/Settings/PersonalTest.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/apps/theming/tests/Settings/PersonalTest.php b/apps/theming/tests/Settings/PersonalTest.php index 8e7ee4fb602..d9327eaed80 100644 --- a/apps/theming/tests/Settings/PersonalTest.php +++ b/apps/theming/tests/Settings/PersonalTest.php @@ -47,14 +47,15 @@ use OCP\IConfig; use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUserSession; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class PersonalTest extends TestCase { - private IConfig $config; - private ThemesService $themesService; - private IInitialState $initialStateService; - private ThemingDefaults $themingDefaults; - private IAppManager $appManager; + private IConfig|MockObject $config; + private ThemesService|MockObject $themesService; + private IInitialState|MockObject $initialStateService; + private ThemingDefaults|MockObject $themingDefaults; + private IAppManager|MockObject $appManager; private Personal $admin; /** @var ITheme[] */ @@ -129,12 +130,13 @@ class PersonalTest extends TestCase { $this->initialStateService->expects($this->exactly(5)) ->method('provideInitialState') - ->withConsecutive( + ->willReturnMap([ ['themes', $themesState], + ['enableBlurFilter', ''], ['enforceTheme', $enforcedTheme], ['isUserThemingDisabled', false], ['navigationBar', ['userAppOrder' => [], 'enforcedDefaultApp' => 'forcedapp']], - ); + ]); $expected = new TemplateResponse('theming', 'settings-personal'); $this->assertEquals($expected, $this->admin->getForm()); @@ -176,6 +178,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), 'light' => new LightTheme( $util, @@ -186,6 +189,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), 'dark' => new DarkTheme( $util, @@ -196,6 +200,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), 'light-highcontrast' => new HighContrastTheme( $util, @@ -206,6 +211,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), 'dark-highcontrast' => new DarkHighContrastTheme( $util, @@ -216,6 +222,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), 'opendyslexic' => new DyslexiaFont( $util, @@ -226,6 +233,7 @@ class PersonalTest extends TestCase { $config, $l10n, $appManager, + null, ), ]; } |