Make WordPress Core

Ticket #42044: 42044.patch

File 42044.patch, 534 bytes (added by birgire, 7 years ago)

Clean up for $_REQUEST and $GLOBALS set in Tests_Admin_includesListTable::_test_list_hierarchical_page()

  • tests/phpunit/tests/admin/includesListTable.php

    diff --git tests/phpunit/tests/admin/includesListTable.php tests/phpunit/tests/admin/includesListTable.php
    index cf40457..a429a0d 100644
    class Tests_Admin_includesListTable extends WP_UnitTestCase { 
    192192                foreach ( $expected_ids as $id ) {
    193193                        $this->assertContains( sprintf( 'id="post-%d"', $id ), $output );
    194194                }
     195
     196                // Clean up
     197                unset( $_REQUEST['paged'] );
     198                unset( $GLOBALS['per_page'] );
     199
    195200        }
    196201
    197202        /**