Changeset 41138 for trunk/tests/phpunit/tests/user/wpGetUsersWithNoRole.php
- Timestamp:
- 07/25/2017 12:23:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/wpGetUsersWithNoRole.php
r40564 r41138 37 37 /** 38 38 * @ticket 22993 39 * @ticket 36196 39 40 * @group multisite 40 41 * @group ms-required … … 57 58 ) ); 58 59 59 // Add users to blogs60 // Add editor to blog 1 60 61 add_user_to_blog( $blog_1, $editor, 'editor' ); 61 62 62 63 // Test users on root site 63 64 $users = wp_get_users_with_no_role(); 65 $this->assertSame( array( 66 "{$nobody}", 67 ), $users ); 68 69 // Test users counts on blog 1 70 $users = wp_get_users_with_no_role( $blog_1 ); 64 71 $this->assertSame( array(), $users ); 65 72 66 // Test users counts on blog 1 67 switch_to_blog( $blog_1 ); 68 $users = wp_get_users_with_no_role(); 69 restore_current_blog(); 73 // Add admin to blog 1 with no role 74 add_user_to_blog( $blog_1, $admin, '' ); 70 75 71 // Test users on root site 72 $this->assertSame( array(), $users ); 73 76 // Re-test users counts on blog 1 77 $users = wp_get_users_with_no_role( $blog_1 ); 78 $this->assertSame( array( 79 "{$admin}", 80 ), $users ); 74 81 } 75 82
Note: See TracChangeset
for help on using the changeset viewer.