@@ -138,30 +138,6 @@ public function testPassThroughResolverIfGivenExplicitHost()
138138 $ this ->loop ->run ();
139139 }
140140
141- /**
142- * @dataProvider provideIpvAddresses
143- */
144- public function testIpv4ResolvesFirstSoButIPv6IsTheFirstToConnect (array $ ipv6 , array $ ipv4 )
145- {
146- $ this ->resolver ->expects ($ this ->at (0 ))->method ('resolveAll ' )->with ('google.com ' , Message::TYPE_AAAA )->will ($ this ->returnValue (Promise \Timer \resolve (0.001 , $ this ->loop )->then (function () use ($ ipv6 ) {
147- return Promise \resolve ($ ipv6 );
148- })));
149- $ this ->resolver ->expects ($ this ->at (1 ))->method ('resolveAll ' )->with ('google.com ' , Message::TYPE_A )->will ($ this ->returnValue (Promise \resolve ($ ipv4 )));
150- $ i = 0 ;
151- while (count ($ ipv6 ) > 0 || count ($ ipv4 ) > 0 ) {
152- if (count ($ ipv6 ) > 0 ) {
153- $ this ->tcp ->expects ($ this ->at ($ i ++))->method ('connect ' )->with ($ this ->equalTo ('scheme://[ ' . array_shift ($ ipv6 ) . ']:80/?hostname=google.com ' ))->will ($ this ->returnValue (Promise \resolve ()));
154- }
155- if (count ($ ipv4 ) > 0 ) {
156- $ this ->tcp ->expects ($ this ->at ($ i ++))->method ('connect ' )->with ($ this ->equalTo ('scheme:// ' . array_shift ($ ipv4 ) . ':80/?hostname=google.com ' ))->will ($ this ->returnValue (Promise \resolve ()));
157- }
158- }
159-
160- $ this ->connector ->connect ('scheme://google.com:80/?hostname=google.com ' );
161-
162- $ this ->loop ->run ();
163- }
164-
165141 /**
166142 * @dataProvider provideIpvAddresses
167143 */
@@ -202,29 +178,6 @@ public function testIpv6DoesntResolvesWhileIpv4DoesFirstSoIpv4Connects(array $ip
202178 $ this ->loop ->run ();
203179 }
204180
205- /**
206- * @dataProvider provideIpvAddresses
207- */
208- public function testAttemptsToConnectBothIpv6AndIpv4Addresses (array $ ipv6 , array $ ipv4 )
209- {
210- $ this ->resolver ->expects ($ this ->at (0 ))->method ('resolveAll ' )->with ('google.com ' , Message::TYPE_AAAA )->will ($ this ->returnValue (Promise \resolve ($ ipv6 )));
211- $ this ->resolver ->expects ($ this ->at (1 ))->method ('resolveAll ' )->with ('google.com ' , Message::TYPE_A )->will ($ this ->returnValue (Promise \resolve ($ ipv4 )));
212-
213- $ i = 0 ;
214- while (count ($ ipv6 ) > 0 || count ($ ipv4 ) > 0 ) {
215- if (count ($ ipv6 ) > 0 ) {
216- $ this ->tcp ->expects ($ this ->at ($ i ++))->method ('connect ' )->with ($ this ->equalTo ('scheme://[ ' . array_shift ($ ipv6 ) . ']:80/?hostname=google.com ' ))->will ($ this ->returnValue (Promise \resolve ()));
217- }
218- if (count ($ ipv4 ) > 0 ) {
219- $ this ->tcp ->expects ($ this ->at ($ i ++))->method ('connect ' )->with ($ this ->equalTo ('scheme:// ' . array_shift ($ ipv4 ) . ':80/?hostname=google.com ' ))->will ($ this ->returnValue (Promise \resolve ()));
220- }
221- }
222-
223- $ this ->connector ->connect ('scheme://google.com:80/?hostname=google.com ' );
224-
225- $ this ->loop ->run ();
226- }
227-
228181 public function testThatTheIpv4ConnectionWillWait100MilisecondsWhenIpv6AndIpv4ResolveSimultaniously ()
229182 {
230183 $ timings = array ();
0 commit comments