WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/27/2015 08:01:37 PM (4 years ago)
Author:
johnbillion
Message:

Improve the efficiency of is_user_member_of_blog() by removing its use of get_blogs_of_user(). Adds additional tests.

Fixes #32472
Props BinaryKitten, sammybeats, johnbillion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user.php

    r33115 r33771  
    367367        $old_current = get_current_user_id();
    368368
     369        $this->assertSame( 0, $old_current );
     370
     371        // test for "get current user" when not logged in
     372        $this->assertFalse( is_user_member_of_blog() );
     373
    369374        $user_id = $this->factory->user->create( array( 'role' => 'subscriber' ) );
    370375        wp_set_current_user( $user_id );
Note: See TracChangeset for help on using the changeset viewer.