WordPress.org

Make WordPress Core

Ticket #38761: 38761.diff

File 38761.diff, 1.1 KB (added by desrosj, 4 years ago)

Fixes issue with test failing when called directly.

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

     
    1616
    1717        function setUp() {
    1818                parent::setUp();
    19                 set_current_screen( 'edit-page' );
    20                 $GLOBALS['hook_suffix'] = '';
    21                 $this->table = _get_list_table( 'WP_Posts_List_Table' );
     19                $this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) );
    2220        }
    2321
    2422        public static function wpSetUpBeforeClass( $factory ) {
  • tests/phpunit/tests/multisite/wpMSSitesListTable.php

     
    1616
    1717        function setUp() {
    1818                parent::setUp();
    19                 $this->table = _get_list_table( 'WP_MS_Sites_List_Table' );
     19                $this->table = _get_list_table( 'WP_MS_Sites_List_Table', array( 'screen' => 'ms-sites' ) );
    2020        }
    2121
    2222        public static function wpSetUpBeforeClass( $factory ) {