32 $this->assertFalse(
$test->hasDebugRecords());
33 $this->assertFalse(
$test->hasInfoRecords());
35 $this->assertTrue(
$test->hasInfoRecords());
36 $this->assertTrue(count(
$test->getRecords()) === 2);
49 $this->shutdownCheckHandler =
$test;
50 register_shutdown_function(array($this,
'checkPropagation'));
55 if (!$this->shutdownCheckHandler->hasWarningRecords() || !$this->shutdownCheckHandler->hasDebugRecords()) {
56 echo
'!!! BufferHandlerTest::testPropagatesRecordsAtEndOfRequest failed to verify that the messages have been propagated' . PHP_EOL;
73 $this->assertTrue(
$test->hasWarningRecords());
74 $this->assertTrue(
$test->hasInfoRecords());
75 $this->assertFalse(
$test->hasDebugRecords());
90 $this->assertFalse(
$test->hasDebugRecords());
91 $this->assertCount(0,
$test->getRecords());
95 $this->assertTrue(
$test->hasDebugRecords());
96 $this->assertCount(3,
$test->getRecords());
100 $this->assertCount(3,
$test->getRecords());
103 $this->assertCount(5,
$test->getRecords());
104 $this->assertTrue(
$test->hasWarningRecords());
105 $this->assertTrue(
$test->hasInfoRecords());
120 $this->assertTrue(
$test->hasWarningRecords());
121 $this->assertTrue(
$test->hasInfoRecords());
122 $this->assertFalse(
$test->hasDebugRecords());
135 $this->assertTrue(
$test->hasInfoRecords());
136 $this->assertTrue(
$test->hasDebugRecords());
137 $this->assertFalse(
$test->hasWarningRecords());
147 $handler->pushProcessor(
function ($record) {
148 $record[
'extra'][
'foo'] =
true;
154 $this->assertTrue(
$test->hasWarningRecords());
156 $this->assertTrue(
$records[0][
'extra'][
'foo']);
testFlush()
@covers Monolog\Handler\BufferHandler::flush
testHandleBufferLimitWithFlushOnOverflow()
@covers Monolog\Handler\BufferHandler::handle
testPropagatesRecordsAtEndOfRequest()
@covers Monolog\Handler\BufferHandler::close @covers Monolog\Handler\BufferHandler::flush
testHandleBuffers()
@covers Monolog\Handler\BufferHandler::__construct @covers Monolog\Handler\BufferHandler::handle @cov...
testHandleLevel()
@covers Monolog\Handler\BufferHandler::handle
testHandleBufferLimit()
@covers Monolog\Handler\BufferHandler::handle
testHandleUsesProcessors()
@covers Monolog\Handler\BufferHandler::handle
Buffers all records until closing the handler and then pass them as batch.
Used for testing purposes.
const WARNING
Exceptional occurrences that are not errors.
const INFO
Interesting events.
const DEBUG
Detailed debug information.
getRecord($level=Logger::WARNING, $message='test', $context=array())