Add void return to method in tests. (#20602)

This commit is contained in:
Wilmer Arambula
2025-10-14 06:37:35 -03:00
committed by GitHub
parent 30824c5dcf
commit d71f7309ae
249 changed files with 2749 additions and 2538 deletions

View File

@@ -8,6 +8,7 @@
namespace yiiunit\framework\web\session;
use yiiunit\TestCase;
use Yii;
use yii\caching\FileCache;
use yii\web\CacheSession;
@@ -15,7 +16,7 @@ use yii\web\CacheSession;
/**
* @group web
*/
class CacheSessionTest extends \yiiunit\TestCase
class CacheSessionTest extends TestCase
{
use SessionTestTrait;
@@ -26,7 +27,7 @@ class CacheSessionTest extends \yiiunit\TestCase
Yii::$app->set('cache', new FileCache());
}
public function testCacheSession()
public function testCacheSession(): void
{
$session = new CacheSession();
@@ -36,7 +37,7 @@ class CacheSessionTest extends \yiiunit\TestCase
$this->assertEquals('', $session->readSession('test'));
}
public function testInvalidCache()
public function testInvalidCache(): void
{
$this->expectException('\Exception');
new CacheSession(['cache' => 'invalid']);
@@ -45,7 +46,7 @@ class CacheSessionTest extends \yiiunit\TestCase
/**
* @see https://github.com/yiisoft/yii2/issues/13537
*/
public function testNotWrittenSessionDestroying()
public function testNotWrittenSessionDestroying(): void
{
$session = new CacheSession();
@@ -55,12 +56,12 @@ class CacheSessionTest extends \yiiunit\TestCase
$this->assertTrue($session->destroySession($session->getId()));
}
public function testInitUseStrictMode()
public function testInitUseStrictMode(): void
{
$this->initStrictModeTest(CacheSession::className());
}
public function testUseStrictMode()
public function testUseStrictMode(): void
{
$this->useStrictModeTest(CacheSession::className());
}