Skip to content

Replace assertEquals with assertSame for stricter checks - #11707

Closed
shreyasikhar wants to merge 2 commits into
WordPress:trunkfrom
shreyasikhar:ticket/64895
Closed

shreyasikhar wants to merge 2 commits into
WordPress:trunkfrom
shreyasikhar:ticket/64895

Conversation

@shreyasikhar

@shreyasikhar shreyasikhar commented May 5, 2026 •

Copy link
Copy Markdown

Replace loose assertions with strict comparisons for REST response status codes, ability pagination headers, and theme-preview hook priorities.

The pagination assertions compare string expectations with the original response headers, preserving checks of both value and type. The bulk-edit assertion is already covered by r63934 and is no longer part of this diff.

Trac ticket: https://core.trac.wordpress.org/ticket/64895

Validation

  • Refreshed against trunk, including r63934.
  • Ran all six affected test files locally on PHP 8.3 in randomized order: single-site seed 11707 (438 tests, 1,888 assertions, 2 skipped); multisite seed 11708 (444 tests, 1,912 assertions, 2 skipped). No failures.
  • PHPCS passed for all six files.
  • Fresh CI runs follow the branch update.

Use of AI Tools

AI assistance: Yes.
Tools: GitHub Copilot for the original conversions; OpenAI Codex (GPT-6) for the trunk refresh, conflict resolution, header-type review, local validation, and description update. The changes remain subject to human review.

@github-actions

github-actions Bot commented May 5, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props shreyasikhar26, lancewillett.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to land.

wporg-sync pushed a commit that referenced this pull request Sep 25, 2026
Compare REST response status codes and theme-preview hook priorities with integer expectations. Check ability pagination headers against string expectations without casting the returned values.

Developed in: #11707

Props shreyasikhar26.
See #64895.


git-svn-id: https://develop.svn.wordpress.org/trunk@63935 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Sep 25, 2026
Compare REST response status codes and theme-preview hook priorities with integer expectations. Check ability pagination headers against string expectations without casting the returned values.

Developed in: WordPress/wordpress-develop#11707

Props shreyasikhar26.
See #64895.

Built from https://develop.svn.wordpress.org/trunk@63935


git-svn-id: http://core.svn.wordpress.org/trunk@63101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@lancewillett

Copy link
Copy Markdown
Member

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants