File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 "react/promise" : " ~2.1|~1.2"
2424 },
2525 "require-dev" : {
26- "phpunit/phpunit" : " ^4.8"
26+ "phpunit/phpunit" : " ^5.0 || ^ 4.8"
2727 }
2828}
Original file line number Diff line number Diff line change @@ -40,17 +40,17 @@ public function testPromiseExpiredWillBeResolvedOnTimeout()
4040
4141 public function testWillStartLoopTimer ()
4242 {
43- $ loop = $ this ->getMock ('React\EventLoop\LoopInterface ' );
43+ $ loop = $ this ->getMockBuilder ('React\EventLoop\LoopInterface ' )-> getMock ( );
4444 $ loop ->expects ($ this ->once ())->method ('addTimer ' )->with ($ this ->equalTo (0.01 ));
4545
4646 Timer \resolve (0.01 , $ loop );
4747 }
4848
4949 public function testCancellingPromiseWillCancelLoopTimer ()
5050 {
51- $ loop = $ this ->getMock ('React\EventLoop\LoopInterface ' );
51+ $ loop = $ this ->getMockBuilder ('React\EventLoop\LoopInterface ' )-> getMock ( );
5252
53- $ timer = $ this ->getMock ('React\EventLoop\Timer\TimerInterface ' );
53+ $ timer = $ this ->getMockBuilder ('React\EventLoop\Timer\TimerInterface ' )-> getMock ( );
5454 $ loop ->expects ($ this ->once ())->method ('addTimer ' )->will ($ this ->returnValue ($ timer ));
5555
5656 $ promise = Timer \resolve (0.01 , $ loop );
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function testRejectedWillNotStartTimer()
6262
6363 public function testPendingWillRejectOnTimeout ()
6464 {
65- $ promise = $ this ->getMock ('React\Promise\PromiseInterface ' );
65+ $ promise = $ this ->getMockBuilder ('React\Promise\PromiseInterface ' )-> getMock ( );
6666
6767 $ promise = Timer \timeout ($ promise , 0.01 , $ this ->loop );
6868
@@ -73,7 +73,7 @@ public function testPendingWillRejectOnTimeout()
7373
7474 public function testPendingCancellableWillBeCancelledOnTimeout ()
7575 {
76- $ promise = $ this ->getMock ('React\Promise\CancellablePromiseInterface ' );
76+ $ promise = $ this ->getMockBuilder ('React\Promise\CancellablePromiseInterface ' )-> getMock ( );
7777 $ promise ->expects ($ this ->once ())->method ('cancel ' );
7878
7979 Timer \timeout ($ promise , 0.01 , $ this ->loop );
@@ -85,9 +85,9 @@ public function testCancelTimeoutWithoutCancellationhandlerWillNotCancelTimerAnd
8585 {
8686 $ promise = new \React \Promise \Promise (function () { });
8787
88- $ loop = $ this ->getMock ('React\EventLoop\LoopInterface ' );
88+ $ loop = $ this ->getMockBuilder ('React\EventLoop\LoopInterface ' )-> getMock ( );
8989
90- $ timer = $ this ->getMock ('React\EventLoop\Timer\TimerInterface ' );
90+ $ timer = $ this ->getMockBuilder ('React\EventLoop\Timer\TimerInterface ' )-> getMock ( );
9191 $ loop ->expects ($ this ->once ())->method ('addTimer ' )->will ($ this ->returnValue ($ timer ));
9292 $ loop ->expects ($ this ->never ())->method ('cancelTimer ' );
9393
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ protected function expectCallableNever()
4141 */
4242 protected function createCallableMock ()
4343 {
44- return $ this ->getMock ('React\Tests\Promise\Timer\CallableStub ' );
44+ return $ this ->getMockBuilder ('React\Tests\Promise\Timer\CallableStub ' )-> getMock ( );
4545 }
4646
4747 protected function expectPromiseRejected ($ promise )
You can’t perform that action at this time.
0 commit comments