Make WordPress Core


Ignore:
Timestamp:
11/03/2021 02:56:27 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Clean up the $_REQUEST superglobal in WP_UnitTestCase_Base::clean_up_global_scope().

This resolves an issue where setting up $_REQUEST['post_type'] and not clearing it afterwards in Tests_Admin_IncludesScreen::setup_block_editor_test() started affecting a few WP_Comments_List_Table tests after [51997]. It also ensures a similar issue does not inadvertently happen in other tests.

Follow-up to [760/tests], [51997].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r51872 r51999  
    194194     */
    195195    public function clean_up_global_scope() {
    196         $_GET  = array();
    197         $_POST = array();
     196        $_GET     = array();
     197        $_POST    = array();
     198        $_REQUEST = array();
    198199        self::flush_cache();
    199200    }
Note: See TracChangeset for help on using the changeset viewer.