diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-12-14 17:56:42 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-12-15 21:09:14 +0100 |
commit | 61f401da57d6d883dbee2b236f7c2f77e7fa9612 (patch) | |
tree | 39c7e3edbf5cd013d1d519333b659a13bcf2423c /apps/theming/tests/Themes/DefaultThemeTest.php | |
parent | 141d1e90260ca63f415d65060752f4c9d3e8eb28 (diff) | |
download | nextcloud-server-61f401da57d6d883dbee2b236f7c2f77e7fa9612.tar.gz nextcloud-server-61f401da57d6d883dbee2b236f7c2f77e7fa9612.zip |
fix(theming): Adjust hover color to be accessible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/tests/Themes/DefaultThemeTest.php')
-rw-r--r-- | apps/theming/tests/Themes/DefaultThemeTest.php | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/apps/theming/tests/Themes/DefaultThemeTest.php b/apps/theming/tests/Themes/DefaultThemeTest.php index 0d86a8d6b28..7e823cb4843 100644 --- a/apps/theming/tests/Themes/DefaultThemeTest.php +++ b/apps/theming/tests/Themes/DefaultThemeTest.php @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -namespace OCA\Theming\Tests\Service; +namespace OCA\Theming\Tests\Themes; use OCA\Theming\AppInfo\Application; use OCA\Theming\ImageManager; @@ -36,9 +36,8 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUserSession; use PHPUnit\Framework\MockObject\MockObject; -use Test\TestCase; -class DefaultThemeTest extends TestCase { +class DefaultThemeTest extends AccessibleThemeTestCase { /** @var ThemingDefaults|MockObject */ private $themingDefaults; /** @var IUserSession|MockObject */ @@ -54,8 +53,6 @@ class DefaultThemeTest extends TestCase { /** @var IAppManager|MockObject */ private $appManager; - private DefaultTheme $defaultTheme; - protected function setUp(): void { $this->themingDefaults = $this->createMock(ThemingDefaults::class); $this->userSession = $this->createMock(IUserSession::class); @@ -65,7 +62,7 @@ class DefaultThemeTest extends TestCase { $this->l10n = $this->createMock(IL10N::class); $this->appManager = $this->createMock(IAppManager::class); - $util = new Util( + $this->util = new Util( $this->config, $this->appManager, $this->createMock(IAppData::class), @@ -101,8 +98,8 @@ class DefaultThemeTest extends TestCase { return "/$app/img/$filename"; }); - $this->defaultTheme = new DefaultTheme( - $util, + $this->theme = new DefaultTheme( + $this->util, $this->themingDefaults, $this->userSession, $this->urlGenerator, @@ -117,31 +114,31 @@ class DefaultThemeTest extends TestCase { public function testGetId() { - $this->assertEquals('default', $this->defaultTheme->getId()); + $this->assertEquals('default', $this->theme->getId()); } public function testGetType() { - $this->assertEquals(ITheme::TYPE_THEME, $this->defaultTheme->getType()); + $this->assertEquals(ITheme::TYPE_THEME, $this->theme->getType()); } public function testGetTitle() { - $this->assertEquals('System default theme', $this->defaultTheme->getTitle()); + $this->assertEquals('System default theme', $this->theme->getTitle()); } public function testGetEnableLabel() { - $this->assertEquals('Enable the system default', $this->defaultTheme->getEnableLabel()); + $this->assertEquals('Enable the system default', $this->theme->getEnableLabel()); } public function testGetDescription() { - $this->assertEquals('Using the default system appearance.', $this->defaultTheme->getDescription()); + $this->assertEquals('Using the default system appearance.', $this->theme->getDescription()); } public function testGetMediaQuery() { - $this->assertEquals('', $this->defaultTheme->getMediaQuery()); + $this->assertEquals('', $this->theme->getMediaQuery()); } public function testGetCustomCss() { - $this->assertEquals('', $this->defaultTheme->getCustomCss()); + $this->assertEquals('', $this->theme->getCustomCss()); } /** @@ -151,7 +148,7 @@ class DefaultThemeTest extends TestCase { public function testThemindDisabledFallbackCss() { // Generate variables $variables = ''; - foreach ($this->defaultTheme->getCSSVariables() as $variable => $value) { + foreach ($this->theme->getCSSVariables() as $variable => $value) { $variables .= " $variable: $value;" . PHP_EOL; }; |