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;
use SplStack;
use yii\web\XmlResponseFormatter;
use yiiunit\framework\web\stubs\ModelStub;
@@ -93,7 +94,7 @@ class XmlResponseFormatterTest extends FormatterTest
{
$expectedXmlForStack = '';
$postsStack = new \SplStack();
$postsStack = new SplStack();
$postsStack->push(new Post(915, 'record1'));
$expectedXmlForStack = '<Post><id>915</id><title>record1</title></Post>' .
@@ -135,7 +136,7 @@ class XmlResponseFormatterTest extends FormatterTest
]);
}
public function testCustomRootTag()
public function testCustomRootTag(): void
{
$rootTag = 'custom';
$formatter = $this->getFormatterInstance([
@@ -147,7 +148,7 @@ class XmlResponseFormatterTest extends FormatterTest
$this->assertEquals($this->xmlHead . "<$rootTag>1</$rootTag>\n", $this->response->content);
}
public function testRootTagRemoval()
public function testRootTagRemoval(): void
{
$formatter = $this->getFormatterInstance([
'rootTag' => null,
@@ -158,7 +159,7 @@ class XmlResponseFormatterTest extends FormatterTest
$this->assertEquals($this->xmlHead . "1\n", $this->response->content);
}
public function testNoObjectTags()
public function testNoObjectTags(): void
{
$formatter = $this->getFormatterInstance([
'useObjectTags' => false,
@@ -169,7 +170,7 @@ class XmlResponseFormatterTest extends FormatterTest
$this->assertEquals($this->xmlHead . "<response><id>123</id><title>abc</title></response>\n", $this->response->content);
}
public function testObjectTagToLowercase()
public function testObjectTagToLowercase(): void
{
$formatter = $this->getFormatterInstance(['objectTagToLowercase' => true]);