Changeset 51419 for trunk/tests/phpunit/tests/admin/includesScreen.php
- Timestamp:
- 07/13/2021 04:13:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesScreen.php
r51367 r51419 156 156 ); 157 157 158 function setUp() {159 parent::setUp();160 set_current_screen( 'front' );161 }162 163 158 function tearDown() { 164 159 unset( $GLOBALS['wp_taxonomies']['old-or-new'] ); 165 unset( $GLOBALS['screen'] );166 unset( $GLOBALS['current_screen'] );167 160 parent::tearDown(); 168 161 } … … 312 305 ); 313 306 307 set_current_screen( 'edit.php' ); 314 308 $screen = get_current_screen(); 315 309 $screen->add_help_tab( $tab_args ); … … 373 367 ); 374 368 369 set_current_screen( 'edit.php' ); 375 370 $screen = get_current_screen(); 376 371 … … 441 436 ); 442 437 438 set_current_screen( 'edit.php' ); 443 439 $screen = get_current_screen(); 444 440 … … 457 453 458 454 function test_in_admin() { 459 $screen = get_current_screen();460 461 455 set_current_screen( 'edit.php' ); 462 456 $this->assertTrue( get_current_screen()->in_admin() ); … … 482 476 $this->assertFalse( get_current_screen()->in_admin( 'network' ) ); 483 477 $this->assertFalse( get_current_screen()->in_admin( 'user' ) ); 484 485 $GLOBALS['current_screen'] = $screen;486 478 } 487 479
Note: See TracChangeset
for help on using the changeset viewer.