Repository navigation
Tests: Use unregister_taxonomy() in Tests_Admin_IncludesScreen - #15447
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 with the test teardown change to use WordPress’s taxonomy cleanup API.
No open issues 🎉
What changed in this PR
Updates Tests_Admin_IncludesScreen teardown to use WordPress’s taxonomy cleanup API instead of directly modifying the global registry.
Changes:
- Replaces manual removal of
old-or-newwithunregister_taxonomy( 'old-or-new' ).
| File | Description |
|---|---|
tests/phpunit/tests/admin/includesScreen.php |
Uses unregister_taxonomy() for taxonomy cleanup in tear_down(). |
Review effort: Balanced
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
Thanks @devmuhib009!
Properly replaces manual global unsetting with core unregister_taxonomy() in Tests_Admin_IncludesScreen::tear_down(). Verified random order execution. Looks good to me!
AI Review: Gemini 3.8 Flash
Uses
unregister_taxonomy()instead of manually unsetting the global registry inTests_Admin_IncludesScreen::tear_down().Trac ticket: https://core.trac.wordpress.org/ticket/65893