Tests: Correct a number of malformed @covers tags.

As per the documentation of the `@covers` tag, global functions being covered should be prefixed with `::`. Also, the `()` after the function name is redundant.

Follow-up to [39918].

Props jrf.
See #50267.

git-svn-id: https://develop.svn.wordpress.org/trunk@48848 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-23 17:23:52 +00:00
parent e353e266a0
commit a6bb0120ac
11 changed files with 19 additions and 19 deletions

View File

@ -11,7 +11,7 @@
* Tests_Comment_IsAvatarCommentType class.
*
* @group comment
* @covers is_avatar_comment_type
* @covers ::is_avatar_comment_type
*
* @since 5.1.0
*/

View File

@ -10,7 +10,7 @@ class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase {
/**
* Test cleanup header of header comment.
*
* @covers _cleanup_header_comment
* @covers ::_cleanup_header_comment
* @dataProvider data_cleanup_header_comment
*
* @param string $test_string

View File

@ -12,7 +12,7 @@
*
* @group functions.php
* @group post
* @covers do_enclose
* @covers ::do_enclose
*
* @since 5.3.0
*/

View File

@ -5,7 +5,7 @@
*
* @since 5.3.0
*
* @covers wp_array_slice_assoc
* @covers ::wp_array_slice_assoc
* @group functions.php
*/
class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase {

View File

@ -12,7 +12,7 @@
*
* @group link
* @group privacy
* @covers get_the_privacy_policy_link
* @covers ::get_the_privacy_policy_link
*
* @since 4.9.6
*/

View File

@ -31,7 +31,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Two themes with one location each should just map, switching to a theme not previously-active.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_one_location_each() {
$this->register_nav_menu_locations( array( 'primary' ) );
@ -50,7 +50,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Only registered locations should be mapped and returned.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_filter_registered_locations() {
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
@ -72,7 +72,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Locations with the same name should map, switching to a theme not previously-active.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_locations_with_same_slug() {
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
@ -91,7 +91,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* If the new theme was previously active, we should honor any changes to nav menu mapping done when the other theme was active.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_new_theme_previously_active() {
$this->register_nav_menu_locations( array( 'primary' ) );
@ -115,7 +115,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Make educated guesses on theme locations.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_location_guessing() {
$this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
@ -138,7 +138,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Make sure two locations that fall in the same group don't get the same menu assigned.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_location_guessing_one_menu_per_group() {
$this->register_nav_menu_locations( array( 'primary' ) );
@ -159,7 +159,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
/**
* Make sure two locations that fall in the same group get menus assigned from the same group.
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_location_guessing_one_menu_per_location() {
$this->register_nav_menu_locations( array( 'primary', 'main' ) );
@ -184,7 +184,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
*
* @expectedIncorrectUsage register_nav_menus
*
* @covers ::wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
function test_numerical_locations() {
$this->register_nav_menu_locations( array( 'primary', 1 ) );
@ -209,7 +209,7 @@ class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase {
*
* @expectedIncorrectUsage register_nav_menus
*
* @covers wp_map_nav_menu_locations()
* @covers ::wp_map_nav_menu_locations
*/
public function test_numerical_old_locations() {
$this->register_nav_menu_locations( array( 'primary', 1 ) );

View File

@ -11,7 +11,7 @@
* Tests_WpPrivacyCompletedRequest class.
*
* @group privacy
* @covers _wp_privacy_completed_request
* @covers ::_wp_privacy_completed_request
*
* @since 4.9.6
*/

View File

@ -11,7 +11,7 @@
* Tests_Privacy_WpPrivacySendPersonalDataExportEmail class.
*
* @group privacy
* @covers wp_privacy_send_personal_data_export_email
* @covers ::wp_privacy_send_personal_data_export_email
*
* @since 4.9.6
*/

View File

@ -12,7 +12,7 @@
*
* @group privacy
* @group user
* @covers _wp_privacy_send_request_confirmation_notification()
* @covers ::_wp_privacy_send_request_confirmation_notification
*/
class Tests_User_WpPrivacySendRequestConfirmationNotification extends WP_UnitTestCase {
/**

View File

@ -12,7 +12,7 @@
*
* @group url
* @group privacy
* @covers get_privacy_policy_url
* @covers ::get_privacy_policy_url
*
* @since 4.9.6
*/

View File

@ -13,7 +13,7 @@
*
* @group privacy
* @group user
* @covers wp_send_user_request
* @covers ::wp_send_user_request
*/
class Tests_User_WpSendUserRequest extends WP_UnitTestCase {