Tests: Reduce unnecessary count in create_many()
in multisite user tests
The tests for `is_blog_user()` and `is_user_member_of_blog()` should be refactored. Until then, we can shave several seconds from the test time by avoiding unnecessary loops of the same tests. See #36566. git-svn-id: https://develop.svn.wordpress.org/trunk@37318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
28d12c612e
commit
967eb06e1b
@ -124,7 +124,7 @@ class Tests_Multisite_User extends WP_UnitTestCase {
|
||||
|
||||
$blog_ids = array();
|
||||
|
||||
$blog_ids = self::factory()->blog->create_many( 5 );
|
||||
$blog_ids = self::factory()->blog->create_many( 1 );
|
||||
foreach ( $blog_ids as $blog_id ) {
|
||||
$this->assertInternalType( 'int', $blog_id );
|
||||
$this->assertTrue( is_blog_user( $blog_id ) );
|
||||
@ -156,7 +156,7 @@ class Tests_Multisite_User extends WP_UnitTestCase {
|
||||
$this->assertTrue( is_user_member_of_blog( $user1_id ) );
|
||||
$this->assertTrue( is_user_member_of_blog( $user1_id, $wpdb->blogid ) );
|
||||
|
||||
$blog_ids = self::factory()->blog->create_many( 5 );
|
||||
$blog_ids = self::factory()->blog->create_many( 1 );
|
||||
foreach ( $blog_ids as $blog_id ) {
|
||||
$this->assertInternalType( 'int', $blog_id );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user