22
33namespace Clue \Tests \React \HttpProxy ;
44
5- use Clue \React \Block ;
65use Clue \React \HttpProxy \ProxyConnector ;
76use React \EventLoop \Loop ;
87
@@ -20,7 +19,7 @@ public function testNonListeningSocketRejectsConnection()
2019 'Connection to tcp://google.com:80 failed because connection to proxy failed (ECONNREFUSED) ' ,
2120 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
2221 );
23- Block \ await ($ promise , Loop:: get (), 3.0 );
22+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
2423 }
2524
2625 public function testPlainGoogleDoesNotAcceptConnectMethod ()
@@ -34,7 +33,7 @@ public function testPlainGoogleDoesNotAcceptConnectMethod()
3433 'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED) ' ,
3534 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
3635 );
37- Block \ await ($ promise , Loop:: get (), 3.0 );
36+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
3837 }
3938
4039 public function testSecureGoogleDoesNotAcceptConnectMethod ()
@@ -52,7 +51,7 @@ public function testSecureGoogleDoesNotAcceptConnectMethod()
5251 'Connection to tcp://google.com:80 failed because proxy refused connection with HTTP error code 405 (Method Not Allowed) (ECONNREFUSED) ' ,
5352 defined ('SOCKET_ECONNREFUSED ' ) ? SOCKET_ECONNREFUSED : 111
5453 );
55- Block \ await ($ promise , Loop:: get (), 3.0 );
54+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
5655 }
5756
5857 public function testSecureGoogleDoesNotAcceptPlainStream ()
@@ -66,7 +65,7 @@ public function testSecureGoogleDoesNotAcceptPlainStream()
6665 'Connection to tcp://google.com:80 failed because connection to proxy was lost while waiting for response (ECONNRESET) ' ,
6766 defined ('SOCKET_ECONNRESET ' ) ? SOCKET_ECONNRESET : 104
6867 );
69- Block \ await ($ promise , Loop:: get (), 3.0 );
68+ \ React \ Async \ await (\ React \ Promise \ Timer \timeout ( $ promise , 3.0 ) );
7069 }
7170
7271 /**
0 commit comments