Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor CURLRequset tests #8763

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -5336,11 +5336,6 @@
'count' => 10,
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/CURLRequest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:applyBody\\(\\) has parameter \\$curlOptions with no value type specified in iterable type array\\.$#',
'count' => 1,
Expand Down Expand Up @@ -12901,36 +12896,6 @@
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CLIRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'10\' directly on offset \'HTTP_CONTENT_LENGTH\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'en\\-US\' directly on offset \'HTTP_ACCEPT_LANGUAGE\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'gzip, deflate, br\' directly on offset \'HTTP_ACCEPT_ENCODING\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'site1\\.com\' directly on offset \'HTTP_HOST\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequestDoNotShareOptionsTest\\:\\:getRequest\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestDoNotShareOptionsTest.php',
];
$ignoreErrors[] = [
'message' => '#^Access to an undefined property CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:\\$curl_options\\.$#',
'count' => 39,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Assigning \'10\' directly on offset \'HTTP_CONTENT_LENGTH\' of \\$_SERVER is discouraged\\.$#',
'count' => 1,
Expand All @@ -12951,21 +12916,6 @@
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Call to an undefined method CodeIgniter\\\\HTTP\\\\CURLRequest\\:\\:setOutput\\(\\)\\.$#',
'count' => 4,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequestTest\\:\\:getRequest\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\CURLRequestTest\\:\\:getRequest\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/system/HTTP/CURLRequestTest.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\ContentSecurityPolicyTest\\:\\:work\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down
2 changes: 2 additions & 0 deletions system/HTTP/CURLRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class CURLRequest extends OutgoingRequest
* - baseURI
* - timeout
* - any other request options to use as defaults.
*
* @param array<string, mixed> $options
*/
public function __construct(App $config, URI $uri, ?ResponseInterface $response = null, array $options = [])
{
Expand Down
Loading
Loading