Skip to content

Commit 61e3e65

Browse files
authored
Merge pull request #120 from gabriel-caruso/phpunit
Forward compatibility with PHPUnit 6 and PHPUnit 5
2 parents 49ac483 + d8ae700 commit 61e3e65

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"php": ">=5.4.0"
88
},
99
"require-dev": {
10-
"phpunit/phpunit": "~4.8"
10+
"phpunit/phpunit": "~4.8.35 || ^5.7 || ^6.4"
1111
},
1212
"suggest": {
1313
"ext-libevent": ">=0.1.0 for LibEventLoop and PHP5 only",

tests/StreamSelectLoopTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ protected function forkSendSignal($signal)
154154
public function testSmallTimerInterval()
155155
{
156156
/** @var StreamSelectLoop|\PHPUnit_Framework_MockObject_MockObject $loop */
157-
$loop = $this->getMock('React\EventLoop\StreamSelectLoop', ['streamSelect']);
157+
$loop = $this->getMockBuilder('React\EventLoop\StreamSelectLoop')
158+
->setMethods(['streamSelect'])
159+
->getMock();
158160
$loop
159161
->expects($this->at(0))
160162
->method('streamSelect')

tests/TestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
namespace React\Tests\EventLoop;
44

5+
use PHPUnit\Framework\TestCase as BaseTestCase;
56
use React\EventLoop\LoopInterface;
67

7-
class TestCase extends \PHPUnit_Framework_TestCase
8+
class TestCase extends BaseTestCase
89
{
910
protected function expectCallableExactly($amount)
1011
{

0 commit comments

Comments
 (0)
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