mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Raise version min PHP 7.3.
This commit is contained in:
@ -19,7 +19,7 @@ use yiiunit\TestCase;
|
||||
*/
|
||||
class BaseMailerTest extends TestCase
|
||||
{
|
||||
public function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->mockApplication([
|
||||
'components' => [
|
||||
@ -32,7 +32,7 @@ class BaseMailerTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$filePath = $this->getTestFilePath();
|
||||
if (file_exists($filePath)) {
|
||||
@ -85,7 +85,7 @@ class BaseMailerTest extends TestCase
|
||||
];
|
||||
$mailer->setView($viewConfig);
|
||||
$view = $mailer->getView();
|
||||
$this->assertInternalType('object', $view, 'Unable to setup view via config!');
|
||||
$this->assertIsObject($view, 'Unable to setup view via config!');
|
||||
$this->assertEquals($viewConfig['params'], $view->params, 'Unable to configure view via config array!');
|
||||
}
|
||||
|
||||
@ -96,14 +96,14 @@ class BaseMailerTest extends TestCase
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
$view = $mailer->getView();
|
||||
$this->assertInternalType('object', $view, 'Unable to get default view!');
|
||||
$this->assertIsObject($view, 'Unable to get default view!');
|
||||
}
|
||||
|
||||
public function testCreateMessage()
|
||||
{
|
||||
$mailer = new Mailer();
|
||||
$message = $mailer->compose();
|
||||
$this->assertInternalType('object', $message, 'Unable to create message instance!');
|
||||
$this->assertIsObject($message, 'Unable to create message instance!');
|
||||
$this->assertEquals($mailer->messageClass, get_class($message), 'Invalid message class!');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user