From 1b77fa2313fe0366e68bd995e70a3ce35e19a5a9 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Mon, 13 Nov 2017 05:59:17 -0200 Subject: [PATCH 1/2] Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase --- composer.json | 2 +- tests/TestCase.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 67060367..e4c58eb2 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "~4.8.35" }, "suggest": { "ext-libevent": ">=0.1.0 for LibEventLoop and PHP5 only", diff --git a/tests/TestCase.php b/tests/TestCase.php index 0bc26a40..dbdd54ce 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,9 +2,10 @@ namespace React\Tests\EventLoop; +use PHPUnit\Framework\TestCase as BaseTestCase; use React\EventLoop\LoopInterface; -class TestCase extends \PHPUnit_Framework_TestCase +class TestCase extends BaseTestCase { protected function expectCallableExactly($amount) { From d8ae70062d757d106499eab8aea053e92862074a Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 14 Nov 2017 06:09:21 -0200 Subject: [PATCH 2/2] Support PHPUnit 5 and 6 --- composer.json | 2 +- tests/StreamSelectLoopTest.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e4c58eb2..e39df9ab 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.8.35" + "phpunit/phpunit": "~4.8.35 || ^5.7 || ^6.4" }, "suggest": { "ext-libevent": ">=0.1.0 for LibEventLoop and PHP5 only", diff --git a/tests/StreamSelectLoopTest.php b/tests/StreamSelectLoopTest.php index 9927ca2b..1c5cff98 100644 --- a/tests/StreamSelectLoopTest.php +++ b/tests/StreamSelectLoopTest.php @@ -154,7 +154,9 @@ protected function forkSendSignal($signal) public function testSmallTimerInterval() { /** @var StreamSelectLoop|\PHPUnit_Framework_MockObject_MockObject $loop */ - $loop = $this->getMock('React\EventLoop\StreamSelectLoop', ['streamSelect']); + $loop = $this->getMockBuilder('React\EventLoop\StreamSelectLoop') + ->setMethods(['streamSelect']) + ->getMock(); $loop ->expects($this->at(0)) ->method('streamSelect') pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy