WordPress.org

Make WordPress Core

Changeset 37318


Ignore:
Timestamp:
04/27/2016 06:32:47 AM (4 years ago)
Author:
jeremyfelt
Message:

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.

File:
1 edited

Legend:

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

    r35242 r37318  
    125125        $blog_ids = array();
    126126
    127         $blog_ids = self::factory()->blog->create_many( 5 );
     127        $blog_ids = self::factory()->blog->create_many( 1 );
    128128        foreach ( $blog_ids as $blog_id ) {
    129129            $this->assertInternalType( 'int', $blog_id );
     
    157157        $this->assertTrue( is_user_member_of_blog( $user1_id, $wpdb->blogid ) );
    158158
    159         $blog_ids = self::factory()->blog->create_many( 5 );
     159        $blog_ids = self::factory()->blog->create_many( 1 );
    160160        foreach ( $blog_ids as $blog_id ) {
    161161            $this->assertInternalType( 'int', $blog_id );
Note: See TracChangeset for help on using the changeset viewer.