24 $formatter = $this->getMock(
'Monolog\\Formatter\\FormatterInterface');
25 $formatter->expects($this->once())
26 ->method(
'formatBatch');
28 $handler = $this->getMockForAbstractClass(
'Monolog\\Handler\\MailHandler');
29 $handler->expects($this->once())
31 $handler->expects($this->never())
34 $handler->setFormatter($formatter);
50 $handler = $this->getMockForAbstractClass(
'Monolog\\Handler\\MailHandler');
51 $handler->expects($this->never())
63 $handler = $this->getMockForAbstractClass(
'Monolog\\Handler\\MailHandler');
67 $records[0][
'formatted'] =
'['.$record[
'datetime']->format(
'Y-m-d H:i:s').
'] test.WARNING: test [] []'.
"\n";
69 $handler->expects($this->once())
73 $handler->handle($record);
testHandleBatch()
@covers Monolog\Handler\MailHandler::handleBatch
testHandle()
@covers Monolog\Handler\MailHandler::write
testHandleBatchNotSendsMailIfMessagesAreBelowLevel()
@covers Monolog\Handler\MailHandler::handleBatch
const ERROR
Runtime errors.
const INFO
Interesting events.
const DEBUG
Detailed debug information.
getRecord($level=Logger::WARNING, $message='test', $context=array())