Skip to content

test(feed): name the failure test after the status it actually exercises - #104

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/lp-test-name-says-500-but-exercises-503
Aug 12, 2026
Merged

test(feed): name the failure test after the status it actually exercises#104
rubenvdlinde merged 1 commit into
developmentfrom
fix/lp-test-name-says-500-but-exercises-503

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

FeedRefreshServiceTest::testRefreshFeed500RecordsFailurePreservesItems stubs IResponse::getStatusCode() to 503 and asserts the recorded failure reason starts with "503". The name and the docblock both said 500 — a status nothing in the test produces or checks.

What changed

  • Renamed to testRefreshFeed503RecordsFailurePreservesItems.
  • Docblock corrected, with the reason for the old label recorded so it is not "fixed" back to 500.

The test itself is sound and load-bearing; only the label was wrong. REQ-FRJ-006 is written about per-feed failure tolerance generally and does not single out a status, so 503 is a faithful representative and no coverage changes hands.

Behaviour is unchanged — this is a rename plus comments. The suite count is unchanged at 1570.

Context

Found while auditing whether this repo's green PHPUnit cells are earned. 159 test names in the suite name an HTTP status; this was the only one whose body never mentions it. Every other status-naming test asserts the matching Http::STATUS_* constant. That is a good result for the suite, and it is the one exception.

FeedRefreshServiceTest::testRefreshFeed500RecordsFailurePreservesItems stubs
IResponse::getStatusCode() to 503 and asserts the recorded failure reason
starts with "503". The name and the docblock both said 500 — a status nothing
in the test produces or checks.

The test itself is sound and load-bearing; only the label was wrong.
REQ-FRJ-006 is written about per-feed failure tolerance generally and does not
single out a status, so 503 is a faithful representative and no coverage
changes hands. Renamed, docblock corrected, and the reason for the old label
recorded so it is not "fixed" back.

Behaviour unchanged; this is a rename plus comments.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 436c420

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
composer ✅ 102/102
npm ✅ 548/548
PHPUnit
Newman
Playwright
Hydra gates

Quality workflow — 2026-08-12 08:11 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit aa1966c into development Aug 12, 2026
27 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/lp-test-name-says-500-but-exercises-503 branch August 12, 2026 08:12
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