summaryrefslogtreecommitdiff
path: root/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
commit150f94f051128f367bc89f6b7e5f57eb2a69fc62 (patch)
tree181f454813b310ee97385058c6c6f2e3f34d5fd8 /vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
parent7e85254903c7c0cb49e381f16b18441ea7b058cc (diff)
parent80f7dc77d430774192b929d780f96260066df2ee (diff)
Merge commit '80f7dc'
# Conflicts: # extensions/ArchInterWiki.sql
Diffstat (limited to 'vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php')
-rw-r--r--vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php80
1 files changed, 0 insertions, 80 deletions
diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
deleted file mode 100644
index 24d4f63c..00000000
--- a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/*
- * This file is part of the Monolog package.
- *
- * (c) Jordi Boggiano <j.boggiano@seld.be>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Monolog\Handler;
-
-use Monolog\TestCase;
-use Monolog\Logger;
-use Monolog\Processor\WebProcessor;
-
-class AbstractProcessingHandlerTest extends TestCase
-{
- /**
- * @covers Monolog\Handler\AbstractProcessingHandler::handle
- */
- public function testHandleLowerLevelMessage()
- {
- $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, true));
- $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
- }
-
- /**
- * @covers Monolog\Handler\AbstractProcessingHandler::handle
- */
- public function testHandleBubbling()
- {
- $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, true));
- $this->assertFalse($handler->handle($this->getRecord()));
- }
-
- /**
- * @covers Monolog\Handler\AbstractProcessingHandler::handle
- */
- public function testHandleNotBubbling()
- {
- $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, false));
- $this->assertTrue($handler->handle($this->getRecord()));
- }
-
- /**
- * @covers Monolog\Handler\AbstractProcessingHandler::handle
- */
- public function testHandleIsFalseWhenNotHandled()
- {
- $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, false));
- $this->assertTrue($handler->handle($this->getRecord()));
- $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
- }
-
- /**
- * @covers Monolog\Handler\AbstractProcessingHandler::processRecord
- */
- public function testProcessRecord()
- {
- $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler');
- $handler->pushProcessor(new WebProcessor(array(
- 'REQUEST_URI' => '',
- 'REQUEST_METHOD' => '',
- 'REMOTE_ADDR' => '',
- 'SERVER_NAME' => '',
- 'UNIQUE_ID' => '',
- )));
- $handledRecord = null;
- $handler->expects($this->once())
- ->method('write')
- ->will($this->returnCallback(function ($record) use (&$handledRecord) {
- $handledRecord = $record;
- }))
- ;
- $handler->handle($this->getRecord());
- $this->assertEquals(6, count($handledRecord['extra']));
- }
-}