[wp-trac] [WordPress Trac] #53431: Tests: Reset global $current_screen between tests to avoid cross-test interdependencies
WordPress Trac
noreply at wordpress.org
Tue Jul 13 16:13:15 UTC 2021
#53431: Tests: Reset global $current_screen between tests to avoid cross-test
interdependencies
---------------------------------------------+-----------------------------
Reporter: hellofromTonya | Owner: hellofromTonya
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"51419" 51419]:
{{{
#!CommitTicketReference repository="" revision="51419"
Tests: Reset `$current_screen` global between tests to avoid cross-test
interdependencies.
This provides a consistent global starting state for tests that interact
with admin screens.
Individual tests no longer need to invoke `set_current_screen( 'front' )`
(or an alternative implementation) as a reset.
Follow-up to [29251], [29860], [31046], [36721], [38678], [48908],
[50433].
Props hellofromTonya, johnbillion.
Fixes #53431.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53431#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list