WordPress.org

Make WordPress Core

Changeset 451 in tests


Ignore:
Timestamp:
10/08/2011 10:13:05 PM (7 years ago)
Author:
ryan
Message:

Avoid hitting wp_die() by setting role later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testlib/base.php

    r407 r451  
    380380        // we're testing via the add_user()/edit_user() functions, which expect POST data
    381381        $_POST = array(
    382             'role' => $role,
     382            // 'role' => $role, Set this later
    383383            'user_login' => $user_login,
    384384            'pass1' => $pass,
     
    388388
    389389        $this->user_ids[] = $id = add_user();
     390
     391        $user = new WP_User( $id );
     392        $user->set_role( $role );
    390393
    391394        $_POST = array();
Note: See TracChangeset for help on using the changeset viewer.