1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 15:14:14 +02:00
This commit is contained in:
Jordi Boggiano
2016-05-26 20:54:06 +01:00
parent 85e43a5e7b
commit f200e79879
115 changed files with 1138 additions and 1123 deletions

View File

@@ -22,7 +22,7 @@ class WhatFailureGroupHandlerTest extends TestCase
*/
public function testConstructorOnlyTakesHandler()
{
new WhatFailureGroupHandler(array(new TestHandler(), "foo"));
new WhatFailureGroupHandler([new TestHandler(), "foo"]);
}
/**
@@ -31,7 +31,7 @@ class WhatFailureGroupHandlerTest extends TestCase
*/
public function testHandle()
{
$testHandlers = array(new TestHandler(), new TestHandler());
$testHandlers = [new TestHandler(), new TestHandler()];
$handler = new WhatFailureGroupHandler($testHandlers);
$handler->handle($this->getRecord(Logger::DEBUG));
$handler->handle($this->getRecord(Logger::INFO));
@@ -47,9 +47,9 @@ class WhatFailureGroupHandlerTest extends TestCase
*/
public function testHandleBatch()
{
$testHandlers = array(new TestHandler(), new TestHandler());
$testHandlers = [new TestHandler(), new TestHandler()];
$handler = new WhatFailureGroupHandler($testHandlers);
$handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO)));
$handler->handleBatch([$this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO)]);
foreach ($testHandlers as $test) {
$this->assertTrue($test->hasDebugRecords());
$this->assertTrue($test->hasInfoRecords());
@@ -62,7 +62,7 @@ class WhatFailureGroupHandlerTest extends TestCase
*/
public function testIsHandling()
{
$testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING));
$testHandlers = [new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)];
$handler = new WhatFailureGroupHandler($testHandlers);
$this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR)));
$this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING)));
@@ -75,7 +75,7 @@ class WhatFailureGroupHandlerTest extends TestCase
public function testHandleUsesProcessors()
{
$test = new TestHandler();
$handler = new WhatFailureGroupHandler(array($test));
$handler = new WhatFailureGroupHandler([$test]);
$handler->pushProcessor(function ($record) {
$record['extra']['foo'] = true;
@@ -94,7 +94,7 @@ class WhatFailureGroupHandlerTest extends TestCase
{
$test = new TestHandler();
$exception = new ExceptionTestHandler();
$handler = new WhatFailureGroupHandler(array($exception, $test, $exception));
$handler = new WhatFailureGroupHandler([$exception, $test, $exception]);
$handler->pushProcessor(function ($record) {
$record['extra']['foo'] = true;