@@ -57,9 +57,7 @@ public function connectionToRemoteTCP4n6ServerShouldResultInOurIP()
5757 public function connectionToRemoteTCP4ServerShouldResultInOurIP ()
5858 {
5959 if ($ this ->ipv4 () === false ) {
60- // IPv4 not supported on this system
61- $ this ->assertFalse ($ this ->ipv4 ());
62- return ;
60+ $ this ->markTestSkipped ('IPv4 connection not supported on this system ' );
6361 }
6462
6563 $ loop = Factory::create ();
@@ -79,9 +77,7 @@ public function connectionToRemoteTCP4ServerShouldResultInOurIP()
7977 public function connectionToRemoteTCP6ServerShouldResultInOurIP ()
8078 {
8179 if ($ this ->ipv6 () === false ) {
82- // IPv6 not supported on this system
83- $ this ->assertFalse ($ this ->ipv6 ());
84- return ;
80+ $ this ->markTestSkipped ('IPv6 connection not supported on this system ' );
8581 }
8682
8783 $ loop = Factory::create ();
@@ -94,72 +90,6 @@ public function connectionToRemoteTCP6ServerShouldResultInOurIP()
9490 $ this ->assertSame ($ ip , filter_var ($ ip , FILTER_VALIDATE_IP , FILTER_FLAG_IPV6 ), $ ip );
9591 }
9692
97- /**
98- * @test
99- * @group internet
100- *
101- * @expectedException \RuntimeException
102- * @expectedExceptionMessageRegExp /Connection to ipv6.tlund.se:80 failed/
103- */
104- public function tryingToConnectToAnIPv6OnlyHostWithOutHappyEyeBallsShouldResultInFailure ()
105- {
106- $ loop = Factory::create ();
107-
108- $ connector = new Connector ($ loop , array ('happy_eyeballs ' => false ));
109-
110- Block \await ($ this ->request ('ipv6.tlund.se ' , $ connector ), $ loop , self ::TIMEOUT );
111- }
112-
113- /**
114- * @test
115- * @group internet
116- *
117- * @expectedException \RuntimeException
118- * @expectedExceptionMessageRegExp /Connection to tcp:\/\/193.15.228.195:80 failed:/
119- */
120- public function connectingDirectlyToAnIPv4AddressShouldFailWhenIPv4IsntAvailable ()
121- {
122- if ($ this ->ipv4 () === true ) {
123- // IPv4 supported on this system
124- throw new \RuntimeException ('Connection to tcp://193.15.228.195:80 failed: ' );
125- }
126-
127- $ loop = Factory::create ();
128-
129- $ connector = new Connector ($ loop );
130-
131- $ host = current (dns_get_record ('ipv4.tlund.se ' , DNS_A ));
132- $ host = $ host ['ip ' ];
133- Block \await ($ this ->request ($ host , $ connector ), $ loop , self ::TIMEOUT );
134- }
135-
136- /**
137- * @test
138- * @group internet
139- *
140- * @expectedException \RuntimeException
141- * @expectedExceptionMessageRegExp /Connection to tcp:\/\/\[2a00:801:f::195\]:80 failed:/
142- */
143- public function connectingDirectlyToAnIPv6AddressShouldFailWhenIPv6IsntAvailable ()
144- {
145- if ($ this ->ipv6 () === true ) {
146- // IPv6 supported on this system
147- throw new \RuntimeException ('Connection to tcp://[2a00:801:f::195]:80 failed: ' );
148- }
149-
150- $ loop = Factory::create ();
151-
152- $ connector = new Connector ($ loop );
153-
154- $ host = current (dns_get_record ('ipv6.tlund.se ' , DNS_AAAA ));
155- $ host = $ host ['ipv6 ' ];
156- $ host = '[ ' . $ host . '] ' ;
157- $ ip = Block \await ($ this ->request ($ host , $ connector ), $ loop , self ::TIMEOUT );
158-
159- $ this ->assertFalse (filter_var ($ ip , FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 ), $ ip );
160- $ this ->assertSame ($ ip , filter_var ($ ip , FILTER_VALIDATE_IP , FILTER_FLAG_IPV6 ), $ ip );
161- }
162-
16393 /**
16494 * @internal
16595 */
0 commit comments