mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 17:07:33 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@ -22,7 +22,7 @@ class BaseConsoleTest extends TestCase
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function renderColoredString()
|
||||
public function renderColoredString(): void
|
||||
{
|
||||
$data = '%yfoo';
|
||||
$actual = BaseConsole::renderColoredString($data);
|
||||
@ -37,7 +37,7 @@ class BaseConsoleTest extends TestCase
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function ansiColorizedSubstr_withoutColors()
|
||||
public function ansiColorizedSubstr_withoutColors(): void
|
||||
{
|
||||
$str = 'FooBar';
|
||||
|
||||
@ -62,7 +62,7 @@ class BaseConsoleTest extends TestCase
|
||||
* @param $length
|
||||
* @param $expected
|
||||
*/
|
||||
public function ansiColorizedSubstr_withColors($str, $start, $length, $expected)
|
||||
public function ansiColorizedSubstr_withColors($str, $start, $length, $expected): void
|
||||
{
|
||||
$ansiStr = BaseConsole::renderColoredString($str);
|
||||
|
||||
@ -82,7 +82,7 @@ class BaseConsoleTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function testAnsiStrlen()
|
||||
public function testAnsiStrlen(): void
|
||||
{
|
||||
$this->assertSame(3, BaseConsole::ansiStrlen('Foo'));
|
||||
$this->assertSame(3, BaseConsole::ansiStrlen(BaseConsole::renderColoredString('Bar%y')));
|
||||
|
||||
Reference in New Issue
Block a user