mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-16 03:28:56 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user