File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ $blocker = new Blocker($loop);
6969
7070The ` sleep($seconds) ` method can be used to wait/sleep for $time seconds.
7171
72- #### awaitOne ()
72+ #### await ()
7373
74- The ` awaitOne (PromiseInterface $promise)` method can be used to block waiting for the given $promise to resolve.
74+ The ` await (PromiseInterface $promise)` method can be used to block waiting for the given $promise to resolve.
7575
7676#### awaitAny()
7777
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function sleep($time)
4343 * @return mixed returns whatever the promise resolves to
4444 * @throws Exception when the promise is rejected
4545 */
46- public function awaitOne (PromiseInterface $ promise )
46+ public function await (PromiseInterface $ promise )
4747 {
4848 $ wait = true ;
4949 $ resolved = null ;
Original file line number Diff line number Diff line change @@ -28,22 +28,22 @@ public function testAwaitOneRejected()
2828 $ promise = $ this ->createPromiseRejected (new Exception ('test ' ));
2929
3030 $ this ->setExpectedException ('Exception ' , 'test ' );
31- $ this ->block ->awaitOne ($ promise );
31+ $ this ->block ->await ($ promise );
3232 }
3333
3434 public function testAwaitOneResolved ()
3535 {
3636 $ promise = $ this ->createPromiseResolved (2 );
3737
38- $ this ->assertEquals (2 , $ this ->block ->awaitOne ($ promise ));
38+ $ this ->assertEquals (2 , $ this ->block ->await ($ promise ));
3939 }
4040
4141 public function testAwaitOneInterrupted ()
4242 {
4343 $ promise = $ this ->createPromiseResolved (2 , 0.02 );
4444 $ this ->createTimerInterrupt (0.01 );
4545
46- $ this ->assertEquals (2 , $ this ->block ->awaitOne ($ promise ));
46+ $ this ->assertEquals (2 , $ this ->block ->await ($ promise ));
4747 }
4848
4949 /**
You can’t perform that action at this time.
0 commit comments