Skip to content

Commit 228f986

Browse files
committed
Compatiblility with PHPUnit v5
1 parent 96121df commit 228f986

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
"react/stream": "~0.4.0|~0.3.0"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": "^4.8"
23+
"phpunit/phpunit": "^5.0 || ^4.8"
2424
}
2525
}

tests/BufferedChannelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class BufferedChannelTest extends TestCase
66
{
77
public function testNumberOfWritesToStream()
88
{
9-
$stream = $this->getMock('React\Stream\WritableStreamInterface');
9+
$stream = $this->getMockBuilder('React\Stream\WritableStreamInterface')->getMock();
1010

1111
$called = 0;
1212
$stream->expects($this->any())->method('write')->will($this->returnCallback(function () use (&$called) {
@@ -44,7 +44,7 @@ public function testNumberOfWritesToStream()
4444

4545
public function testResultingStreamBuffer()
4646
{
47-
$stream = $this->getMock('React\Stream\WritableStreamInterface');
47+
$stream = $this->getMockBuilder('React\Stream\WritableStreamInterface')->getMock();
4848

4949
$buffered = '';
5050
$stream->expects($this->any())->method('write')->will($this->returnCallback(function ($data) use (&$buffered) {

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function expectCallableOnce()
2020
*/
2121
protected function createCallableMock()
2222
{
23-
return $this->getMock('CallableStub');
23+
return $this->getMockBuilder('CallableStub')->getMock();
2424
}
2525
}
2626

0 commit comments

Comments
 (0)