Build/Test Tools: Clean up `$_REQUEST` and `$GLOBALS` after modifying them in `_test_list_hierarchical_page()`.

Props birgire.
Fixes #42044.

git-svn-id: https://develop.svn.wordpress.org/trunk@41929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-10-18 21:47:39 +00:00
parent 40706838a1
commit 66f9609763
1 changed files with 4 additions and 0 deletions

View File

@ -185,6 +185,10 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase {
$this->table->display_rows( $pages->posts );
$output = ob_get_clean();
// Clean up.
unset( $_REQUEST['paged'] );
unset( $GLOBALS['per_page'] );
preg_match_all( '|<tr[^>]*>|', $output, $matches );
$this->assertCount( count( $expected_ids ), array_keys( $matches[0] ) );