summaryrefslogtreecommitdiffstats
path: root/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Monolog/Handler/WhatFailureGroupHandlerTest.php')
-rw-r--r--tests/Monolog/Handler/WhatFailureGroupHandlerTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
index 8d37a1f..60f5175 100644
--- a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
+++ b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -11,7 +11,7 @@
namespace Monolog\Handler;
-use Monolog\TestCase;
+use Monolog\Test\TestCase;
use Monolog\Logger;
class WhatFailureGroupHandlerTest extends TestCase
@@ -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;
@@ -112,7 +112,7 @@ class ExceptionTestHandler extends TestHandler
/**
* {@inheritdoc}
*/
- public function handle(array $record)
+ public function handle(array $record): bool
{
parent::handle($record);