Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/10/2014 08:47:50 PM (12 years ago)
Author:
boonebgorges
Message:

In bp_core_ajax_url() tests, narrow the scope of the blog switch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/url/url.php

    r7059 r8110  
    5252            buddypress()->root_blog_id = $blog_id;
    5353
    54             switch_to_blog( $blog_id );
    55             $blog_details = get_blog_details();
     54            $blog_url = get_blog_option( $blog_id, 'siteurl' );
    5655
    57             $this->go_to( $blog_details->path );
    58             $this->assertEquals( $blog_details->siteurl . '/wp-admin/admin-ajax.php', bp_core_ajax_url() );
     56            $this->go_to( $blog_url );
     57            buddypress()->root_blog_id = $original_root_blog;
     58            $ajax_url = bp_core_ajax_url();
     59            $this->go_to( '/' );
    5960
    60             restore_current_blog();
    61             buddypress()->root_blog_id = $original_root_blog;
     61            $this->assertEquals( $blog_url . '/wp-admin/admin-ajax.php', $ajax_url );
    6262        }
    63 
    6463    }
    6564}
Note: See TracChangeset for help on using the changeset viewer.