WordPress.org

Make WordPress Core

Changeset 989 in tests


Ignore:
Timestamp:
08/21/2012 06:42:19 PM (6 years ago)
Author:
ryan
Message:

Test ms_is_switched()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ms.php

    r968 r989  
    352352
    353353    function test_switch_restore_blog() {
    354         global $_wp_switched, $_wp_switched_stack, $wpdb;
     354        global $_wp_switched_stack, $wpdb;
    355355
    356356        $this->assertEquals( array(), $_wp_switched_stack );
    357         $this->assertFalse( $_wp_switched );
     357        $this->assertFalse( ms_is_switched() );
    358358        $current_blog_id = get_current_blog_id();
    359359        $this->assertInternalType( 'integer', $current_blog_id );
     
    379379        switch_to_blog( $blog_id );
    380380        $this->assertEquals( array( $current_blog_id ), $_wp_switched_stack );
    381         $this->assertTrue( $_wp_switched );
     381        $this->assertTrue( ms_is_switched() );
    382382        $this->assertEquals( $blog_id, $wpdb->blogid );
    383383        $this->assertFalse( wp_cache_get( 'switch-test', 'switch-test' ) );
     
    387387        switch_to_blog( $blog_id );
    388388        $this->assertEquals( array( $current_blog_id, $blog_id ), $_wp_switched_stack );
    389         $this->assertTrue( $_wp_switched );
     389        $this->assertTrue( ms_is_switched() );
    390390        $this->assertEquals( $blog_id, $wpdb->blogid );
    391391        $this->assertEquals( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );
     
    393393        restore_current_blog();
    394394        $this->assertEquals( array( $current_blog_id ), $_wp_switched_stack );
    395         $this->assertTrue( $_wp_switched );
     395        $this->assertTrue( ms_is_switched() );
    396396        $this->assertEquals( $blog_id, $wpdb->blogid );
    397397        $this->assertEquals( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );
     
    400400        $this->assertEquals( $current_blog_id, get_current_blog_id() );
    401401        $this->assertEquals( array(), $_wp_switched_stack );
    402         $this->assertFalse( $_wp_switched );
     402        $this->assertFalse( ms_is_switched() );
    403403        $this->assertEquals( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );
    404404
Note: See TracChangeset for help on using the changeset viewer.