1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 04:37:38 +02:00
This commit is contained in:
Jordi Boggiano
2014-10-17 19:12:45 +01:00
parent 940cbe15ab
commit b738a6c04c
23 changed files with 14 additions and 31 deletions

View File

@@ -18,7 +18,6 @@ use Monolog\Logger;
*/ */
class LogEntriesHandler extends SocketHandler class LogEntriesHandler extends SocketHandler
{ {
/** /**
* @var string * @var string
*/ */
@@ -53,5 +52,4 @@ class LogEntriesHandler extends SocketHandler
{ {
return $this->logToken . ' ' . $record['formatted']; return $this->logToken . ' ' . $record['formatted'];
} }
} }

View File

@@ -18,5 +18,4 @@ namespace Monolog\Handler;
*/ */
class MissingExtensionException extends \Exception class MissingExtensionException extends \Exception
{ {
} }

View File

@@ -281,5 +281,4 @@ class SocketHandler extends AbstractProcessingHandler
throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)");
} }
} }
} }

View File

@@ -60,5 +60,4 @@ abstract class MemoryProcessor
return $bytes . ' B'; return $bytes . ' B';
} }
} }

View File

@@ -41,7 +41,7 @@ class WebProcessor
public function __construct($serverData = null, array $extraFields = null) public function __construct($serverData = null, array $extraFields = null)
{ {
if (null === $serverData) { if (null === $serverData) {
$this->serverData =& $_SERVER; $this->serverData = &$_SERVER;
} elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) {
$this->serverData = $serverData; $this->serverData = $serverData;
} else { } else {

View File

@@ -115,7 +115,6 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertArrayHasKey('_CTXfrom', $message_array); $this->assertArrayHasKey('_CTXfrom', $message_array);
$this->assertEquals('logger', $message_array['_CTXfrom']); $this->assertEquals('logger', $message_array['_CTXfrom']);
} }
/** /**
@@ -144,7 +143,6 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals("/some/file/in/dir.php", $message->getFile()); $this->assertEquals("/some/file/in/dir.php", $message->getFile());
$this->assertEquals("56", $message->getLine()); $this->assertEquals("56", $message->getLine());
} }
/** /**

View File

@@ -65,7 +65,6 @@ class JsonFormatterTest extends TestCase
*/ */
public function testFormatBatchNewlines() public function testFormatBatchNewlines()
{ {
$formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES); $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES);
$records = $expected = array( $records = $expected = array(
$this->getRecord(Logger::WARNING), $this->getRecord(Logger::WARNING),

View File

@@ -15,7 +15,6 @@ use Monolog\Logger;
class LogstashFormatterTest extends \PHPUnit_Framework_TestCase class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
{ {
/** /**
* @covers Monolog\Formatter\LogstashFormatter::format * @covers Monolog\Formatter\LogstashFormatter::format
*/ */
@@ -102,7 +101,6 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertArrayHasKey('CTXfrom', $message_array); $this->assertArrayHasKey('CTXfrom', $message_array);
$this->assertEquals('logger', $message_array['CTXfrom']); $this->assertEquals('logger', $message_array['CTXfrom']);
} }
/** /**
@@ -239,7 +237,6 @@ class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertArrayHasKey('CTXfrom', $message); $this->assertArrayHasKey('CTXfrom', $message);
$this->assertEquals('logger', $message['CTXfrom']); $this->assertEquals('logger', $message['CTXfrom']);
} }
/** /**

View File

@@ -64,7 +64,6 @@ EOF;
$this->assertEquals($expected, $this->generateScript()); $this->assertEquals($expected, $this->generateScript());
} }
public function testAutolabel() public function testAutolabel()
{ {
$handler = new BrowserConsoleHandler(); $handler = new BrowserConsoleHandler();

View File

@@ -22,7 +22,6 @@ function error_log()
class ErrorLogHandlerTest extends TestCase class ErrorLogHandlerTest extends TestCase
{ {
protected function setUp() protected function setUp()
{ {
$GLOBALS['error_log'] = array(); $GLOBALS['error_log'] = array();

View File

@@ -73,7 +73,6 @@ class FleepHookHandlerTest extends TestCase
$actual = $handlerFormatter->format($record); $actual = $handlerFormatter->format($record);
$this->assertEquals($expected, $actual, 'Empty context and extra arrays should not be rendered'); $this->assertEquals($expected, $actual, 'Empty context and extra arrays should not be rendered');
} }
/** /**
@@ -83,5 +82,4 @@ class FleepHookHandlerTest extends TestCase
{ {
$this->assertEquals('ssl://' . FleepHookHandler::FLEEP_HOST . ':443', $this->handler->getConnectionString()); $this->assertEquals('ssl://' . FleepHookHandler::FLEEP_HOST . ':443', $this->handler->getConnectionString());
} }
} }

View File

@@ -65,7 +65,6 @@ class GelfHandlerTest extends TestCase
$handler = $this->getHandler($messagePublisher); $handler = $this->getHandler($messagePublisher);
$handler->handle($record); $handler->handle($record);
} }
public function testWarning() public function testWarning()
@@ -114,6 +113,5 @@ class GelfHandlerTest extends TestCase
$handler = $this->getHandler($messagePublisher); $handler = $this->getHandler($messagePublisher);
$handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX'));
$handler->handle($record); $handler->handle($record);
} }
} }

View File

@@ -20,7 +20,6 @@ use Monolog\Logger;
*/ */
class HipChatHandlerTest extends TestCase class HipChatHandlerTest extends TestCase
{ {
private $res; private $res;
private $handler; private $handler;

View File

@@ -58,6 +58,8 @@ class MongoDBHandlerTest extends TestCase
if (!class_exists('Mongo')) { if (!class_exists('Mongo')) {
class Mongo class Mongo
{ {
public function selectCollection() {} public function selectCollection()
{
}
} }
} }

View File

@@ -22,7 +22,6 @@ use Monolog\Logger;
*/ */
class PushoverHandlerTest extends TestCase class PushoverHandlerTest extends TestCase
{ {
private $res; private $res;
private $handler; private $handler;

View File

@@ -279,5 +279,4 @@ class SocketHandlerTest extends TestCase
$this->handler->setFormatter($this->getIdentityFormatter()); $this->handler->setFormatter($this->getIdentityFormatter());
} }
} }

View File

@@ -10,6 +10,7 @@
*/ */
namespace Monolog\Handler; namespace Monolog\Handler;
use Monolog\Logger; use Monolog\Logger;
class SyslogHandlerTest extends \PHPUnit_Framework_TestCase class SyslogHandlerTest extends \PHPUnit_Framework_TestCase

View File

@@ -90,7 +90,8 @@ class WhatFailureGroupHandlerTest extends TestCase
/** /**
* @covers Monolog\Handler\WhatFailureGroupHandler::handle * @covers Monolog\Handler\WhatFailureGroupHandler::handle
*/ */
public function testHandleException() { public function testHandleException()
{
$test = new TestHandler(); $test = new TestHandler();
$exception = new ExceptionTestHandler(); $exception = new ExceptionTestHandler();
$handler = new WhatFailureGroupHandler(array($exception, $test, $exception)); $handler = new WhatFailureGroupHandler(array($exception, $test, $exception));
@@ -111,7 +112,8 @@ class ExceptionTestHandler extends TestHandler
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function handle(array $record) { public function handle(array $record)
{
parent::handle($record); parent::handle($record);
throw new \Exception("ExceptionTestHandler::handle"); throw new \Exception("ExceptionTestHandler::handle");

View File

@@ -11,8 +11,6 @@
namespace Monolog\Processor; namespace Monolog\Processor;
use Monolog\Processor\PsrLogMessageProcessor;
class PsrLogMessageProcessorTest extends \PHPUnit_Framework_TestCase class PsrLogMessageProcessorTest extends \PHPUnit_Framework_TestCase
{ {
/** /**