#57236 closed defect (bug) (fixed)
Add $wp_filters to WP_UnitTestCase_Base::_backup_hooks() and ::_restore_hooks()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.2 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | good-first-bug has-patch has-unit-tests |
| Focuses: | Cc: |
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.
3 years ago
#1
- Keywords has-patch has-unit-tests added; needs-patch removed
#2
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 55160:
@SergeyBiryukov commented on PR #3739:
3 years ago
#3
Thanks for the PR! Merged in r55160.
Note: See
TracTickets for help on using
tickets.
Backs up $wp_filters global before running test cases
Trac ticket: https://core.trac.wordpress.org/ticket/57236