mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Raise version min PHP 7.3.
This commit is contained in:
@ -24,7 +24,7 @@ class EmailTargetTest extends TestCase
|
||||
/**
|
||||
* Set up mailer.
|
||||
*/
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->mailer = $this->getMockBuilder('yii\\mail\\BaseMailer')
|
||||
@ -38,16 +38,17 @@ class EmailTargetTest extends TestCase
|
||||
public function testInitWithOptionTo()
|
||||
{
|
||||
$target = new EmailTarget(['mailer' => $this->mailer, 'message' => ['to' => 'developer1@example.com']]);
|
||||
$this->assertInternalType('object', $target); // should be no exception during `init()`
|
||||
$this->assertIsObject($target); // should be no exception during `init()`
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \yii\log\EmailTarget::init()
|
||||
* @expectedException \yii\base\InvalidConfigException
|
||||
* @expectedExceptionMessage The "to" option must be set for EmailTarget::message.
|
||||
*/
|
||||
public function testInitWithoutOptionTo()
|
||||
{
|
||||
$this->expectException(\yii\base\InvalidConfigException::class);
|
||||
$this->expectExceptionMessage('The "to" option must be set for EmailTarget::message.');
|
||||
|
||||
new EmailTarget(['mailer' => $this->mailer]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user