public function testHandleBufferLimit() { $test = new TestHandler(); $handler = new BufferHandler($test, 2); $handler->handle($this->getRecord(Logger::DEBUG)); $handler->handle($this->getRecord(Logger::DEBUG)); $handler->handle($this->getRecord(Logger::INFO)); $handler->handle($this->getRecord(Logger::WARNING)); $handler->close(); $this->assertTrue($test->hasWarningRecords()); $this->assertTrue($test->hasInfoRecords()); $this->assertFalse($test->hasDebugRecords()); }
public function flushBuffer() { $this->bufferHandler->close(); }