32 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler', array(
Logger::WARNING,
false));
34 $this->assertEquals(
false, $handler->getBubble());
37 $handler->setBubble(
true);
40 $this->assertEquals(
true, $handler->getBubble());
41 $this->assertSame($formatter, $handler->getFormatter());
49 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler');
50 $handler->expects($this->exactly(2))
60 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler', array(
Logger::WARNING,
false));
61 $this->assertTrue($handler->isHandling($this->getRecord()));
62 $this->assertFalse($handler->isHandling($this->getRecord(
Logger::DEBUG)));
70 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler', array(
'warning',
false));
71 $this->assertFalse($handler->isHandling($this->getRecord(
Logger::DEBUG)));
72 $handler->setLevel(
'debug');
73 $this->assertTrue($handler->isHandling($this->getRecord(
Logger::DEBUG)));
82 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler');
83 $this->assertInstanceOf(
'Monolog\Formatter\LineFormatter', $handler->getFormatter());
93 $logger = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler');
97 $logger->pushProcessor($processor1);
98 $logger->pushProcessor($processor2);
100 $this->assertEquals($processor2, $logger->popProcessor());
101 $this->assertEquals($processor1, $logger->popProcessor());
102 $logger->popProcessor();
111 $handler = $this->getMockForAbstractClass(
'Monolog\Handler\AbstractHandler');
113 $handler->pushProcessor(
new \stdClass());
testConstructAndGetSet()
@covers Monolog\Handler\AbstractHandler::__construct @covers Monolog\Handler\AbstractHandler::getLeve...
testGetFormatterInitializesDefault()
@covers Monolog\Handler\AbstractHandler::getFormatter @covers Monolog\Handler\AbstractHandler::getDef...
testIsHandling()
@covers Monolog\Handler\AbstractHandler::isHandling
testPushPopProcessor()
@covers Monolog\Handler\AbstractHandler::pushProcessor @covers Monolog\Handler\AbstractHandler::popPr...
testPushProcessorWithNonCallable()
@covers Monolog\Handler\AbstractHandler::pushProcessor @expectedException InvalidArgumentException
testHandlesPsrStyleLevels()
@covers Monolog\Handler\AbstractHandler::__construct
testHandleBatch()
@covers Monolog\Handler\AbstractHandler::handleBatch
const ERROR
Runtime errors.
const WARNING
Exceptional occurrences that are not errors.
const DEBUG
Detailed debug information.
Injects url/method and remote IP of the current web request in all records.
getRecord($level=Logger::WARNING, $message='test', $context=array())