22
33namespace Clue \Tests \React \HttpProxy ;
44
5- use Clue \React \Block ;
65use Clue \React \HttpProxy \ProxyConnector ;
7- use React \EventLoop \Loop ;
86
97/** @group internet */
108class FunctionalTest extends AbstractTestCase
@@ -20,7 +18,7 @@ public function testNonListeningSocketRejectsConnection()
2018 'Connection to tcp://google.com:80 failed because connection to proxy failed (ECONNREFUSED) ' ,
2119 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
2220 );
23- Block \ await ($ promise , Loop:: get (), 3.0 );
21+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
2422 }
2523
2624 public function testPlainGoogleDoesNotAcceptConnectMethod ()
@@ -34,7 +32,7 @@ public function testPlainGoogleDoesNotAcceptConnectMethod()
3432 'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED) ' ,
3533 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
3634 );
37- Block \ await ($ promise , Loop:: get (), 3.0 );
35+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
3836 }
3937
4038 public function testSecureGoogleDoesNotAcceptConnectMethod ()
@@ -52,7 +50,7 @@ public function testSecureGoogleDoesNotAcceptConnectMethod()
5250 'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED) ' ,
5351 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
5452 );
55- Block \ await ($ promise , Loop:: get (), 3.0 );
53+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
5654 }
5755
5856 public function testSecureGoogleDoesNotAcceptPlainStream ()
@@ -66,7 +64,7 @@ public function testSecureGoogleDoesNotAcceptPlainStream()
6664 'Connection to tcp://google.com:80 failed because connection to proxy was lost while waiting for response (ECONNRESET) ' ,
6765 defined ('SOCKET_ECONNRESET ' ) ? SOCKET_ECONNRESET : 104
6866 );
69- Block \ await ($ promise , Loop:: get (), 3.0 );
67+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
7068 }
7169
7270 /**
0 commit comments