Skip to content

test(php): check the removed csvOutput() and the curl helper by behaviour - #90

Open
somethingwithproof wants to merge 1 commit into
Cacti:developfrom
somethingwithproof:test/csv-curl-behaviour
Open

somethingwithproof wants to merge 1 commit into
Cacti:developfrom
somethingwithproof:test/csv-curl-behaviour

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Problem

CsvEscapeTest from #89 searches the source of controllers/controller.php for csvOutput and the source of tests/E2E/support/server.php for curl_close. A comment or a rename defeats both checks, and neither shows that the helper runs without a deprecation on PHP 8.5.

Change

  • The first test asks the loaded Controller class whether csvOutput() exists.
  • The second test runs npc_http() in a child PHP process whose error handler is installed first, against a local built-in server, and reads back the deprecations it raised, together with the body and the Location header it returned.

Follow-up to #89. It changes only a test; the CHANGELOG entry added in #89 still describes the change.

Verification

  • With controllers/controller.php and tests/E2E/support/server.php taken from before fix(php): remove dead csvOutput() and deprecated curl_close() #89, on PHP 8.5, both tests fail (the second with Function curl_close() is deprecated since 8.5). With the current files both pass.
  • The full unit suite on PHP 8.5 passes (1068 passed, 143 skipped).
  • The second test can only fail on PHP 8.5 and later.

…iour

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant