Changeset 52010 for trunk/tests/phpunit/tests/http/http.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/http.php
r51397 r52010 14 14 * @covers WP_Http::make_absolute_url 15 15 */ 16 function test_make_absolute_url( $relative_url, $absolute_url, $expected ) {16 public function test_make_absolute_url( $relative_url, $absolute_url, $expected ) { 17 17 $actual = WP_Http::make_absolute_url( $relative_url, $absolute_url ); 18 18 $this->assertSame( $expected, $actual ); 19 19 } 20 20 21 function make_absolute_url_testcases() {21 public function make_absolute_url_testcases() { 22 22 // 0: The Location header, 1: The current URL, 3: The expected URL. 23 23 return array( … … 75 75 * @covers ::wp_parse_url 76 76 */ 77 function test_wp_parse_url( $url, $expected ) {77 public function test_wp_parse_url( $url, $expected ) { 78 78 $actual = wp_parse_url( $url ); 79 79 $this->assertSame( $expected, $actual ); 80 80 } 81 81 82 function parse_url_testcases() {82 public function parse_url_testcases() { 83 83 // 0: The URL, 1: The expected resulting structure. 84 84 return array( … … 188 188 * @covers ::wp_parse_url 189 189 */ 190 function test_wp_parse_url_with_default_component() {190 public function test_wp_parse_url_with_default_component() { 191 191 $actual = wp_parse_url( self::FULL_TEST_URL, -1 ); 192 192 $this->assertSame( … … 212 212 * @covers ::wp_parse_url 213 213 */ 214 function test_wp_parse_url_with_component( $url, $component, $expected ) {214 public function test_wp_parse_url_with_component( $url, $component, $expected ) { 215 215 $actual = wp_parse_url( $url, $component ); 216 216 $this->assertSame( $expected, $actual ); 217 217 } 218 218 219 function parse_url_component_testcases() {219 public function parse_url_component_testcases() { 220 220 // 0: The URL, 1: The requested component, 2: The expected resulting structure. 221 221 return array( … … 329 329 * @covers ::_get_component_from_parsed_url_array 330 330 */ 331 function test_get_component_from_parsed_url_array( $url, $component, $expected ) {331 public function test_get_component_from_parsed_url_array( $url, $component, $expected ) { 332 332 $parts = wp_parse_url( $url ); 333 333 $actual = _get_component_from_parsed_url_array( $parts, $component ); … … 335 335 } 336 336 337 function get_component_from_parsed_url_array_testcases() {337 public function get_component_from_parsed_url_array_testcases() { 338 338 // 0: A URL, 1: PHP URL constant, 2: The expected result. 339 339 return array( … … 370 370 * @covers ::_wp_translate_php_url_constant_to_key 371 371 */ 372 function test_wp_translate_php_url_constant_to_key( $input, $expected ) {372 public function test_wp_translate_php_url_constant_to_key( $input, $expected ) { 373 373 $actual = _wp_translate_php_url_constant_to_key( $input ); 374 374 $this->assertSame( $expected, $actual ); 375 375 } 376 376 377 function wp_translate_php_url_constant_to_key_testcases() {377 public function wp_translate_php_url_constant_to_key_testcases() { 378 378 // 0: PHP URL constant, 1: The expected result. 379 379 return array(
Note: See TracChangeset
for help on using the changeset viewer.