Skip to:
Content

BuddyPress.org

Changeset 11272


Ignore:
Timestamp:
12/07/2016 08:46:07 PM (8 years ago)
Author:
djpaul
Message:

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

Fix for 2.7 branch. See r11230 for trunk, and #WP38645.

Props johnjamesjacoby

Location:
branches/2.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7

    • Property svn:mergeinfo changed
      /trunk (added)merged: 11230
  • branches/2.7/tests/phpunit/includes/testcase.php

    r11055 r11272  
    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.