Skip to content

Commit

Permalink
test: CURL option force_ip_resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevsr committed Sep 20, 2024
1 parent 71267ab commit b99381e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/system/HTTP/CURLRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,30 @@ public function testHTTPv3(): void
$this->assertSame(CURL_HTTP_VERSION_3, $options[CURLOPT_HTTP_VERSION]);
}

public function testForceResolveIPv4(): void
{
$this->request->request('POST', '/post', [
'force_ip_resolve' => 'v4',
]);

$options = $this->request->curl_options;

$this->assertArrayHasKey(CURLOPT_IPRESOLVE, $options);
$this->assertSame(CURL_IPRESOLVE_V4, $options[CURLOPT_IPRESOLVE]);
}

public function testForceResolveIPv6(): void
{
$this->request->request('POST', '/post', [
'force_ip_resolve' => 'v6',
]);

$options = $this->request->curl_options;

$this->assertArrayHasKey(CURLOPT_IPRESOLVE, $options);
$this->assertSame(CURL_IPRESOLVE_V6, $options[CURLOPT_IPRESOLVE]);
}

public function testCookieOption(): void
{
$holder = SUPPORTPATH . 'HTTP/Files/CookiesHolder.txt';
Expand Down

0 comments on commit b99381e

Please sign in to comment.