From 1d1220d566444db33342d609793ca39ef352eb01 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Wed, 10 May 2017 23:02:42 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@40610 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/multisite/network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/multisite/network.php b/tests/phpunit/tests/multisite/network.php index e5106578b3..46f977c760 100644 --- a/tests/phpunit/tests/multisite/network.php +++ b/tests/phpunit/tests/multisite/network.php @@ -202,7 +202,7 @@ class Tests_Multisite_Network extends WP_UnitTestCase { $site_count = get_blog_count( self::$different_network_id ); - $this->assertSame( count( self::$different_site_ids ), $site_count ); + $this->assertEquals( count( self::$different_site_ids ), $site_count ); } /**