From 3231e7b1b1bdc9325f7d9eed3cc61bed16ff624b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 29 Oct 2022 15:42:26 +0000 Subject: [PATCH] Tests: Remove `skipWithMultisite()` and `skipWithoutMultisite()` from `get_user_count()` tests. As the tests belong to either the `ms-excluded` or the `ms-required` group, the skipping should not be necessary. While these methods were initially intended to be used in conjunction with the respective group, the PHPUnit configuration files for single site and multisite exclude these groups as appropriate, so calling these methods explicitly is no longer required. Follow-up to [40520], [40543], [40564], [43005], [46683], [53011]. See #56793. git-svn-id: https://develop.svn.wordpress.org/trunk@54719 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/getUserCount.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/tests/user/getUserCount.php b/tests/phpunit/tests/user/getUserCount.php index f6a94d5624..4aee753288 100644 --- a/tests/phpunit/tests/user/getUserCount.php +++ b/tests/phpunit/tests/user/getUserCount.php @@ -11,7 +11,6 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { * @group ms-required */ public function test_wp_update_network_counts_on_different_network() { - $this->skipWithoutMultisite(); $different_network_id = self::factory()->network->create( array( 'domain' => 'wordpress.org', @@ -34,7 +33,6 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { * @group ms-required */ public function test_get_user_count_on_different_network() { - $this->skipWithoutMultisite(); $different_network_id = self::factory()->network->create( array( 'domain' => 'wordpress.org', @@ -60,7 +58,6 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { * @group ms-required */ public function test_enable_live_network_user_counts_filter() { - $this->skipWithoutMultisite(); // False for large networks by default. add_filter( 'enable_live_network_counts', '__return_false' ); @@ -102,11 +99,10 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { } /** - * @group ms-excluded * @ticket 38741 + * @group ms-excluded */ public function test_get_user_count_update_on_delete() { - $this->skipWithMultisite(); wp_update_user_counts(); $current_network_user_count = get_user_count(); @@ -124,11 +120,10 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { } /** - * @group ms-required * @ticket 38741 + * @group ms-required */ public function test_get_user_count_update_on_delete_multisite() { - $this->skipWithoutMultisite(); wp_update_user_counts(); $current_network_user_count = get_user_count(); @@ -146,12 +141,11 @@ class Tests_User_GetUserCount extends WP_UnitTestCase { } /** + * @ticket 38741 * @group multisite * @group ms-required - * @ticket 38741 */ public function test_get_user_count() { - $this->skipWithoutMultisite(); // Refresh the cache. wp_update_network_counts(); $start_count = get_user_count();