Make WordPress Core

Changeset 50344


Ignore:
Timestamp:
02/15/2021 02:00:02 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Tests: Add missing @covers tags for files in phpunit/tests/http/.

Props patopaiar, jrf.
See #39265.

Location:
trunk/tests/phpunit/tests/http
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/http/base.php

    r49184 r50344  
    5252        }
    5353
     54        /**
     55         * @covers ::wp_remote_request
     56         */
    5457        function test_redirect_on_301() {
    5558                // 5 : 5 & 301.
     
    6164        }
    6265
     66        /**
     67         * @covers ::wp_remote_request
     68         */
    6369        function test_redirect_on_302() {
    6470                // 5 : 5 & 302.
     
    7278        /**
    7379         * @ticket 16855
     80         *
     81         * @covers ::wp_remote_request
    7482         */
    7583        function test_redirect_on_301_no_redirect() {
     
    8492        /**
    8593         * @ticket 16855
     94         *
     95         * @covers ::wp_remote_request
    8696         */
    8797        function test_redirect_on_302_no_redirect() {
     
    94104        }
    95105
     106        /**
     107         * @covers ::wp_remote_request
     108         */
    96109        function test_redirections_equal() {
    97110                // 5 - 5.
     
    103116        }
    104117
     118        /**
     119         * @covers ::wp_remote_request
     120         */
    105121        function test_no_head_redirections() {
    106122                // No redirections on HEAD request.
     
    114130        /**
    115131         * @ticket 16855
     132         *
     133         * @covers ::wp_remote_request
    116134         */
    117135        function test_redirect_on_head() {
     
    130148        }
    131149
     150        /**
     151         * @covers ::wp_remote_request
     152         */
    132153        function test_redirections_greater() {
    133154                // 10 > 5.
     
    138159        }
    139160
     161        /**
     162         * @covers ::wp_remote_request
     163         */
    140164        function test_redirections_greater_edgecase() {
    141165                // 6 > 5 (close edge case).
     
    146170        }
    147171
     172        /**
     173         * @covers ::wp_remote_request
     174         */
    148175        function test_redirections_less_edgecase() {
    149176                // 4 < 5 (close edge case).
     
    156183        /**
    157184         * @ticket 16855
     185         *
     186         * @covers ::wp_remote_request
    158187         */
    159188        function test_redirections_zero_redirections_specified() {
     
    170199         *
    171200         * @ticket 16889
     201         *
     202         * @covers ::wp_remote_request
    172203         */
    173204        function test_location_header_on_201() {
     
    184215         *
    185216         * @ticket 16889
     217         *
     218         * @covers ::wp_remote_request
     219         * @covers ::wp_remote_retrieve_body
    186220         */
    187221        function test_no_redirection_on_PUT() {
     
    204238        /**
    205239         * @ticket 11888
     240         *
     241         * @covers ::wp_remote_request
    206242         */
    207243        function test_send_headers() {
     
    234270        }
    235271
     272        /**
     273         * @covers ::wp_remote_request
     274         */
    236275        function test_file_stream() {
    237276                $url  = $this->file_stream_url;
     
    261300        /**
    262301         * @ticket 26726
     302         *
     303         * @covers ::wp_remote_request
    263304         */
    264305        function test_file_stream_limited_size() {
     
    290331         *
    291332         * @ticket 31172
     333         *
     334         * @covers ::wp_remote_request
    292335         */
    293336        function test_request_limited_size() {
     
    314357         *
    315358         * @ticket 17588
     359         *
     360         * @covers ::wp_remote_post
     361         * @covers ::wp_remote_retrieve_body
    316362         */
    317363        function test_post_redirect_to_method_300( $response_code, $method ) {
     
    353399         *
    354400         * @ticket 24182
     401         *
     402         * @covers ::wp_remote_get
     403         * @covers ::wp_remote_retrieve_body
    355404         */
    356405        function test_ip_url_with_host_header() {
     
    376425         *
    377426         * @ticket 33978
     427         *
     428         * @covers ::wp_remote_head
    378429         */
    379430        function test_https_url_without_ssl_verification() {
     
    398449         *
    399450         * @ticket 16890
     451         *
     452         * @covers ::wp_remote_head
     453         * @covers ::wp_remote_retrieve_header
     454         * @covers ::wp_remote_get
     455         * @covers ::wp_remote_retrieve_body
    400456         */
    401457        function test_multiple_location_headers() {
     
    418474         *
    419475         * @ticket 21182
     476         *
     477         * @covers ::wp_remote_get
     478         * @covers ::wp_remote_retrieve_body
    420479         */
    421480        function test_cookie_handling() {
     
    433492         * @group ssl
    434493         * @ticket 25007
     494         *
     495         * @covers ::wp_remote_get
    435496         */
    436497        function test_ssl() {
     
    447508        /**
    448509         * @ticket 37733
     510         *
     511         * @covers ::wp_remote_request
    449512         */
    450513        function test_url_with_double_slashes_path() {
  • trunk/tests/phpunit/tests/http/curl.php

    r49184 r50344  
    1212        /**
    1313         * @ticket 39783
     14         *
     15         * @covers ::wp_remote_request
    1416         */
    1517        public function test_http_api_curl_stream_parameter_is_a_reference() {
  • trunk/tests/phpunit/tests/http/functions.php

    r49025 r50344  
    88class Tests_HTTP_Functions extends WP_UnitTestCase {
    99
     10        /**
     11         * @covers ::wp_remote_head
     12         */
    1013        function test_head_request() {
    1114                // This URL gives a direct 200 response.
     
    2427        }
    2528
     29        /**
     30         * @covers ::wp_remote_head
     31         */
    2632        function test_head_redirect() {
    2733                // This URL will 301 redirect.
     
    3339        }
    3440
     41        /**
     42         * @covers ::wp_remote_head
     43         */
    3544        function test_head_404() {
    3645                $url      = 'https://asdftestblog1.files.wordpress.com/2007/09/awefasdfawef.jpg';
     
    4150        }
    4251
     52        /**
     53         * @covers ::wp_remote_get
     54         * @covers ::wp_remote_retrieve_headers
     55         * @covers ::wp_remote_retrieve_response_code
     56         */
    4357        function test_get_request() {
    4458                $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';
     
    5872        }
    5973
     74        /**
     75         * @covers ::wp_remote_get
     76         * @covers ::wp_remote_retrieve_headers
     77         * @covers ::wp_remote_retrieve_response_code
     78         */
    6079        function test_get_redirect() {
    6180                // This will redirect to asdftestblog1.files.wordpress.com.
     
    7493        }
    7594
     95        /**
     96         * @covers ::wp_remote_get
     97         */
    7698        function test_get_redirect_limit_exceeded() {
    7799                // This will redirect to asdftestblog1.files.wordpress.com.
     
    87109        /**
    88110         * @ticket 33711
     111         *
     112         * @covers ::wp_remote_head
     113         * @covers ::wp_remote_retrieve_cookies
     114         * @covers ::wp_remote_retrieve_cookie
     115         * @covers ::wp_remote_retrieve_cookie_value
    89116         */
    90117        function test_get_response_cookies() {
     
    116143        /**
    117144         * @ticket 37437
     145         *
     146         * @covers ::wp_remote_get
     147         * @covers ::wp_remote_retrieve_cookies
     148         * @covers ::wp_remote_retrieve_cookie
    118149         */
    119150        function test_get_response_cookies_with_wp_http_cookie_object() {
     
    148179        /**
    149180         * @ticket 37437
     181         *
     182         * @covers ::wp_remote_get
     183         * @covers ::wp_remote_retrieve_cookies
     184         * @covers ::wp_remote_retrieve_cookie
    150185         */
    151186        function test_get_response_cookies_with_name_value_array() {
     
    175210        /**
    176211         * @ticket 43231
     212         *
     213         * @covers WP_HTTP_Requests_Response::__construct
     214         * @covers ::wp_remote_retrieve_cookies
     215         * @covers ::wp_remote_retrieve_cookie
     216         * @covers WP_Http
    177217         */
    178218        function test_get_cookie_host_only() {
  • trunk/tests/phpunit/tests/http/getHttpHeaders.php

    r46586 r50344  
    33/**
    44 * @group http
     5 * @covers ::wp_get_http_headers
    56 */
    67class Tests_HTTP_GetHttpHeaders extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/http/http.php

    r48937 r50344  
    1111        /**
    1212         * @dataProvider make_absolute_url_testcases
     13         *
     14         * @covers ::WP_Http::make_absolute_url
    1315         */
    1416        function test_make_absolute_url( $relative_url, $absolute_url, $expected ) {
     
    7072        /**
    7173         * @dataProvider parse_url_testcases
     74         *
     75         * @covers ::wp_parse_url
    7276         */
    7377        function test_wp_parse_url( $url, $expected ) {
     
    181185        /**
    182186         * @ticket 36356
     187         *
     188         * @covers ::wp_parse_url
    183189         */
    184190        function test_wp_parse_url_with_default_component() {
     
    203209         *
    204210         * @dataProvider parse_url_component_testcases
     211         *
     212         * @covers ::wp_parse_url
    205213         */
    206214        function test_wp_parse_url_with_component( $url, $component, $expected ) {
     
    262270        /**
    263271         * @ticket 35426
     272         *
     273         * @covers ::get_status_header_desc
    264274         */
    265275        public function test_http_response_code_constants() {
     
    278288        /**
    279289         * @ticket 37768
     290         *
     291         * @covers WP_Http::normalize_cookies
    280292         */
    281293        public function test_normalize_cookies_scalar_values() {
     
    313325         *
    314326         * @dataProvider get_component_from_parsed_url_array_testcases
     327         *
     328         * @covers ::wp_parse_url
     329         * @covers ::_get_component_from_parsed_url_array
    315330         */
    316331        function test_get_component_from_parsed_url_array( $url, $component, $expected ) {
     
    352367         *
    353368         * @dataProvider wp_translate_php_url_constant_to_key_testcases
     369         *
     370         * @covers ::_wp_translate_php_url_constant_to_key
    354371         */
    355372        function test_wp_translate_php_url_constant_to_key( $input, $expected ) {
  • trunk/tests/phpunit/tests/http/remoteRetrieveHeaders.php

    r48937 r50344  
    33/**
    44 * @group http
     5 * @covers ::wp_remote_retrieve_headers
    56 */
    67class Tests_HTTP_RemoteRetrieveHeaders extends WP_UnitTestCase {
Note: See TracChangeset for help on using the changeset viewer.