Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in tests.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45588 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2019-07-02 04:43:01 +00:00
parent 969c17d82d
commit fe28df65e3
36 changed files with 278 additions and 132 deletions

View File

@@ -706,7 +706,8 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
// note: the WP and WP_Query classes like to silently fetch parameters
// from all over the place (globals, GET, etc), which makes it tricky
// to run them more than once without very carefully clearing everything
$_GET = $_POST = array();
$_GET = array();
$_POST = array();
foreach ( array( 'query_string', 'id', 'postdata', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'pagenow', 'current_screen' ) as $v ) {
if ( isset( $GLOBALS[ $v ] ) ) {
unset( $GLOBALS[ $v ] );