mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@ -70,7 +70,7 @@ class BaseMailerTest extends TestCase
|
||||
|
||||
// Tests :
|
||||
|
||||
public function testSetupView()
|
||||
public function testSetupView(): void
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
|
||||
@ -93,14 +93,14 @@ class BaseMailerTest extends TestCase
|
||||
/**
|
||||
* @depends testSetupView
|
||||
*/
|
||||
public function testGetDefaultView()
|
||||
public function testGetDefaultView(): void
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
$view = $mailer->getView();
|
||||
$this->assertIsObject($view, 'Unable to get default view!');
|
||||
}
|
||||
|
||||
public function testCreateMessage()
|
||||
public function testCreateMessage(): void
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
$message = $mailer->compose();
|
||||
@ -111,7 +111,7 @@ class BaseMailerTest extends TestCase
|
||||
/**
|
||||
* @depends testCreateMessage
|
||||
*/
|
||||
public function testDefaultMessageConfig()
|
||||
public function testDefaultMessageConfig(): void
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
|
||||
@ -145,7 +145,7 @@ class BaseMailerTest extends TestCase
|
||||
/**
|
||||
* @depends testGetDefaultView
|
||||
*/
|
||||
public function testRender()
|
||||
public function testRender(): void
|
||||
{
|
||||
$mailer = $this->getTestMailComponent();
|
||||
|
||||
@ -164,7 +164,7 @@ class BaseMailerTest extends TestCase
|
||||
/**
|
||||
* @depends testRender
|
||||
*/
|
||||
public function testRenderLayout()
|
||||
public function testRenderLayout(): void
|
||||
{
|
||||
$mailer = $this->getTestMailComponent();
|
||||
|
||||
@ -188,7 +188,7 @@ class BaseMailerTest extends TestCase
|
||||
* @depends testCreateMessage
|
||||
* @depends testRender
|
||||
*/
|
||||
public function testCompose()
|
||||
public function testCompose(): void
|
||||
{
|
||||
$mailer = $this->getTestMailComponent();
|
||||
$mailer->htmlLayout = false;
|
||||
@ -258,7 +258,7 @@ TEXT
|
||||
* @param string $htmlViewFileContent
|
||||
* @param string $expectedTextRendering
|
||||
*/
|
||||
public function testComposePlainTextFallback($i, $htmlViewFileContent, $expectedTextRendering)
|
||||
public function testComposePlainTextFallback($i, $htmlViewFileContent, $expectedTextRendering): void
|
||||
{
|
||||
$mailer = $this->getTestMailComponent();
|
||||
$mailer->htmlLayout = false;
|
||||
@ -275,7 +275,7 @@ TEXT
|
||||
$this->assertEqualsWithoutLE($expectedTextRendering, $message->_textBody, 'Unable to render text!');
|
||||
}
|
||||
|
||||
public function testUseFileTransport()
|
||||
public function testUseFileTransport(): void
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
$this->assertFalse($mailer->useFileTransport);
|
||||
@ -297,7 +297,7 @@ TEXT
|
||||
$this->assertStringEqualsFile($file, $message->toString());
|
||||
}
|
||||
|
||||
public function testBeforeSendEvent()
|
||||
public function testBeforeSendEvent(): void
|
||||
{
|
||||
$message = new Message();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user