File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,15 @@ protected function getHttpClient(string $testCase): HttpClientInterface
38
38
public function testBindToPort ()
39
39
{
40
40
$ client = $ this ->getHttpClient (__FUNCTION__ );
41
- $ localhost = gethostbyname ('localhost ' );
42
- $ response = $ client ->request ('GET ' , "http:// $ localhost:8057 " , ['bindto ' => "$ localhost:9876 " ]);
41
+ $ response = $ client ->request ('GET ' , 'http://localhost:8057 ' , ['bindto ' => '127.0.0.1:9876 ' ]);
43
42
$ response ->getStatusCode ();
44
43
45
44
$ r = new \ReflectionProperty ($ response , 'handle ' );
46
45
$ r ->setAccessible (true );
47
46
48
47
$ curlInfo = curl_getinfo ($ r ->getValue ($ response ));
49
48
50
- self ::assertSame ($ localhost , $ curlInfo ['local_ip ' ]);
49
+ self ::assertSame (' 127.0.0.1 ' , $ curlInfo ['local_ip ' ]);
51
50
self ::assertSame (9876 , $ curlInfo ['local_port ' ]);
52
51
}
53
52
Original file line number Diff line number Diff line change @@ -298,15 +298,13 @@ private static function startVulcain(HttpClientInterface $client)
298
298
self ::markTestSkipped ('Testing with the "vulcain" is not supported on Windows. ' );
299
299
}
300
300
301
- $ localhost = gethostbyname ('localhost ' );
302
-
303
- if (['application/json ' ] !== $ client ->request ('GET ' , "http:// $ localhost:8057/json " )->getHeaders ()['content-type ' ]) {
301
+ if (['application/json ' ] !== $ client ->request ('GET ' , 'http://127.0.0.1:8057/json ' )->getHeaders ()['content-type ' ]) {
304
302
self ::markTestSkipped ('symfony/http-client-contracts >= 2.0.1 required ' );
305
303
}
306
304
307
305
$ process = new Process (['vulcain ' ], null , [
308
306
'DEBUG ' => 1 ,
309
- 'UPSTREAM ' => " http:// $ localhost :8057 " ,
307
+ 'UPSTREAM ' => ' http://127.0.0.1 :8057 ' ,
310
308
'ADDR ' => ':3000 ' ,
311
309
'KEY_FILE ' => __DIR__ .'/Fixtures/tls/server.key ' ,
312
310
'CERT_FILE ' => __DIR__ .'/Fixtures/tls/server.crt ' ,
Original file line number Diff line number Diff line change 24
24
"php" : " >=7.2.5" ,
25
25
"psr/log" : " ^1.0" ,
26
26
"symfony/deprecation-contracts" : " ^2.1" ,
27
- "symfony/http-client-contracts" : " ^2.4.1 " ,
27
+ "symfony/http-client-contracts" : " ^2.4" ,
28
28
"symfony/polyfill-php73" : " ^1.11" ,
29
29
"symfony/polyfill-php80" : " ^1.15" ,
30
30
"symfony/service-contracts" : " ^1.0|^2"
You can’t perform that action at this time.
0 commit comments