From 1b82ea82848a60f07a35cf3619bd62c73634564d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 10 Nov 2019 01:53:17 +0000 Subject: [PATCH] Tests: Don't skip the tests intended for Multisite when running on single site, add them to the `ms-required` group instead. See #43438. git-svn-id: https://develop.svn.wordpress.org/trunk@46693 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/PrivacyErasePersonalData.php | 8 ++------ tests/phpunit/tests/ajax/PrivacyExportPersonalData.php | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php index 1d14fa10f9..007b92e53d 100644 --- a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php +++ b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php @@ -312,15 +312,11 @@ class Tests_Ajax_PrivacyErasePersonalData extends WP_Ajax_UnitTestCase { /** * Test requests do not succeed on multisite when the current user is not a network admin. * - * @group multisite - * * @ticket 43438 + * @group multisite + * @group ms-required */ public function test_error_when_current_user_missing_required_capabilities_multisite() { - if ( ! is_multisite() ) { - $this->markTestSkipped( 'This test only runs on multisite.' ); - } - revoke_super_admin( get_current_user_id() ); $this->_make_ajax_call(); diff --git a/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php b/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php index 739b631009..33a139d569 100644 --- a/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php +++ b/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php @@ -273,15 +273,11 @@ class Tests_Ajax_PrivacyExportPersonalData extends WP_Ajax_UnitTestCase { /** * Test requests do not succeed on multisite when the current user is not a network admin. * - * @group multisite - * * @ticket 43438 + * @group multisite + * @group ms-required */ public function test_error_when_current_user_missing_required_capability_multisite() { - if ( ! is_multisite() ) { - $this->markTestSkipped( 'This test only runs on multisite.' ); - } - revoke_super_admin( get_current_user_id() ); $this->_make_ajax_call();