Skip to content

Update PHPUnit tests to include messages for assertions #10760

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

Open
1 task
techanvil opened this issue May 13, 2025 · 1 comment
Open
1 task

Update PHPUnit tests to include messages for assertions #10760

techanvil opened this issue May 13, 2025 · 1 comment
Assignees
Labels
P2 Low priority Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling

Comments

@techanvil
Copy link
Collaborator

techanvil commented May 13, 2025

Feature Description

Following on from #10759, this is an issue to add assertion messages to PHPUnit tests and remove the disabling of the PHPCS rule introduced in the previous issue.

Due to the scope of the changes, we may need to split this into multiple issues.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • All existing PHPUnit test assertions are updated to include informative failure messages.
  • PHPCS rule disabling comments added in Add a PHPCS rule to enforce specifying messages for PHPUnit assertions #10759 to bypass the assertion message rule are removed from test files once all assertions in that file include messages.
  • This issue should be treated as a time box which sets a hard limit on the time to spend.
  • This will likely take multiple PRs, so follow-up issues should be opened as necessary until completed.
    • If time allows, multiple PRs could be opened against this issue to keep the size of the diff reasonable for review.

Implementation Brief

Test Coverage

QA Brief

Changelog entry

@techanvil techanvil added P2 Low priority Type: Infrastructure Engineering infrastructure & tooling labels May 13, 2025
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm May 15, 2025
@techanvil techanvil self-assigned this May 16, 2025
@techanvil
Copy link
Collaborator Author

techanvil commented May 16, 2025

Thanks @zutigrm this AC looks good, however, noting that there are >3k assertions in over >200 files, I've added the same time-boxing criteria to the AC as seen in #5795.

Image

AC ✅

@techanvil techanvil removed their assignment May 16, 2025
@benbowler benbowler self-assigned this May 19, 2025
@benbowler benbowler added the Team S Issues for Squad 1 label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Low priority Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

3 participants