Changeset 50344
- Timestamp:
- 02/15/2021 02:00:02 PM (4 years ago)
- Location:
- trunk/tests/phpunit/tests/http
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/base.php
r49184 r50344 52 52 } 53 53 54 /** 55 * @covers ::wp_remote_request 56 */ 54 57 function test_redirect_on_301() { 55 58 // 5 : 5 & 301. … … 61 64 } 62 65 66 /** 67 * @covers ::wp_remote_request 68 */ 63 69 function test_redirect_on_302() { 64 70 // 5 : 5 & 302. … … 72 78 /** 73 79 * @ticket 16855 80 * 81 * @covers ::wp_remote_request 74 82 */ 75 83 function test_redirect_on_301_no_redirect() { … … 84 92 /** 85 93 * @ticket 16855 94 * 95 * @covers ::wp_remote_request 86 96 */ 87 97 function test_redirect_on_302_no_redirect() { … … 94 104 } 95 105 106 /** 107 * @covers ::wp_remote_request 108 */ 96 109 function test_redirections_equal() { 97 110 // 5 - 5. … … 103 116 } 104 117 118 /** 119 * @covers ::wp_remote_request 120 */ 105 121 function test_no_head_redirections() { 106 122 // No redirections on HEAD request. … … 114 130 /** 115 131 * @ticket 16855 132 * 133 * @covers ::wp_remote_request 116 134 */ 117 135 function test_redirect_on_head() { … … 130 148 } 131 149 150 /** 151 * @covers ::wp_remote_request 152 */ 132 153 function test_redirections_greater() { 133 154 // 10 > 5. … … 138 159 } 139 160 161 /** 162 * @covers ::wp_remote_request 163 */ 140 164 function test_redirections_greater_edgecase() { 141 165 // 6 > 5 (close edge case). … … 146 170 } 147 171 172 /** 173 * @covers ::wp_remote_request 174 */ 148 175 function test_redirections_less_edgecase() { 149 176 // 4 < 5 (close edge case). … … 156 183 /** 157 184 * @ticket 16855 185 * 186 * @covers ::wp_remote_request 158 187 */ 159 188 function test_redirections_zero_redirections_specified() { … … 170 199 * 171 200 * @ticket 16889 201 * 202 * @covers ::wp_remote_request 172 203 */ 173 204 function test_location_header_on_201() { … … 184 215 * 185 216 * @ticket 16889 217 * 218 * @covers ::wp_remote_request 219 * @covers ::wp_remote_retrieve_body 186 220 */ 187 221 function test_no_redirection_on_PUT() { … … 204 238 /** 205 239 * @ticket 11888 240 * 241 * @covers ::wp_remote_request 206 242 */ 207 243 function test_send_headers() { … … 234 270 } 235 271 272 /** 273 * @covers ::wp_remote_request 274 */ 236 275 function test_file_stream() { 237 276 $url = $this->file_stream_url; … … 261 300 /** 262 301 * @ticket 26726 302 * 303 * @covers ::wp_remote_request 263 304 */ 264 305 function test_file_stream_limited_size() { … … 290 331 * 291 332 * @ticket 31172 333 * 334 * @covers ::wp_remote_request 292 335 */ 293 336 function test_request_limited_size() { … … 314 357 * 315 358 * @ticket 17588 359 * 360 * @covers ::wp_remote_post 361 * @covers ::wp_remote_retrieve_body 316 362 */ 317 363 function test_post_redirect_to_method_300( $response_code, $method ) { … … 353 399 * 354 400 * @ticket 24182 401 * 402 * @covers ::wp_remote_get 403 * @covers ::wp_remote_retrieve_body 355 404 */ 356 405 function test_ip_url_with_host_header() { … … 376 425 * 377 426 * @ticket 33978 427 * 428 * @covers ::wp_remote_head 378 429 */ 379 430 function test_https_url_without_ssl_verification() { … … 398 449 * 399 450 * @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 400 456 */ 401 457 function test_multiple_location_headers() { … … 418 474 * 419 475 * @ticket 21182 476 * 477 * @covers ::wp_remote_get 478 * @covers ::wp_remote_retrieve_body 420 479 */ 421 480 function test_cookie_handling() { … … 433 492 * @group ssl 434 493 * @ticket 25007 494 * 495 * @covers ::wp_remote_get 435 496 */ 436 497 function test_ssl() { … … 447 508 /** 448 509 * @ticket 37733 510 * 511 * @covers ::wp_remote_request 449 512 */ 450 513 function test_url_with_double_slashes_path() { -
trunk/tests/phpunit/tests/http/curl.php
r49184 r50344 12 12 /** 13 13 * @ticket 39783 14 * 15 * @covers ::wp_remote_request 14 16 */ 15 17 public function test_http_api_curl_stream_parameter_is_a_reference() { -
trunk/tests/phpunit/tests/http/functions.php
r49025 r50344 8 8 class Tests_HTTP_Functions extends WP_UnitTestCase { 9 9 10 /** 11 * @covers ::wp_remote_head 12 */ 10 13 function test_head_request() { 11 14 // This URL gives a direct 200 response. … … 24 27 } 25 28 29 /** 30 * @covers ::wp_remote_head 31 */ 26 32 function test_head_redirect() { 27 33 // This URL will 301 redirect. … … 33 39 } 34 40 41 /** 42 * @covers ::wp_remote_head 43 */ 35 44 function test_head_404() { 36 45 $url = 'https://asdftestblog1.files.wordpress.com/2007/09/awefasdfawef.jpg'; … … 41 50 } 42 51 52 /** 53 * @covers ::wp_remote_get 54 * @covers ::wp_remote_retrieve_headers 55 * @covers ::wp_remote_retrieve_response_code 56 */ 43 57 function test_get_request() { 44 58 $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; … … 58 72 } 59 73 74 /** 75 * @covers ::wp_remote_get 76 * @covers ::wp_remote_retrieve_headers 77 * @covers ::wp_remote_retrieve_response_code 78 */ 60 79 function test_get_redirect() { 61 80 // This will redirect to asdftestblog1.files.wordpress.com. … … 74 93 } 75 94 95 /** 96 * @covers ::wp_remote_get 97 */ 76 98 function test_get_redirect_limit_exceeded() { 77 99 // This will redirect to asdftestblog1.files.wordpress.com. … … 87 109 /** 88 110 * @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 89 116 */ 90 117 function test_get_response_cookies() { … … 116 143 /** 117 144 * @ticket 37437 145 * 146 * @covers ::wp_remote_get 147 * @covers ::wp_remote_retrieve_cookies 148 * @covers ::wp_remote_retrieve_cookie 118 149 */ 119 150 function test_get_response_cookies_with_wp_http_cookie_object() { … … 148 179 /** 149 180 * @ticket 37437 181 * 182 * @covers ::wp_remote_get 183 * @covers ::wp_remote_retrieve_cookies 184 * @covers ::wp_remote_retrieve_cookie 150 185 */ 151 186 function test_get_response_cookies_with_name_value_array() { … … 175 210 /** 176 211 * @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 177 217 */ 178 218 function test_get_cookie_host_only() { -
trunk/tests/phpunit/tests/http/getHttpHeaders.php
r46586 r50344 3 3 /** 4 4 * @group http 5 * @covers ::wp_get_http_headers 5 6 */ 6 7 class Tests_HTTP_GetHttpHeaders extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/http/http.php
r48937 r50344 11 11 /** 12 12 * @dataProvider make_absolute_url_testcases 13 * 14 * @covers ::WP_Http::make_absolute_url 13 15 */ 14 16 function test_make_absolute_url( $relative_url, $absolute_url, $expected ) { … … 70 72 /** 71 73 * @dataProvider parse_url_testcases 74 * 75 * @covers ::wp_parse_url 72 76 */ 73 77 function test_wp_parse_url( $url, $expected ) { … … 181 185 /** 182 186 * @ticket 36356 187 * 188 * @covers ::wp_parse_url 183 189 */ 184 190 function test_wp_parse_url_with_default_component() { … … 203 209 * 204 210 * @dataProvider parse_url_component_testcases 211 * 212 * @covers ::wp_parse_url 205 213 */ 206 214 function test_wp_parse_url_with_component( $url, $component, $expected ) { … … 262 270 /** 263 271 * @ticket 35426 272 * 273 * @covers ::get_status_header_desc 264 274 */ 265 275 public function test_http_response_code_constants() { … … 278 288 /** 279 289 * @ticket 37768 290 * 291 * @covers WP_Http::normalize_cookies 280 292 */ 281 293 public function test_normalize_cookies_scalar_values() { … … 313 325 * 314 326 * @dataProvider get_component_from_parsed_url_array_testcases 327 * 328 * @covers ::wp_parse_url 329 * @covers ::_get_component_from_parsed_url_array 315 330 */ 316 331 function test_get_component_from_parsed_url_array( $url, $component, $expected ) { … … 352 367 * 353 368 * @dataProvider wp_translate_php_url_constant_to_key_testcases 369 * 370 * @covers ::_wp_translate_php_url_constant_to_key 354 371 */ 355 372 function test_wp_translate_php_url_constant_to_key( $input, $expected ) { -
trunk/tests/phpunit/tests/http/remoteRetrieveHeaders.php
r48937 r50344 3 3 /** 4 4 * @group http 5 * @covers ::wp_remote_retrieve_headers 5 6 */ 6 7 class Tests_HTTP_RemoteRetrieveHeaders extends WP_UnitTestCase {
Note: See TracChangeset
for help on using the changeset viewer.