@@ -52,7 +52,9 @@ public function testRejectedWillNotStartTimer()
5252    {
5353        $ promisePromise \rejectnew  \Exception ('reject ' ));
5454
55-         Timer \timeout$ promise3 );
55+         $ promiseTimer \timeout$ promise3 );
56+ 
57+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
5658
5759        $ timemicrotime (true );
5860        Loop::run ();
@@ -83,7 +85,9 @@ public function testPendingCancellableWillBeCancelledThroughFollowerOnTimeout()
8385        $ promise$ this getMockBuilder ($ cancellableInterfacegetMock ();
8486        $ promiseexpects ($ this once ())->method ('then ' )->willReturn ($ cancellable
8587
86-         Timer \timeout$ promise0.01 );
88+         $ promiseTimer \timeout$ promise0.01 );
89+ 
90+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
8791
8892        Loop::run ();
8993    }
@@ -210,6 +214,8 @@ public function testWaitingForPromiseToRejectBeforeTimeoutDoesNotLeaveGarbageCyc
210214
211215        $ promiseTimer \timeout$ promise1.0 );
212216
217+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
218+ 
213219        Loop::run ();
214220        unset($ promise
215221
@@ -230,6 +236,8 @@ public function testWaitingForPromiseToTimeoutDoesNotLeaveGarbageCycles()
230236
231237        $ promiseTimer \timeout$ promise0.01 );
232238
239+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
240+ 
233241        Loop::run ();
234242        unset($ promise
235243
@@ -248,6 +256,8 @@ public function testWaitingForPromiseToTimeoutWithoutCancellerDoesNotLeaveGarbag
248256
249257        $ promiseTimer \timeout$ promise0.01 );
250258
259+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
260+ 
251261        Loop::run ();
252262        unset($ promise
253263
@@ -268,6 +278,8 @@ public function testWaitingForPromiseToTimeoutWithNoOpCancellerDoesNotLeaveGarba
268278
269279        $ promiseTimer \timeout$ promise0.01 );
270280
281+         $ promisethen (null , $ this expectCallableOnce ()); // avoid reporting unhandled rejection 
282+ 
271283        Loop::run ();
272284        unset($ promise
273285
0 commit comments