From 8368b77d686a967ee2045adc8ac2a861762bf775 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sat, 10 Oct 2026 00:43:12 +0800 Subject: [PATCH] test: drop the removed `Response` constructor argument in HTTP tests --- tests/system/HTTP/ContentSecurityPolicyTest.php | 2 +- tests/system/HTTP/ResponseTest.php | 2 +- utils/phpstan-baseline/arguments.count.neon | 12 +----------- utils/phpstan-baseline/loader.neon | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/tests/system/HTTP/ContentSecurityPolicyTest.php b/tests/system/HTTP/ContentSecurityPolicyTest.php index 364751261dee..5e5fbb235ecf 100644 --- a/tests/system/HTTP/ContentSecurityPolicyTest.php +++ b/tests/system/HTTP/ContentSecurityPolicyTest.php @@ -123,7 +123,7 @@ public function testReportOnly(): void Services::injectMock('csp', new ContentSecurityPolicy($config)); - $this->response = new Response(config(App::class)); + $this->response = new Response(); $this->response->pretend(false); $this->csp = $this->response->getCSP(); diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index 4ac5188912d0..b4bd5bc394e0 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -490,7 +490,7 @@ public function testGetDownloadResponseByFilePath(): void public function testGetDownloadResponseByExtremeFilePath(): void { - $response = new Response(new App()); + $response = new Response(); $tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'ci4_test_dir_' . bin2hex(random_bytes(8)); $this->assertTrue(mkdir($tempDir)); diff --git a/utils/phpstan-baseline/arguments.count.neon b/utils/phpstan-baseline/arguments.count.neon index eefe012fbfa7..999a1d99310f 100644 --- a/utils/phpstan-baseline/arguments.count.neon +++ b/utils/phpstan-baseline/arguments.count.neon @@ -1,4 +1,4 @@ -# total 6 errors +# total 4 errors parameters: ignoreErrors: @@ -11,13 +11,3 @@ parameters: message: '#^Function is_cli invoked with 1 parameter, 0 required\.$#' count: 2 path: ../../tests/system/Debug/ToolbarTest.php - - - - message: '#^Class CodeIgniter\\HTTP\\Response constructor invoked with 1 parameter, 0 required\.$#' - count: 1 - path: ../../tests/system/HTTP/ContentSecurityPolicyTest.php - - - - message: '#^Class CodeIgniter\\HTTP\\Response constructor invoked with 1 parameter, 0 required\.$#' - count: 1 - path: ../../tests/system/HTTP/ResponseTest.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 20de678702e1..4c09d5998045 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 32 errors +# total 30 errors includes: - arguments.count.neon