Repository navigation
Tests: Cover single_cat_title() and single_tag_title() - #15322
devmuhib009 wants to merge 1 commit into
Conversation
…rops devmuhib009.
|
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: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the changes extending category and tag title test coverage.
No open issues 🎉
What changed in this PR
This PR extends WordPress’s term archive title tests to cover single_cat_title() and single_tag_title(), supporting Trac ticket #65819.
Changes:
- Adds tests for returning and displaying category and tag titles with prefixes.
- Updates the test class documentation and coverage annotations to include both functions.
| File | Description |
|---|---|
tests/phpunit/tests/general/singleTermTitle.php |
Adds category and tag title tests and updates coverage annotations. |
Review effort: Balanced
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
I left a few small notes inline.
AI Review: Opus 5.5
| * | ||
| * @ticket 65819 | ||
| * | ||
| * @covers ::single_cat_title |
There was a problem hiding this comment.
Optional: the class docblock already has these @covers tags, and the other tests here don't repeat them. Feel free to drop this one and the one at line 277.
lancewillett
left a comment
There was a problem hiding this comment.
Please remove the two added wrapper-only methods. test_returns_title_for_term_archives(), test_displays_title_by_default(), and test_displays_prefix() already protect the title, display, and prefix behavior in this class. single_cat_title() and single_tag_title() only forward the same arguments to single_term_title(). These additions repeat that behavior without a distinct transformation or branch. No replacement tests are requested.
AI review · gpt-6
|
Thanks for extending the title coverage. Closing this PR because the existing suite already checks term titles, display, prefixes, and filters at the implementation that owns that behavior. These additions exercise only the category/tag wrappers forwarding to it. That limited wiring coverage does not justify two more fixture-backed tests; no replacement tests are requested. AI review · |
Trac ticket: https://core.trac.wordpress.org/ticket/65819
This PR extends
Tests_General_SingleTermTitleto coversingle_cat_title()andsingle_tag_title()for displaying and returning term archive titles.