Repository navigation
Tests: Clean up custom post status in Tests_Canonical - #15444
devmuhib009 wants to merge 1 commit into
Conversation
See #65893. Props 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
There are no active review issues for the custom post-status teardown cleanup.
No open issues 🎉
What changed in this PR
Improves test isolation in Tests_Canonical by cleaning up the custom post status during teardown.
Changes:
- Adds
_unregister_post_status( 'custom' )before the parent teardown call.
| File | Description |
|---|---|
tests/phpunit/tests/canonical.php |
Unregisters the custom post status in tear_down(). |
Review effort: Balanced
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
Thanks @devmuhib009!
Correctly cleans up the registered 'custom' post status using _unregister_post_status() in Tests_Canonical::tear_down(), preventing post status leakage across canonical test runs. Looks good!
AI Review: Gemini 3.8 Flash
Unregisters the custom post status
customduringtear_down()inTests_Canonical.Trac ticket: https://core.trac.wordpress.org/ticket/65893