File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1187,6 +1187,30 @@ public function testHTTPv3(): void
11871187 $ this ->assertSame (CURL_HTTP_VERSION_3 , $ options [CURLOPT_HTTP_VERSION ]);
11881188 }
11891189
1190+ public function testForceResolveIPv4 (): void
1191+ {
1192+ $ this ->request ->request ('POST ' , '/post ' , [
1193+ 'force_ip_resolve ' => 'v4 ' ,
1194+ ]);
1195+
1196+ $ options = $ this ->request ->curl_options ;
1197+
1198+ $ this ->assertArrayHasKey (CURLOPT_IPRESOLVE , $ options );
1199+ $ this ->assertSame (CURL_IPRESOLVE_V4 , $ options [CURLOPT_IPRESOLVE ]);
1200+ }
1201+
1202+ public function testForceResolveIPv6 (): void
1203+ {
1204+ $ this ->request ->request ('POST ' , '/post ' , [
1205+ 'force_ip_resolve ' => 'v6 ' ,
1206+ ]);
1207+
1208+ $ options = $ this ->request ->curl_options ;
1209+
1210+ $ this ->assertArrayHasKey (CURLOPT_IPRESOLVE , $ options );
1211+ $ this ->assertSame (CURL_IPRESOLVE_V6 , $ options [CURLOPT_IPRESOLVE ]);
1212+ }
1213+
11901214 public function testCookieOption (): void
11911215 {
11921216 $ holder = SUPPORTPATH . 'HTTP/Files/CookiesHolder.txt ' ;
You can’t perform that action at this time.
0 commit comments