Make WordPress Core


Ignore:
Timestamp:
10/24/2014 12:58:35 AM (12 years ago)
Author:
boonebgorges
Message:

Set current user to 0 after each unit test.

This prevents $current_user, $userdata, and other user-related globals from
being polluted if a previous test does not properly reset the current user.

Props nacin, mnelson4.
Fixes #29712.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r29869 r30001  
    7171                remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) );
    7272                $this->_restore_hooks();
     73                wp_set_current_user( 0 );
    7374        }
    7475
Note: See TracChangeset for help on using the changeset viewer.