@@ -37,7 +37,7 @@ public function testClientCanConnectToServer()
3737 $ promise = $ connector ->connect ($ server ->getAddress ());
3838
3939 /* @var ConnectionInterface $client */
40- $ client = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
40+ $ client = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
4141
4242 $ this ->assertInstanceOf ('React\Socket\ConnectionInterface ' , $ client );
4343 $ this ->assertEquals ($ server ->getAddress (), $ client ->getRemoteAddress ());
@@ -66,7 +66,7 @@ public function testClientUsesTls13ByDefaultWhenSupportedByOpenSSL()
6666 $ promise = $ connector ->connect ($ server ->getAddress ());
6767
6868 /* @var ConnectionInterface $client */
69- $ client = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
69+ $ client = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
7070
7171 $ this ->assertInstanceOf ('React\Socket\Connection ' , $ client );
7272 $ this ->assertTrue (isset ($ client ->stream ));
@@ -105,7 +105,7 @@ public function testClientUsesTls12WhenCryptoMethodIsExplicitlyConfiguredByClien
105105 $ promise = $ connector ->connect ($ server ->getAddress ());
106106
107107 /* @var ConnectionInterface $client */
108- $ client = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
108+ $ client = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
109109
110110 $ this ->assertInstanceOf ('React\Socket\Connection ' , $ client );
111111 $ this ->assertTrue (isset ($ client ->stream ));
@@ -136,7 +136,7 @@ public function testClientUsesTls12WhenCryptoMethodIsExplicitlyConfiguredByServe
136136 $ promise = $ connector ->connect ($ server ->getAddress ());
137137
138138 /* @var ConnectionInterface $client */
139- $ client = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
139+ $ client = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
140140
141141 $ this ->assertInstanceOf ('React\Socket\Connection ' , $ client );
142142 $ this ->assertTrue (isset ($ client ->stream ));
@@ -168,7 +168,7 @@ public function testClientUsesTls10WhenCryptoMethodIsExplicitlyConfiguredByClien
168168
169169 /* @var ConnectionInterface $client */
170170 try {
171- $ client = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
171+ $ client = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
172172 } catch (\RuntimeException $ e ) {
173173 // legacy TLS 1.0 would be considered insecure by today's standards, so skip test if connection fails
174174 // OpenSSL error messages are version/platform specific
@@ -210,7 +210,7 @@ public function testServerEmitsConnectionForClientConnection()
210210
211211 // await both client and server side end of connection
212212 /* @var ConnectionInterface[] $both */
213- $ both = \Clue \ React \Block \await (\React \Promise \Timer \timeout (\React \Promise \all (array ($ peer , $ client )), self ::TIMEOUT ));
213+ $ both = \React \Async \await (\React \Promise \Timer \timeout (\React \Promise \all (array ($ peer , $ client )), self ::TIMEOUT ));
214214
215215 // both ends of the connection are represented by different instances of ConnectionInterface
216216 $ this ->assertCount (2 , $ both );
@@ -250,7 +250,7 @@ public function testClientEmitsDataEventOnceForDataWrittenFromServer()
250250 }, $ reject );
251251 });
252252
253- $ data = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
253+ $ data = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
254254
255255 $ this ->assertEquals ('foo ' , $ data );
256256
@@ -291,7 +291,7 @@ public function testWritesDataInMultipleChunksToConnection()
291291 }, $ reject );
292292 });
293293
294- $ received = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
294+ $ received = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
295295
296296 $ this ->assertEquals (400000 , $ received );
297297
@@ -332,7 +332,7 @@ public function testWritesMoreDataInMultipleChunksToConnection()
332332 }, $ reject );
333333 });
334334
335- $ received = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
335+ $ received = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
336336
337337 $ this ->assertEquals (2000000 , $ received );
338338
@@ -365,7 +365,7 @@ public function testEmitsDataFromConnection()
365365 $ connection ->write ('foo ' );
366366 });
367367
368- $ data = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
368+ $ data = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
369369
370370 $ this ->assertEquals ('foo ' , $ data );
371371
@@ -405,7 +405,7 @@ public function testEmitsDataInMultipleChunksFromConnection()
405405 $ connection ->write (str_repeat ('* ' , 400000 ));
406406 });
407407
408- $ received = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
408+ $ received = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
409409
410410 $ this ->assertEquals (400000 , $ received );
411411
@@ -447,7 +447,7 @@ public function testPipesDataBackInMultipleChunksFromConnection()
447447 }, $ reject );
448448 });
449449
450- $ received = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
450+ $ received = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
451451
452452 $ this ->assertEquals (400000 , $ received );
453453
@@ -477,7 +477,7 @@ public function testEmitsConnectionForNewTlsv11Connection()
477477 ));
478478 $ promise = $ connector ->connect ($ server ->getAddress ());
479479
480- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
480+ \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
481481
482482 $ server ->close ();
483483 $ promise ->then (function (ConnectionInterface $ connection ) {
@@ -508,7 +508,7 @@ public function testEmitsErrorForClientWithTlsVersionMismatch()
508508 $ this ->setExpectedException ('RuntimeException ' , 'handshake ' );
509509
510510 try {
511- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
511+ \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
512512 } catch (\Exception $ e ) {
513513 $ server ->close ();
514514
@@ -534,7 +534,7 @@ public function testServerEmitsConnectionForNewConnectionWithEncryptedCertificat
534534 ));
535535 $ connector ->connect ($ server ->getAddress ());
536536
537- $ connection = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ peer , self ::TIMEOUT ));
537+ $ connection = \React \Async \await (\React \Promise \Timer \timeout ($ peer , self ::TIMEOUT ));
538538
539539 $ this ->assertInstanceOf ('React\Socket\ConnectionInterface ' , $ connection );
540540
@@ -557,7 +557,7 @@ public function testClientRejectsWithErrorForServerWithInvalidCertificate()
557557 $ this ->setExpectedException ('RuntimeException ' , 'handshake ' );
558558
559559 try {
560- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
560+ \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
561561 } catch (\Exception $ e ) {
562562 $ server ->close ();
563563
@@ -587,7 +587,7 @@ public function testServerEmitsErrorForClientWithInvalidCertificate()
587587 $ this ->setExpectedException ('RuntimeException ' , 'handshake ' );
588588
589589 try {
590- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ peer , self ::TIMEOUT ));
590+ \React \Async \await (\React \Promise \Timer \timeout ($ peer , self ::TIMEOUT ));
591591 } catch (\Exception $ e ) {
592592 $ server ->close ();
593593
@@ -616,7 +616,7 @@ public function testEmitsErrorForServerWithEncryptedCertificateMissingPassphrase
616616 $ this ->setExpectedException ('RuntimeException ' , 'handshake ' );
617617
618618 try {
619- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
619+ \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
620620 } catch (\Exception $ e ) {
621621 $ server ->close ();
622622
@@ -646,7 +646,7 @@ public function testEmitsErrorForServerWithEncryptedCertificateWithInvalidPassph
646646 $ this ->setExpectedException ('RuntimeException ' , 'handshake ' );
647647
648648 try {
649- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
649+ \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
650650 } catch (\Exception $ e ) {
651651 $ server ->close ();
652652
@@ -669,7 +669,7 @@ public function testEmitsErrorForConnectionWithPeerVerification()
669669 $ promise = $ connector ->connect ($ server ->getAddress ());
670670 $ promise ->then (null , $ this ->expectCallableOnce ());
671671
672- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
672+ \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
673673
674674 $ server ->close ();
675675 }
@@ -694,7 +694,7 @@ public function testEmitsErrorIfConnectionIsCancelled()
694694 $ promise ->cancel ();
695695 $ promise ->then (null , $ this ->expectCallableOnce ());
696696
697- \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
697+ \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
698698
699699 $ server ->close ();
700700 }
@@ -715,7 +715,7 @@ public function testEmitsErrorIfConnectionIsClosedBeforeHandshake()
715715 $ stream ->close ();
716716 });
717717
718- $ error = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
718+ $ error = \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
719719
720720 // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshake (ECONNRESET)
721721 $ this ->assertInstanceOf ('RuntimeException ' , $ error );
@@ -743,7 +743,7 @@ public function testEmitsErrorIfConnectionIsClosedWithIncompleteHandshake()
743743 $ stream ->end ("\x1e" );
744744 });
745745
746- $ error = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
746+ $ error = \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
747747
748748 // Connection from tcp://127.0.0.1:39528 failed during TLS handshake: Connection lost during TLS handshake (ECONNRESET)
749749 $ this ->assertInstanceOf ('RuntimeException ' , $ error );
@@ -767,7 +767,7 @@ public function testEmitsNothingIfPlaintextConnectionIsIdle()
767767 $ connector = new TcpConnector ();
768768 $ promise = $ connector ->connect (str_replace ('tls:// ' , '' , $ server ->getAddress ()));
769769
770- $ connection = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
770+ $ connection = \React \Async \await (\React \Promise \Timer \timeout ($ promise , self ::TIMEOUT ));
771771 $ this ->assertInstanceOf ('React\Socket\ConnectionInterface ' , $ connection );
772772
773773 $ server ->close ();
@@ -792,7 +792,7 @@ public function testEmitsErrorIfConnectionIsHttpInsteadOfSecureHandshake()
792792 $ stream ->write ("GET / HTTP/1.0 \r\n\r\n" );
793793 });
794794
795- $ error = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
795+ $ error = \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
796796
797797 $ this ->assertInstanceOf ('RuntimeException ' , $ error );
798798
@@ -821,7 +821,7 @@ public function testEmitsErrorIfConnectionIsUnknownProtocolInsteadOfSecureHandsh
821821 $ stream ->write ("Hello world! \n" );
822822 });
823823
824- $ error = \Clue \ React \Block \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
824+ $ error = \React \Async \await (\React \Promise \Timer \timeout ($ errorEvent , self ::TIMEOUT ));
825825
826826 $ this ->assertInstanceOf ('RuntimeException ' , $ error );
827827
0 commit comments