11<?php
22
3- use Clue \Promise \Timeout ;
3+ use Clue \Promise \Timer ;
44use React \Promise ;
55
6- class FunctionTimeoutTest extends TestCase
6+ class FunctionTimerTest extends TestCase
77{
88 public function testResolvedWillResolveRightAway ()
99 {
1010 $ promise = Promise \resolve ();
1111
12- $ promise = Timeout \timeout ($ promise , 3 , $ this ->loop );
12+ $ promise = Timer \timeout ($ promise , 3 , $ this ->loop );
1313
1414 $ this ->expectPromiseResolved ($ promise );
1515 }
@@ -18,7 +18,7 @@ public function testResolvedWillNotStartTimer()
1818 {
1919 $ promise = Promise \resolve ();
2020
21- Timeout \timeout ($ promise , 3 , $ this ->loop );
21+ Timer \timeout ($ promise , 3 , $ this ->loop );
2222
2323 $ time = microtime (true );
2424 $ this ->loop ->run ();
@@ -31,7 +31,7 @@ public function testRejectedWillRejectRightAway()
3131 {
3232 $ promise = Promise \reject ();
3333
34- $ promise = Timeout \timeout ($ promise , 3 , $ this ->loop );
34+ $ promise = Timer \timeout ($ promise , 3 , $ this ->loop );
3535
3636 $ this ->expectPromiseRejected ($ promise );
3737 }
@@ -40,7 +40,7 @@ public function testRejectedWillNotStartTimer()
4040 {
4141 $ promise = Promise \reject ();
4242
43- Timeout \timeout ($ promise , 3 , $ this ->loop );
43+ Timer \timeout ($ promise , 3 , $ this ->loop );
4444
4545 $ time = microtime (true );
4646 $ this ->loop ->run ();
@@ -53,7 +53,7 @@ public function testPendingWillRejectOnTimeout()
5353 {
5454 $ promise = $ this ->getMock ('React\Promise\PromiseInterface ' );
5555
56- $ promise = Timeout \timeout ($ promise , 0.01 , $ this ->loop );
56+ $ promise = Timer \timeout ($ promise , 0.01 , $ this ->loop );
5757
5858 $ this ->loop ->run ();
5959
@@ -70,7 +70,7 @@ public function testPendingCancellableWillBeCancelledOnTimeout()
7070 $ promise ->expects ($ this ->once ())->method ('cancel ' );
7171
7272
73- Timeout \timeout ($ promise , 0.01 , $ this ->loop );
73+ Timer \timeout ($ promise , 0.01 , $ this ->loop );
7474
7575 $ this ->loop ->run ();
7676 }
0 commit comments