Make WordPress Core

Changeset 53571


Ignore:
Timestamp:
06/24/2022 02:18:20 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Put @covers tags before @params in Ajax and Formatting groups.

This makes the placement more consistent with the rest of the test suite.

Follow-up to [53561], [53562].

See #39265.

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

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/CustomizeMenus.php

    r53561 r53571  
    7878         * @dataProvider data_ajax_load_available_items_cap_check
    7979         *
     80         * @covers WP_Customize_Nav_Menus::ajax_load_available_items
     81         *
    8082         * @param string $role              The role we're checking caps against.
    8183         * @param array  $expected_results  Expected results.
    82          *
    83          * @covers WP_Customize_Nav_Menus::ajax_load_available_items
    8484         */
    8585        public function test_ajax_load_available_items_cap_check( $role, $expected_results ) {
    … …  
    158158         * @dataProvider data_ajax_load_available_items_error_messages
    159159         *
     160         * @covers WP_Customize_Nav_Menus::ajax_load_available_items
     161         *
    160162         * @param array $post_args POST args.
    161163         * @param mixed $expected_results Expected results.
    162          *
    163          * @covers WP_Customize_Nav_Menus::ajax_load_available_items
    164164         */
    165165        public function test_ajax_load_available_items_error_messages( $post_args, $expected_results ) {
    … …  
    270270         * @dataProvider data_ajax_load_available_items_success_status
    271271         *
     272         * @covers WP_Customize_Nav_Menus::ajax_load_available_items
     273         *
    272274         * @param array $post_args       POST args.
    273275         * @param array $success_status  Success status.
    274          *
    275          * @covers WP_Customize_Nav_Menus::ajax_load_available_items
    276276         */
    277277        public function test_ajax_load_available_items_success_status( $post_args, $success_status ) {
    … …  
    363363         * @dataProvider data_ajax_load_available_items_structure
    364364         *
     365         * @covers WP_Customize_Nav_Menus::ajax_load_available_items
     366         *
    365367         * @param array $post_args POST args.
    366          *
    367          * @covers WP_Customize_Nav_Menus::ajax_load_available_items
    368368         */
    369369        public function test2_ajax_load_available_items_structure( $post_args ) {
    … …  
    473473         * @dataProvider data_ajax_search_available_items_caps_check
    474474         *
     475         * @covers WP_Customize_Nav_Menus::ajax_search_available_items
     476         * @covers WP_Customize_Nav_Menus::search_available_items_query
     477         *
    475478         * @param string $role             Role.
    476479         * @param array  $expected_results Expected results.
    477          *
    478          * @covers WP_Customize_Nav_Menus::ajax_search_available_items
    479          * @covers WP_Customize_Nav_Menus::search_available_items_query
    480480         */
    481481        public function test_ajax_search_available_items_caps_check( $role, $expected_results ) {
    … …  
    555555         * @dataProvider data_ajax_search_available_items_results
    556556         *
     557         * @covers WP_Customize_Nav_Menus::ajax_search_available_items
     558         * @covers WP_Customize_Nav_Menus::search_available_items_query
     559         *
    557560         * @param array $post_args        POST args.
    558561         * @param array $expected_results Expected results.
    559          *
    560          * @covers WP_Customize_Nav_Menus::ajax_search_available_items
    561          * @covers WP_Customize_Nav_Menus::search_available_items_query
    562562         */
    563563        public function test_ajax_search_available_items_results( $post_args, $expected_results ) {
  • trunk/tests/phpunit/tests/ajax/DeleteComment.php

    r53561 r53571  
    5858         * Expects test to pass.
    5959         *
    60          * @param WP_Comment $comment Comment object.
    61          * @param string     $action  Action: 'trash', 'untrash', etc.
    62          *
    6360         * @covers ::wp_ajax_delete_comment
    6461         * @covers ::_wp_ajax_delete_comment_response
     62         *
     63         * @param WP_Comment $comment Comment object.
     64         * @param string     $action  Action: 'trash', 'untrash', etc.
    6565         */
    6666        public function _test_as_admin( $comment, $action ) {
    … …  
    120120         * Expects test to fail.
    121121         *
    122          * @param WP_Comment $comment Comment object.
    123          * @param string     $action  Action: 'trash', 'untrash', etc.
    124          *
    125          * @covers ::wp_ajax_delete_comment
     122         * @covers ::wp_ajax_delete_comment
     123         *
     124         * @param WP_Comment $comment Comment object.
     125         * @param string     $action  Action: 'trash', 'untrash', etc.
    126126         */
    127127        public function _test_as_subscriber( $comment, $action ) {
    … …  
    154154         * Expects test to fail.
    155155         *
    156          * @param WP_Comment $comment Comment object.
    157          * @param string     $action  Action: 'trash', 'untrash', etc.
    158          *
    159          * @covers ::wp_ajax_delete_comment
     156         * @covers ::wp_ajax_delete_comment
     157         *
     158         * @param WP_Comment $comment Comment object.
     159         * @param string     $action  Action: 'trash', 'untrash', etc.
    160160         */
    161161        public function _test_with_bad_nonce( $comment, $action ) {
    … …  
    187187         * Expects test to fail.
    188188         *
    189          * @param WP_Comment $comment Comment object.
    190          * @param string     $action  Action: 'trash', 'untrash', etc.
    191          *
    192          * @covers ::wp_ajax_delete_comment
     189         * @covers ::wp_ajax_delete_comment
     190         *
     191         * @param WP_Comment $comment Comment object.
     192         * @param string     $action  Action: 'trash', 'untrash', etc.
    193193         */
    194194        public function _test_with_bad_id( $comment, $action ) {
    … …  
    226226         * Expects test to fail.
    227227         *
    228          * @param WP_Comment $comment Comment object.
    229          * @param string     $action  Action: 'trash', 'untrash', etc.
    230          *
    231          * @covers ::wp_ajax_delete_comment
     228         * @covers ::wp_ajax_delete_comment
     229         *
     230         * @param WP_Comment $comment Comment object.
     231         * @param string     $action  Action: 'trash', 'untrash', etc.
    232232         */
    233233        public function _test_double_action( $comment, $action ) {
  • trunk/tests/phpunit/tests/formatting/redirect.php

    r53562 r53571  
    2121         * @dataProvider get_bad_status_codes
    2222         *
     23         * @covers ::wp_redirect
     24         *
    2325         * @param string $location The path or URL to redirect to.
    2426         * @param int    $status   HTTP response status code to use.
    25          *
    26          * @covers ::wp_redirect
    2727         */
    2828        public function test_wp_redirect_bad_status_code( $location, $status ) {
Note: See TracChangeset for help on using the changeset viewer.