From 5f8758953f4735cabddea583c5156e4dd062bcdb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Feb 2023 16:10:13 +0000 Subject: [PATCH] Tests: Merge file-level and class-level DocBlocks in various unit test files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#6-file-headers documentation standards], whenever possible, all WordPress files should contain a header DocBlock, regardless of the file’s contents – this includes files containing classes. However, this recommendation makes less sense for unit test classes if not applied consistently, and the duplicate tags cause some confusion. This commit aims to reduce confusion and avoid repeating information by combining the DocBlocks. Follow-up to [40607], [43183], [43291], [43292], [43499], [43568], [44502], [44535], [44628], [44786], [44824], [44906], [44909], [46175]. Props wojtekn, antonvlasenko, arafatjamil01, hztyfoon, mukesh27, costdev, jamilbd07, robinwpdeveloper, SergeyBiryukov. Fixes #57099. git-svn-id: https://develop.svn.wordpress.org/trunk@55337 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/wpCommunityEvents.php | 6 ------ tests/phpunit/tests/admin/wpPrivacyRequestsTable.php | 6 ------ .../tests/ajax/wpAjaxWpPrivacyErasePersonalData.php | 6 ------ .../tests/ajax/wpAjaxWpPrivacyExportPersonalData.php | 6 ------ tests/phpunit/tests/comment/isAvatarCommentType.php | 6 ------ tests/phpunit/tests/functions/doEnclose.php | 7 +------ tests/phpunit/tests/privacy/wpCreateUserRequest.php | 8 +------- tests/phpunit/tests/privacy/wpPrivacyCompletedRequest.php | 8 +------- .../tests/privacy/wpPrivacyDeleteOldExportFiles.php | 8 +------- .../privacy/wpPrivacyGeneratePersonalDataExportFile.php | 8 +------- .../wpPrivacyGeneratePersonalDataExportGroupHtml.php | 6 ------ .../privacy/wpPrivacyProcessPersonalDataExportPage.php | 6 ------ .../wpPrivacySendErasureFulfillmentNotification.php | 6 ------ .../privacy/wpPrivacySendPersonalDataExportEmail.php | 6 ------ .../wpPrivacySendRequestConfirmationNotification.php | 6 ------ tests/phpunit/tests/user/wpSendUserRequest.php | 6 ------ 16 files changed, 5 insertions(+), 100 deletions(-) diff --git a/tests/phpunit/tests/admin/wpCommunityEvents.php b/tests/phpunit/tests/admin/wpCommunityEvents.php index 6dfd4f044a..6b8ccc7f9b 100644 --- a/tests/phpunit/tests/admin/wpCommunityEvents.php +++ b/tests/phpunit/tests/admin/wpCommunityEvents.php @@ -5,15 +5,9 @@ * @package WordPress * @subpackage UnitTests * @since 4.8.0 - */ - -/** - * Class Tests_Admin_wpCommunityEvents. * * @group admin * @group community-events - * - * @since 4.8.0 */ class Tests_Admin_wpCommunityEvents extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php index 7f555c4d25..c26628d0fe 100644 --- a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php +++ b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php @@ -5,15 +5,9 @@ * @package WordPress\UnitTests * * @since 5.1.0 - */ - -/** - * Tests_Admin_wpPrivacyRequestsTable class. * * @group admin * @group privacy - * - * @since 5.1.0 */ class Tests_Admin_wpPrivacyRequestsTable extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/wpAjaxWpPrivacyErasePersonalData.php b/tests/phpunit/tests/ajax/wpAjaxWpPrivacyErasePersonalData.php index 068165b991..4f76ea12fb 100644 --- a/tests/phpunit/tests/ajax/wpAjaxWpPrivacyErasePersonalData.php +++ b/tests/phpunit/tests/ajax/wpAjaxWpPrivacyErasePersonalData.php @@ -4,12 +4,6 @@ * * @package WordPress\UnitTests * @since 5.2.0 - */ - -/** - * Tests_Ajax_PrivacyExportPersonalData class. - * - * @since 5.2.0 * * @group ajax * @group privacy diff --git a/tests/phpunit/tests/ajax/wpAjaxWpPrivacyExportPersonalData.php b/tests/phpunit/tests/ajax/wpAjaxWpPrivacyExportPersonalData.php index f8e588ff5e..51e4cb1391 100644 --- a/tests/phpunit/tests/ajax/wpAjaxWpPrivacyExportPersonalData.php +++ b/tests/phpunit/tests/ajax/wpAjaxWpPrivacyExportPersonalData.php @@ -4,12 +4,6 @@ * * @package WordPress\UnitTests * @since 5.2.0 - */ - -/** - * Tests_Ajax_PrivacyExportPersonalData class. - * - * @since 5.2.0 * * @group ajax * @group privacy diff --git a/tests/phpunit/tests/comment/isAvatarCommentType.php b/tests/phpunit/tests/comment/isAvatarCommentType.php index 57ed593b1b..f45caae93b 100644 --- a/tests/phpunit/tests/comment/isAvatarCommentType.php +++ b/tests/phpunit/tests/comment/isAvatarCommentType.php @@ -5,15 +5,9 @@ * @package WordPress\UnitTests * * @since 5.1.0 - */ - -/** - * Tests_Comment_IsAvatarCommentType class. * * @group comment * - * @since 5.1.0 - * * @covers ::is_avatar_comment_type */ class Tests_Comment_IsAvatarCommentType extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index e907f179df..41ad26a338 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -1,16 +1,11 @@