Make WordPress Core

Changeset 40610


Ignore:
Timestamp:
05/10/2017 11:02:42 PM (8 years ago)
Author:
flixos90
Message:

Multisite: Fix unstable unit test for get_blog_count().

The unit test introduced in [40370] used the strict assertSame() check while comparison a count with the value of an option, which under most conditions is not an integer. While the test passed on some setups, it failed on others. This changeset ensures that assertEquals() is used to make the test stable.

Fixes #40724.

File:
1 edited

Legend:

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

    r40590 r40610  
    203203        $site_count = get_blog_count( self::$different_network_id );
    204204
    205         $this->assertSame( count( self::$different_site_ids ), $site_count );
     205        $this->assertEquals( count( self::$different_site_ids ), $site_count );
    206206    }
    207207
Note: See TracChangeset for help on using the changeset viewer.