22
33namespace React \Tests \Http \Client ;
44
5- use Clue \React \Block ;
65use Psr \Http \Message \ResponseInterface ;
76use React \EventLoop \Loop ;
87use React \Http \Client \Client ;
@@ -51,7 +50,7 @@ public function testRequestToLocalhostEmitsSingleRemoteConnection()
5150 $ promise = Stream \first ($ request , 'close ' );
5251 $ request ->end ();
5352
54- Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_LOCAL ));
53+ \ React \ Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_LOCAL ));
5554 }
5655
5756 public function testRequestLegacyHttpServerWithOnlyLineFeedReturnsSuccessfulResponse ()
@@ -73,7 +72,7 @@ public function testRequestLegacyHttpServerWithOnlyLineFeedReturnsSuccessfulResp
7372 $ promise = Stream \first ($ request , 'close ' );
7473 $ request ->end ();
7574
76- Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_LOCAL ));
75+ \ React \ Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_LOCAL ));
7776 }
7877
7978 /** @group internet */
@@ -94,7 +93,7 @@ public function testSuccessfulResponseEmitsEnd()
9493 $ promise = Stream \first ($ request , 'close ' );
9594 $ request ->end ();
9695
97- Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_REMOTE ));
96+ \ React \ Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT_REMOTE ));
9897 }
9998
10099 /** @group internet */
@@ -122,7 +121,7 @@ public function testPostDataReturnsData()
122121
123122 $ request ->end ($ data );
124123
125- $ buffer = Block \await (\React \Promise \Timer \timeout ($ deferred ->promise (), self ::TIMEOUT_REMOTE ));
124+ $ buffer = \ React \ Async \await (\React \Promise \Timer \timeout ($ deferred ->promise (), self ::TIMEOUT_REMOTE ));
126125
127126 $ this ->assertNotEquals ('' , $ buffer );
128127
@@ -154,7 +153,7 @@ public function testPostJsonReturnsData()
154153
155154 $ request ->end ($ data );
156155
157- $ buffer = Block \await (\React \Promise \Timer \timeout ($ deferred ->promise (), self ::TIMEOUT_REMOTE ));
156+ $ buffer = \ React \ Async \await (\React \Promise \Timer \timeout ($ deferred ->promise (), self ::TIMEOUT_REMOTE ));
158157
159158 $ this ->assertNotEquals ('' , $ buffer );
160159
0 commit comments