Make WordPress Core

Ticket #52607: 52607.2.diff

File 52607.2.diff, 1.5 KB (added by SergeyBiryukov, 5 years ago)
  • tests/phpunit/tests/admin/includesPlugin.php

     
    8990
    9091                // Clean up the temporary user.
    9192                wp_delete_user( $admin_user );
     93                // Reset current screen.
     94                set_current_screen( 'front' );
    9295
    9396                // Verify the menu was inserted at the expected position.
    9497                $this->assertSame( 'custom-position', $submenu[ $parent ][ $expected_position ][2] );
     
    197200
    198201                // Clean up the temporary user.
    199202                wp_delete_user( $admin_user );
     203                // Reset current screen.
     204                set_current_screen( 'front' );
    200205
    201206                foreach ( $actual_positions as $test => $actual_position ) {
    202207                        // Verify the menu was inserted at the expected position.
     
    280286                // Clean up the temporary user.
    281287                wp_set_current_user( $current_user );
    282288                wp_delete_user( $admin_user );
     289                // Reset current screen.
     290                set_current_screen( 'front' );
    283291
    284292                // Verify the menu was inserted at the expected position.
    285293                $this->assertSame( 'main_slug', $submenu['main_slug'][0][2] );
     
    311319                // Clean up the temporary user.
    312320                wp_set_current_user( $current_user );
    313321                wp_delete_user( $admin_user );
     322                // Reset current screen.
     323                set_current_screen( 'front' );
    314324
    315325                // Verify the menu was inserted at the expected position.
    316326                $this->assertSame( 'submenu_page_1', $submenu['main_slug'][1][2] );