WordPress.org

Make WordPress Core

Changeset 39481


Ignore:
Timestamp:
12/04/2016 07:03:40 PM (18 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Correctly set up the current screen during list table tests so that they don't fail when run individually.

Props desrosj
Fixes #38761

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesListTable.php

    r38854 r39481  
    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
  • trunk/tests/phpunit/tests/multisite/wpMSSitesListTable.php

    r37736 r39481  
    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
Note: See TracChangeset for help on using the changeset viewer.