File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class DeferredPromiseTest extends TestCase
1111 /** @test */
1212 public function shouldForwardToDeferred ()
1313 {
14- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
14+ $ mock = $ this
15+ ->getMockBuilder ('React \\Promise \\Deferred ' )
16+ ->getMock ();
1517 $ mock
1618 ->expects ($ this ->once ())
1719 ->method ('then ' )
@@ -24,7 +26,9 @@ public function shouldForwardToDeferred()
2426 /** @test */
2527 public function shouldForwardCancelToDeferred ()
2628 {
27- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
29+ $ mock = $ this
30+ ->getMockBuilder ('React \\Promise \\Deferred ' )
31+ ->getMock ();
2832 $ mock
2933 ->expects ($ this ->once ())
3034 ->method ('cancel ' );
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class DeferredResolverTest extends TestCase
1111 /** @test */
1212 public function shouldForwardToDeferred ()
1313 {
14- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
14+ $ mock = $ this
15+ ->getMockBuilder ('React \\Promise \\Deferred ' )
16+ ->getMock ();
1517 $ mock
1618 ->expects ($ this ->once ())
1719 ->method ('resolve ' )
Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ public function shouldInvokeCancellationHandlerAndStayPendingWhenCallingCancel()
104104 /** @test */
105105 public function shouldNotInvokeCancellationHandlerIfPromiseIsNotCancellable ()
106106 {
107- $ mock = $ this ->getMock ('React \\Promise \\PromiseInterface ' );
107+ $ mock = $ this
108+ ->getMockBuilder ('React \\Promise \\PromiseInterface ' )
109+ ->getMock ();
108110
109111 $ factory = function () use ($ mock ){
110112 return $ mock ;
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ public function expectCallableNever()
3636
3737 public function createCallableMock ()
3838 {
39- return $ this ->getMock ('React \\Promise\Stub\CallableStub ' );
39+ return $ this
40+ ->getMockBuilder ('React \\Promise\Stub\CallableStub ' )
41+ ->getMock ();
4042 }
4143
4244 public function invalidCallbackDataProvider ()
You can’t perform that action at this time.
0 commit comments