Build/Test Tools: Add $current_screen
to the list of globals to unset in WP_UnitTestCase_Base::go_to()
.
Props mauteri. Fixes #47439. git-svn-id: https://develop.svn.wordpress.org/trunk@45486 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2264493b0d
commit
af0c73b10b
@ -707,7 +707,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
|
|||||||
// from all over the place (globals, GET, etc), which makes it tricky
|
// from all over the place (globals, GET, etc), which makes it tricky
|
||||||
// to run them more than once without very carefully clearing everything
|
// to run them more than once without very carefully clearing everything
|
||||||
$_GET = $_POST = array();
|
$_GET = $_POST = array();
|
||||||
foreach ( array( 'query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow' ) as $v ) {
|
foreach ( array( 'query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow', 'current_screen' ) as $v ) {
|
||||||
if ( isset( $GLOBALS[ $v ] ) ) {
|
if ( isset( $GLOBALS[ $v ] ) ) {
|
||||||
unset( $GLOBALS[ $v ] );
|
unset( $GLOBALS[ $v ] );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user