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:
parent
b16f57240e
commit
6861a9aac0
@ -16,9 +16,7 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase {
|
|||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
set_current_screen( 'edit-page' );
|
$this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) );
|
||||||
$GLOBALS['hook_suffix'] = '';
|
|
||||||
$this->table = _get_list_table( 'WP_Posts_List_Table' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function wpSetUpBeforeClass( $factory ) {
|
public static function wpSetUpBeforeClass( $factory ) {
|
||||||
|
@ -16,7 +16,7 @@ class Tests_WP_MS_Sites_List_Table extends WP_UnitTestCase {
|
|||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
parent::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 ) {
|
public static function wpSetUpBeforeClass( $factory ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user