Voidify setThemeCookie()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
70f7682425
commit
2d4d0c5ce5
@ -15515,11 +15515,6 @@ parameters:
|
||||
count: 1
|
||||
path: tests/unit/Table/TableTest.php
|
||||
|
||||
-
|
||||
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
path: tests/unit/Theme/ThemeManagerTest.php
|
||||
|
||||
-
|
||||
message: "#^Casting to int something that's already int\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -174,7 +174,7 @@ class ThemeManager
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setThemeCookie(): true
|
||||
public function setThemeCookie(): void
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
$config->setCookie(
|
||||
@ -190,8 +190,6 @@ class ThemeManager
|
||||
// force a change of a dummy session variable to avoid problems
|
||||
// with the caching of phpmyadmin.css.php
|
||||
$config->set('theme-update', $this->theme->id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function loadThemes(): void
|
||||
|
||||
@ -67,8 +67,9 @@ class ThemeManagerTest extends AbstractTestCase
|
||||
public function testSetThemeCookie(): void
|
||||
{
|
||||
$tm = new ThemeManager();
|
||||
self::assertTrue(
|
||||
$tm->setThemeCookie(),
|
||||
$tm->setThemeCookie();
|
||||
self::assertNotFalse(
|
||||
$tm->getThemeCookie(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user