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


git-svn-id: https://develop.svn.wordpress.org/trunk@39481 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-12-04 19:03:40 +00:00
parent b16f57240e
commit 6861a9aac0
2 changed files with 2 additions and 4 deletions

View File

@ -16,9 +16,7 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase {
function setUp() {
parent::setUp();
set_current_screen( 'edit-page' );
$GLOBALS['hook_suffix'] = '';
$this->table = _get_list_table( 'WP_Posts_List_Table' );
$this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) );
}
public static function wpSetUpBeforeClass( $factory ) {

View File

@ -16,7 +16,7 @@ class Tests_WP_MS_Sites_List_Table extends WP_UnitTestCase {
function setUp() {
parent::setUp();
$this->table = _get_list_table( 'WP_MS_Sites_List_Table' );
$this->table = _get_list_table( 'WP_MS_Sites_List_Table', array( 'screen' => 'ms-sites' ) );
}
public static function wpSetUpBeforeClass( $factory ) {