mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-21 20:35:17 +02:00
Convert level/levelName to enums (#1656)
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Level;
|
||||
use Monolog\Test\TestCase;
|
||||
|
||||
class MailHandlerTest extends TestCase
|
||||
@@ -42,15 +42,15 @@ class MailHandlerTest extends TestCase
|
||||
public function testHandleBatchNotSendsMailIfMessagesAreBelowLevel()
|
||||
{
|
||||
$records = [
|
||||
$this->getRecord(Logger::DEBUG, 'debug message 1'),
|
||||
$this->getRecord(Logger::DEBUG, 'debug message 2'),
|
||||
$this->getRecord(Logger::INFO, 'information'),
|
||||
$this->getRecord(Level::Debug, 'debug message 1'),
|
||||
$this->getRecord(Level::Debug, 'debug message 2'),
|
||||
$this->getRecord(Level::Info, 'information'),
|
||||
];
|
||||
|
||||
$handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler');
|
||||
$handler->expects($this->never())
|
||||
->method('send');
|
||||
$handler->setLevel(Logger::ERROR);
|
||||
$handler->setLevel(Level::Error);
|
||||
|
||||
$handler->handleBatch($records);
|
||||
}
|
||||
|
Reference in New Issue
Block a user