mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-15 19:01:19 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
namespace yiiunit\framework\widgets;
|
||||
|
||||
use yiiunit\TestCase;
|
||||
use Yii;
|
||||
use yii\base\View;
|
||||
use yii\caching\ArrayCache;
|
||||
@@ -16,7 +17,7 @@ use yii\caching\ArrayCache;
|
||||
* @group widgets
|
||||
* @group caching
|
||||
*/
|
||||
class FragmentCacheTest extends \yiiunit\TestCase
|
||||
class FragmentCacheTest extends TestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
@@ -27,7 +28,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function testCacheEnabled()
|
||||
public function testCacheEnabled(): void
|
||||
{
|
||||
$expectedLevel = ob_get_level();
|
||||
ob_start();
|
||||
@@ -47,7 +48,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
$this->assertEquals($expectedLevel, ob_get_level(), 'Output buffer not closed correctly.');
|
||||
}
|
||||
|
||||
public function testCacheDisabled1()
|
||||
public function testCacheDisabled1(): void
|
||||
{
|
||||
$expectedLevel = ob_get_level();
|
||||
ob_start();
|
||||
@@ -69,7 +70,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
$this->assertEquals($expectedLevel, ob_get_level(), 'Output buffer not closed correctly.');
|
||||
}
|
||||
|
||||
public function testCacheDisabled2()
|
||||
public function testCacheDisabled2(): void
|
||||
{
|
||||
$expectedLevel = ob_get_level();
|
||||
ob_start();
|
||||
@@ -91,7 +92,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
$this->assertEquals($expectedLevel, ob_get_level(), 'Output buffer not closed correctly.');
|
||||
}
|
||||
|
||||
public function testSingleDynamicFragment()
|
||||
public function testSingleDynamicFragment(): void
|
||||
{
|
||||
Yii::$app->params['counter'] = 0;
|
||||
|
||||
@@ -122,7 +123,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testMultipleDynamicFragments()
|
||||
public function testMultipleDynamicFragments(): void
|
||||
{
|
||||
Yii::$app->params['counter'] = 0;
|
||||
|
||||
@@ -155,7 +156,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testNestedDynamicFragments()
|
||||
public function testNestedDynamicFragments(): void
|
||||
{
|
||||
Yii::$app->params['counter'] = 0;
|
||||
|
||||
@@ -195,7 +196,7 @@ class FragmentCacheTest extends \yiiunit\TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testVariations()
|
||||
public function testVariations(): void
|
||||
{
|
||||
$this->setOutputCallback(function ($output) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user