Skip to:
Content

BuddyPress.org

Changeset 11230


Ignore:
Timestamp:
11/03/2016 07:46:54 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Tests: Update BP_UnitTestCase::go_to() to not call deprecated $wp_roles method.

This is temporary, pending improvements to #WP38645, at which time we can hopefully use switch_wp_roles() instead.

File:
1 edited

Legend:

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

    r11055 r11230  
    141141
    142142    function go_to( $url ) {
    143         global $wpdb;
    144         global $current_site, $current_blog, $blog_id, $switched, $_wp_switched_stack, $public, $table_prefix, $current_user, $wp_roles;
     143        global $wpdb, $current_site, $current_blog, $blog_id, $switched, $_wp_switched_stack, $public, $table_prefix, $current_user, $wp_roles;
    145144
    146145        // note: the WP and WP_Query classes like to silently fetch parameters
     
    388387        $GLOBALS['wp']->main($parts['query']);
    389388
    390         $wp_roles->reinit();
     389        $wp_roles = new WP_Roles();
    391390        $current_user = wp_get_current_user();
    392391        $current_user->for_blog( $blog_id );
Note: See TracChangeset for help on using the changeset viewer.