Skip to content

Commit f33c521

Browse files
committed
Forward compatibility with PHPUnit 7 and PHPUnit 6
1 parent c1232de commit f33c521

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
},
2424
"require-dev": {
2525
"clue/block-react": "^1.1",
26-
"phpunit/phpunit": "^5.0 || ^4.8"
26+
"phpunit/phpunit": "^7.0 || ^6.0 || ^5.0 || ^4.8.35"
2727
}
2828
}

tests/FactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function setUp()
1616
$this->factory = new Factory($this->loop, $this->connector);
1717
}
1818

19+
/**
20+
* @doesNotPerformAssertions
21+
*/
1922
public function testCtor()
2023
{
2124
$this->factory = new Factory($this->loop);

tests/StreamingClientTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public function testReceiveThrowMessageEmitsErrorEvent()
7373
$this->stream->emit('data', array('message'));
7474
}
7575

76+
/**
77+
* @doesNotPerformAssertions
78+
*/
7679
public function testDefaultCtor()
7780
{
7881
$client = new StreamingClient($this->stream);
@@ -158,9 +161,11 @@ public function testClosingMultipleTimesEmitsOnce()
158161
$this->client->close();
159162
}
160163

164+
/**
165+
* @expectedException UnderflowException
166+
*/
161167
public function testReceivingUnexpectedMessageThrowsException()
162168
{
163-
$this->setExpectedException('UnderflowException');
164169
$this->client->handleMessage(new BulkReply('PONG'));
165170
}
166171

tests/bootstrap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

3+
use PHPUnit\Framework\TestCase as BaseTestCase;
4+
35
(include_once __DIR__ . '/../vendor/autoload.php') OR die(PHP_EOL . 'ERROR: composer autoloader not found, run "composer install" or see README for instructions' . PHP_EOL);
46

5-
class TestCase extends PHPUnit_Framework_TestCase
7+
class TestCase extends BaseTestCase
68
{
79
protected function expectCallableOnce()
810
{

0 commit comments

Comments
 (0)