WordPress.org

Make WordPress Core

Changeset 48848


Ignore:
Timestamp:
08/23/2020 05:23:52 PM (15 months ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/tests/phpunit/tests
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/isAvatarCommentType.php

    r46644 r48848  
    1212 *
    1313 * @group comment
    14  * @covers is_avatar_comment_type
     14 * @covers ::is_avatar_comment_type
    1515 *
    1616 * @since 5.1.0
  • trunk/tests/phpunit/tests/functions/cleanupHeaderComment.php

    r48466 r48848  
    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     *
  • trunk/tests/phpunit/tests/functions/doEnclose.php

    r48621 r48848  
    1313 * @group functions.php
    1414 * @group post
    15  * @covers do_enclose
     15 * @covers ::do_enclose
    1616 *
    1717 * @since 5.3.0
  • trunk/tests/phpunit/tests/functions/wpArraySliceAssoc.php

    r47780 r48848  
    66 * @since 5.3.0
    77 *
    8  * @covers wp_array_slice_assoc
     8 * @covers ::wp_array_slice_assoc
    99 * @group functions.php
    1010 */
  • trunk/tests/phpunit/tests/link/getThePrivacyPolicyLink.php

    r46586 r48848  
    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
  • trunk/tests/phpunit/tests/menu/nav-menu.php

    r46586 r48848  
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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() {
  • trunk/tests/phpunit/tests/privacy/wpPrivacyCompletedRequest.php

    r46586 r48848  
    1212 *
    1313 * @group privacy
    14  * @covers _wp_privacy_completed_request
     14 * @covers ::_wp_privacy_completed_request
    1515 *
    1616 * @since 4.9.6
  • trunk/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php

    r48330 r48848  
    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
  • trunk/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php

    r48100 r48848  
    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 {
  • trunk/tests/phpunit/tests/url/getPrivacyPolicyUrl.php

    r46586 r48848  
    1313 * @group url
    1414 * @group privacy
    15  * @covers get_privacy_policy_url
     15 * @covers ::get_privacy_policy_url
    1616 *
    1717 * @since 4.9.6
  • trunk/tests/phpunit/tests/user/wpSendUserRequest.php

    r48581 r48848  
    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 {
Note: See TracChangeset for help on using the changeset viewer.