Improve and reduce tests for get_blogs_of_user()

* Create half as many factory sites. See #30017
* Test the removal of a user from multiple sites.
* Expand tests to include second parameter for flagged sites.
* Remove duplicate test for deleted user.

Fixes #29996


git-svn-id: https://develop.svn.wordpress.org/trunk@29937 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt
2014-10-17 03:01:21 +00:00
parent 00f7ae376a
commit 611a4aa969
2 changed files with 47 additions and 19 deletions

View File

@@ -375,6 +375,9 @@ class Tests_User extends WP_UnitTestCase {
wpmu_delete_user( $user_id );
else
wp_delete_user( $user_id );
$user = new WP_User( $user_id );
$this->assertFalse( $user->exists(), 'WP_User->exists' );
$this->assertEquals( array(), get_blogs_of_user( $user_id ) );
}