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\caching;
use yii\db\Connection;
use yii\caching\DbCache;
/**
@@ -41,14 +42,14 @@ class DbCacheTest extends CacheTestCase
/**
* @param bool $reset whether to clean up the test database
* @return \yii\db\Connection
* @return Connection
*/
public function getConnection($reset = true)
{
if ($this->_connection === null) {
$databases = self::getParam('databases');
$params = $databases['mysql'];
$db = new \yii\db\Connection();
$db = new Connection();
$db->dsn = $params['dsn'];
$db->username = $params['username'];
$db->password = $params['password'];
@@ -79,7 +80,7 @@ class DbCacheTest extends CacheTestCase
return $this->_cacheInstance;
}
public function testExpire()
public function testExpire(): void
{
$cache = $this->getCacheInstance();
@@ -91,7 +92,7 @@ class DbCacheTest extends CacheTestCase
$this->assertFalse($cache->get('expire_test'));
}
public function testExpireAdd()
public function testExpireAdd(): void
{
$cache = $this->getCacheInstance();
@@ -103,7 +104,7 @@ class DbCacheTest extends CacheTestCase
$this->assertFalse($cache->get('expire_testa'));
}
public function testSynchronousSetWithTheSameKey()
public function testSynchronousSetWithTheSameKey(): void
{
$KEY = 'sync-test-key';
$VALUE = 'sync-test-value';