Skip to content

Commit ca3de3e

Browse files
committed
Compatiblility with PHPUnit v5
1 parent ba674c4 commit ca3de3e

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
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": "^4.8"
26+
"phpunit/phpunit": "^5.0 || ^4.8"
2727
}
2828
}

tests/FactoryTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
use React\Socket\ConnectionInterface;
4-
53
use Clue\React\Redis\Factory;
64
use React\Promise;
75

@@ -13,8 +11,8 @@ class FactoryTest extends TestCase
1311

1412
public function setUp()
1513
{
16-
$this->loop = $this->getMock('React\EventLoop\LoopInterface');
17-
$this->connector = $this->getMock('React\SocketClient\ConnectorInterface');
14+
$this->loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock();
15+
$this->connector = $this->getMockBuilder('React\SocketClient\ConnectorInterface')->getMock();
1816
$this->factory = new Factory($this->loop, $this->connector);
1917
}
2018

tests/FunctionalTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use React\Stream\Stream;
4-
use React\Stream\ReadableStream;
54
use Clue\React\Redis\Factory;
65
use Clue\React\Redis\StreamingClient;
76
use React\Promise\Deferred;

tests/StreamingClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class StreamingClientTest extends TestCase
1919
public function setUp()
2020
{
2121
$this->stream = $this->getMockBuilder('React\Stream\Stream')->disableOriginalConstructor()->setMethods(array('write', 'close', 'resume', 'pause'))->getMock();
22-
$this->parser = $this->getMock('Clue\Redis\Protocol\Parser\ParserInterface');
23-
$this->serializer = $this->getMock('Clue\Redis\Protocol\Serializer\SerializerInterface');
22+
$this->parser = $this->getMockBuilder('Clue\Redis\Protocol\Parser\ParserInterface')->getMock();
23+
$this->serializer = $this->getMockBuilder('Clue\Redis\Protocol\Serializer\SerializerInterface')->getMock();
2424

2525
$this->client = new StreamingClient($this->stream, $this->parser, $this->serializer);
2626
}

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function expectCallableOnceParameter($type)
4949
*/
5050
protected function createCallableMock()
5151
{
52-
return $this->getMock('CallableStub');
52+
return $this->getMockBuilder('CallableStub')->getMock();
5353
}
5454

5555
protected function expectPromiseResolve($promise)

0 commit comments

Comments
 (0)