summaryrefslogtreecommitdiffstats
path: root/tests/Monolog/Handler/NativeMailerHandlerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Monolog/Handler/NativeMailerHandlerTest.php')
-rw-r--r--tests/Monolog/Handler/NativeMailerHandlerTest.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/Monolog/Handler/NativeMailerHandlerTest.php b/tests/Monolog/Handler/NativeMailerHandlerTest.php
index ddf545d..d4aef95 100644
--- a/tests/Monolog/Handler/NativeMailerHandlerTest.php
+++ b/tests/Monolog/Handler/NativeMailerHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -11,7 +11,7 @@
namespace Monolog\Handler;
-use Monolog\TestCase;
+use Monolog\Test\TestCase;
use Monolog\Logger;
use InvalidArgumentException;
@@ -24,7 +24,7 @@ class NativeMailerHandlerTest extends TestCase
{
protected function setUp()
{
- $GLOBALS['mail'] = array();
+ $GLOBALS['mail'] = [];
}
/**
@@ -50,7 +50,7 @@ class NativeMailerHandlerTest extends TestCase
public function testSetterArrayHeaderInjection()
{
$mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org');
- $mailer->addHeader(array("Content-Type: text/html\r\nFrom: faked@attacker.org"));
+ $mailer->addHeader(["Content-Type: text/html\r\nFrom: faked@attacker.org"]);
}
/**
@@ -78,7 +78,8 @@ class NativeMailerHandlerTest extends TestCase
$from = 'receiver@example.org';
$mailer = new NativeMailerHandler($to, $subject, $from);
- $mailer->handleBatch(array());
+ $mailer->setFormatter(new \Monolog\Formatter\LineFormatter);
+ $mailer->handleBatch([]);
// batch is empty, nothing sent
$this->assertEmpty($GLOBALS['mail']);