#57236 closed defect (bug) (fixed)
Add $wp_filters to WP_UnitTestCase_Base::_backup_hooks() and ::_restore_hooks()
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch has-unit-tests |
| Cc: | Focuses: |
Description
- [29251] / #28535 introduced saving the state of filter-related globals (
$wp_actions,$wp_current_filter, and$wp_filter) between running individual unit tests, so that all tests initially use the same filters/actions. - [53803] / #35357 added a new global,
$wp_filters. It should be reset too, along with$wp_actions.
The change should be made in WP_UnitTestCase_Base::_backup_hooks() and ::_restore_hooks().
Change History (3)
This ticket was mentioned in PR #3739 on WordPress/wordpress-develop by @sanjucta.
4 years ago
#1
- Keywords has-patch has-unit-tests added; needs-patch removed
@SergeyBiryukov commented on PR #3739:
3 years ago
#3
Thanks for the PR! Merged in r55160.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Backs up $wp_filters global before running test cases
Trac ticket: https://core.trac.wordpress.org/ticket/57236