Skip to content

Tests: Remove redundant null call in get_the_content_feed() coverage - #15394

Closed
shail-mehta wants to merge 1 commit into
WordPress:trunkfrom
shail-mehta:tests/65819-cleanup-get-the-content-feed
Closed

shail-mehta wants to merge 1 commit into
WordPress:trunkfrom
shail-mehta:tests/65819-cleanup-get-the-content-feed

Conversation

@shail-mehta

@shail-mehta shail-mehta commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Trac ticket: #66475

Follow Up: #15348

What

Removes the redundant get_the_content_feed( null ) call and its three assertions from Tests_Feed_GetTheContentFeed::test_returns_filtered_content_for_default_feed_type().

Test-only; no production code changes.

Why

Follow-up to Lance’s optional cleanup note on the landed coverage: the no-argument call already passes the default null value, so the explicit null invocation in that method adds no distinct protection. Explicit null with a customized default_feed remains covered by test_null_feed_type_uses_default_feed().

How

Delete the second get_the_content_feed( null ) call and its matching output/call-count/argument assertions from the default feed-type test method.

Testing Instructions

docker compose up -d mysql
docker compose run --rm php ./vendor/bin/phpunit --filter Tests_Feed_GetTheContentFeed

Expected: OK (4 tests).

Use of AI Tools

  • Cursor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for this test-only cleanup of redundant get_the_content_feed() assertions.

No open issues 🎉

What changed in this PR

This test-only cleanup removes redundant get_the_content_feed() coverage following PR #15348. No production code changes are included.

Changes:

  • Removes the explicit null call and its three assertions from the default feed-type test.
  • Retains the no-argument assertions; explicit null with a customized default remains covered separately.
File Description
tests/​phpunit/​tests/​feed/​getTheContentFeed.php Removes duplicate assertions from the default feed-type test.

Review effort: Balanced

@shail-mehta shail-mehta self-assigned this Nov 3, 2026
@shail-mehta
shail-mehta marked this pull request as ready for review November 3, 2026 15:25
@github-actions

github-actions Bot commented Nov 3, 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.

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

Props shailu25, lancewillett.

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@lancewillett

Copy link
Copy Markdown
Member

Thanks, @shail-mehta. Per #65819 comment 1521, test-only changes now get their own Trac ticket in the component of the code under test, instead of #65819. That now includes open PRs like this one.

Could you open a new ticket for this change (likely Feeds)? Please add the has-patch and has-unit-tests keywords, and update the Trac link in this PR's description. I will review it under the new ticket.

AI review · claude-opus-5-5

@shail-mehta

Copy link
Copy Markdown
Member Author

Created Ticket: #66475

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 65283
GitHub commit: a1eedfb

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Nov 5, 2026
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.

3 participants