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
11
11
/** @test */
12
12
public function shouldForwardToDeferred ()
13
13
{
14
- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
14
+ $ mock = $ this
15
+ ->getMockBuilder ('React \\Promise \\Deferred ' )
16
+ ->getMock ();
15
17
$ mock
16
18
->expects ($ this ->once ())
17
19
->method ('then ' )
@@ -24,7 +26,9 @@ public function shouldForwardToDeferred()
24
26
/** @test */
25
27
public function shouldForwardCancelToDeferred ()
26
28
{
27
- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
29
+ $ mock = $ this
30
+ ->getMockBuilder ('React \\Promise \\Deferred ' )
31
+ ->getMock ();
28
32
$ mock
29
33
->expects ($ this ->once ())
30
34
->method ('cancel ' );
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class DeferredResolverTest extends TestCase
11
11
/** @test */
12
12
public function shouldForwardToDeferred ()
13
13
{
14
- $ mock = $ this ->getMock ('React \\Promise \\Deferred ' );
14
+ $ mock = $ this
15
+ ->getMockBuilder ('React \\Promise \\Deferred ' )
16
+ ->getMock ();
15
17
$ mock
16
18
->expects ($ this ->once ())
17
19
->method ('resolve ' )
Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ public function shouldInvokeCancellationHandlerAndStayPendingWhenCallingCancel()
104
104
/** @test */
105
105
public function shouldNotInvokeCancellationHandlerIfPromiseIsNotCancellable ()
106
106
{
107
- $ mock = $ this ->getMock ('React \\Promise \\PromiseInterface ' );
107
+ $ mock = $ this
108
+ ->getMockBuilder ('React \\Promise \\PromiseInterface ' )
109
+ ->getMock ();
108
110
109
111
$ factory = function () use ($ mock ){
110
112
return $ mock ;
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ public function expectCallableNever()
36
36
37
37
public function createCallableMock ()
38
38
{
39
- return $ this ->getMock ('React \\Promise\Stub\CallableStub ' );
39
+ return $ this
40
+ ->getMockBuilder ('React \\Promise\Stub\CallableStub ' )
41
+ ->getMock ();
40
42
}
41
43
42
44
public function invalidCallbackDataProvider ()
You can’t perform that action at this time.
0 commit comments