Make WordPress Core

Ticket #50267: 50267-2-fix-invalid-covers-tags.patch

File 50267-2-fix-invalid-covers-tags.patch, 9.2 KB (added by jrf, 4 years ago)

Fix invalid code coverage tags

  • tests/phpunit/tests/comment/isAvatarCommentType.php

    From eea156af1dccecb3d78d871141740f8702995e33 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sat, 22 Aug 2020 09:41:46 +0200
    Subject: [PATCH] Fix invalid @covers tags
    
    ---
     .../tests/comment/isAvatarCommentType.php      |  2 +-
     .../tests/functions/cleanupHeaderComment.php   |  2 +-
     tests/phpunit/tests/functions/doEnclose.php    |  2 +-
     .../tests/functions/wpArraySliceAssoc.php      |  2 +-
     .../tests/link/getThePrivacyPolicyLink.php     |  2 +-
     tests/phpunit/tests/menu/nav-menu.php          | 18 +++++++++---------
     .../privacy/wpPrivacyCompletedRequest.php      |  2 +-
     .../wpPrivacySendPersonalDataExportEmail.php   |  2 +-
     ...vacySendRequestConfirmationNotification.php |  2 +-
     .../phpunit/tests/url/getPrivacyPolicyUrl.php  |  2 +-
     tests/phpunit/tests/user/wpSendUserRequest.php |  2 +-
     11 files changed, 19 insertions(+), 19 deletions(-)
    
    diff --git a/tests/phpunit/tests/comment/isAvatarCommentType.php b/tests/phpunit/tests/comment/isAvatarCommentType.php
    index b01e019315..fe7e7482d3 100644
    a b  
    1111 * Tests_Comment_IsAvatarCommentType class.
    1212 *
    1313 * @group comment
    14  * @covers is_avatar_comment_type
     14 * @covers ::is_avatar_comment_type
    1515 *
    1616 * @since 5.1.0
    1717 */
  • tests/phpunit/tests/functions/cleanupHeaderComment.php

    diff --git a/tests/phpunit/tests/functions/cleanupHeaderComment.php b/tests/phpunit/tests/functions/cleanupHeaderComment.php
    index bf79b65d4c..9bc0d73cd5 100644
    a b class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase { 
    1010        /**
    1111         * Test cleanup header of header comment.
    1212         *
    13          * @covers _cleanup_header_comment
     13         * @covers ::_cleanup_header_comment
    1414         * @dataProvider data_cleanup_header_comment
    1515         *
    1616         * @param string $test_string
  • tests/phpunit/tests/functions/doEnclose.php

    diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php
    index c994ea360c..720eb8c728 100644
    a b  
    1212 *
    1313 * @group functions.php
    1414 * @group post
    15  * @covers do_enclose
     15 * @covers ::do_enclose
    1616 *
    1717 * @since 5.3.0
    1818 */
  • tests/phpunit/tests/functions/wpArraySliceAssoc.php

    diff --git a/tests/phpunit/tests/functions/wpArraySliceAssoc.php b/tests/phpunit/tests/functions/wpArraySliceAssoc.php
    index bedf731771..98afc785c9 100644
    a b  
    55 *
    66 * @since 5.3.0
    77 *
    8  * @covers wp_array_slice_assoc
     8 * @covers ::wp_array_slice_assoc
    99 * @group functions.php
    1010 */
    1111class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase {
  • tests/phpunit/tests/link/getThePrivacyPolicyLink.php

    diff --git a/tests/phpunit/tests/link/getThePrivacyPolicyLink.php b/tests/phpunit/tests/link/getThePrivacyPolicyLink.php
    index 3543868831..15f6e6ccbe 100644
    a b  
    1212 *
    1313 * @group link
    1414 * @group privacy
    15  * @covers get_the_privacy_policy_link
     15 * @covers ::get_the_privacy_policy_link
    1616 *
    1717 * @since 4.9.6
    1818 */
  • tests/phpunit/tests/menu/nav-menu.php

    diff --git a/tests/phpunit/tests/menu/nav-menu.php b/tests/phpunit/tests/menu/nav-menu.php
    index af67f98379..39e9ed4924 100644
    a b class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    3131        /**
    3232         * Two themes with one location each should just map, switching to a theme not previously-active.
    3333         *
    34          * @covers ::wp_map_nav_menu_locations()
     34         * @covers ::wp_map_nav_menu_locations
    3535         */
    3636        function test_one_location_each() {
    3737                $this->register_nav_menu_locations( array( 'primary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    5050        /**
    5151         * Only registered locations should be mapped and returned.
    5252         *
    53          * @covers ::wp_map_nav_menu_locations()
     53         * @covers ::wp_map_nav_menu_locations
    5454         */
    5555        function test_filter_registered_locations() {
    5656                $this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    7272        /**
    7373         * Locations with the same name should map, switching to a theme not previously-active.
    7474         *
    75          * @covers ::wp_map_nav_menu_locations()
     75         * @covers ::wp_map_nav_menu_locations
    7676         */
    7777        function test_locations_with_same_slug() {
    7878                $this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    9191        /**
    9292         * If the new theme was previously active, we should honor any changes to nav menu mapping done when the other theme was active.
    9393         *
    94          * @covers ::wp_map_nav_menu_locations()
     94         * @covers ::wp_map_nav_menu_locations
    9595         */
    9696        function test_new_theme_previously_active() {
    9797                $this->register_nav_menu_locations( array( 'primary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    115115        /**
    116116         * Make educated guesses on theme locations.
    117117         *
    118          * @covers ::wp_map_nav_menu_locations()
     118         * @covers ::wp_map_nav_menu_locations
    119119         */
    120120        function test_location_guessing() {
    121121                $this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    138138        /**
    139139         * Make sure two locations that fall in the same group don't get the same menu assigned.
    140140         *
    141          * @covers ::wp_map_nav_menu_locations()
     141         * @covers ::wp_map_nav_menu_locations
    142142         */
    143143        function test_location_guessing_one_menu_per_group() {
    144144                $this->register_nav_menu_locations( array( 'primary' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    159159        /**
    160160         * Make sure two locations that fall in the same group get menus assigned from the same group.
    161161         *
    162          * @covers ::wp_map_nav_menu_locations()
     162         * @covers ::wp_map_nav_menu_locations
    163163         */
    164164        function test_location_guessing_one_menu_per_location() {
    165165                $this->register_nav_menu_locations( array( 'primary', 'main' ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    184184         *
    185185         * @expectedIncorrectUsage register_nav_menus
    186186         *
    187          * @covers ::wp_map_nav_menu_locations()
     187         * @covers ::wp_map_nav_menu_locations
    188188         */
    189189        function test_numerical_locations() {
    190190                $this->register_nav_menu_locations( array( 'primary', 1 ) );
    class Tests_Nav_Menu_Theme_Change extends WP_UnitTestCase { 
    209209         *
    210210         * @expectedIncorrectUsage register_nav_menus
    211211         *
    212          * @covers wp_map_nav_menu_locations()
     212         * @covers ::wp_map_nav_menu_locations
    213213         */
    214214        public function test_numerical_old_locations() {
    215215                $this->register_nav_menu_locations( array( 'primary', 1 ) );
  • tests/phpunit/tests/privacy/wpPrivacyCompletedRequest.php

    diff --git a/tests/phpunit/tests/privacy/wpPrivacyCompletedRequest.php b/tests/phpunit/tests/privacy/wpPrivacyCompletedRequest.php
    index 71884dc7d8..b3d45a9c89 100644
    a b  
    1111 * Tests_WpPrivacyCompletedRequest class.
    1212 *
    1313 * @group privacy
    14  * @covers _wp_privacy_completed_request
     14 * @covers ::_wp_privacy_completed_request
    1515 *
    1616 * @since 4.9.6
    1717 */
  • tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php

    diff --git a/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php b/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php
    index 010a01434a..54c775ae49 100644
    a b  
    1111 * Tests_Privacy_WpPrivacySendPersonalDataExportEmail class.
    1212 *
    1313 * @group privacy
    14  * @covers wp_privacy_send_personal_data_export_email
     14 * @covers ::wp_privacy_send_personal_data_export_email
    1515 *
    1616 * @since 4.9.6
    1717 */
  • tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php

    diff --git a/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php b/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php
    index ce76fa2f43..5cce5cc02d 100644
    a b  
    1212 *
    1313 * @group privacy
    1414 * @group user
    15  * @covers _wp_privacy_send_request_confirmation_notification()
     15 * @covers ::_wp_privacy_send_request_confirmation_notification
    1616 */
    1717class Tests_User_WpPrivacySendRequestConfirmationNotification extends WP_UnitTestCase {
    1818        /**
  • tests/phpunit/tests/url/getPrivacyPolicyUrl.php

    diff --git a/tests/phpunit/tests/url/getPrivacyPolicyUrl.php b/tests/phpunit/tests/url/getPrivacyPolicyUrl.php
    index 69384702da..67d10a6a3d 100644
    a b  
    1212 *
    1313 * @group url
    1414 * @group privacy
    15  * @covers get_privacy_policy_url
     15 * @covers ::get_privacy_policy_url
    1616 *
    1717 * @since 4.9.6
    1818 */
  • tests/phpunit/tests/user/wpSendUserRequest.php

    diff --git a/tests/phpunit/tests/user/wpSendUserRequest.php b/tests/phpunit/tests/user/wpSendUserRequest.php
    index 68795cd93a..bbc02ea98d 100644
    a b  
    1313 *
    1414 * @group privacy
    1515 * @group user
    16  * @covers wp_send_user_request
     16 * @covers ::wp_send_user_request
    1717 */
    1818class Tests_User_WpSendUserRequest extends WP_UnitTestCase {
    1919