diff options
Diffstat (limited to 'tests/Monolog/Handler/PushoverHandlerTest.php')
-rw-r--r-- | tests/Monolog/Handler/PushoverHandlerTest.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/Monolog/Handler/PushoverHandlerTest.php b/tests/Monolog/Handler/PushoverHandlerTest.php index 56df474..6a295c9 100644 --- a/tests/Monolog/Handler/PushoverHandlerTest.php +++ b/tests/Monolog/Handler/PushoverHandlerTest.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; /** @@ -103,7 +103,7 @@ class PushoverHandlerTest extends TestCase public function testWriteToMultipleUsers() { - $this->createHandler('myToken', array('userA', 'userB')); + $this->createHandler('myToken', ['userA', 'userB']); $this->handler->handle($this->getRecord(Logger::EMERGENCY, 'test1')); fseek($this->res, 0); $content = fread($this->res, 1024); @@ -114,15 +114,14 @@ class PushoverHandlerTest extends TestCase private function createHandler($token = 'myToken', $user = 'myUser', $title = 'Monolog') { - $constructorArgs = array($token, $user, $title); + $constructorArgs = [$token, $user, $title]; $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\PushoverHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); + $this->handler = $this->getMockBuilder('Monolog\Handler\PushoverHandler') + ->setConstructorArgs($constructorArgs) + ->setMethods(['fsockopen', 'streamSetTimeout', 'closeSocket']) + ->getMock(); - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty = new \ReflectionProperty('Monolog\Handler\SocketHandler', 'connectionString'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->handler, 'localhost:1234'); |