Changeset 55562 for trunk/tests/phpunit/tests/formatting/redirect.php
- Timestamp:
- 03/19/2023 12:03:30 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/redirect.php
r53571 r55562 19 19 * @ticket 44317 20 20 * 21 * @dataProvider get_bad_status_codes21 * @dataProvider data_wp_redirect_bad_status_code 22 22 * 23 23 * @covers ::wp_redirect … … 32 32 } 33 33 34 public function get_bad_status_codes() {34 public function data_wp_redirect_bad_status_code() { 35 35 return array( 36 36 // Tests for bad arguments. … … 74 74 75 75 /** 76 * @dataProvider valid_url_provider76 * @dataProvider data_wp_validate_redirect_valid_url 77 77 * 78 78 * @covers ::wp_validate_redirect … … 82 82 } 83 83 84 /** 85 * @dataProvider invalid_url_provider 86 * 87 * @covers ::wp_validate_redirect 88 */ 89 public function test_wp_validate_redirect_invalid_url( $url ) { 90 $this->assertEquals( false, wp_validate_redirect( $url, false ) ); 91 } 92 93 public function valid_url_provider() { 84 public function data_wp_validate_redirect_valid_url() { 94 85 return array( 95 86 array( 'http://example.com', 'http://example.com' ), … … 107 98 } 108 99 109 public function invalid_url_provider() { 100 /** 101 * @dataProvider data_wp_validate_redirect_invalid_url 102 * 103 * @covers ::wp_validate_redirect 104 */ 105 public function test_wp_validate_redirect_invalid_url( $url ) { 106 $this->assertEquals( false, wp_validate_redirect( $url, false ) ); 107 } 108 109 public function data_wp_validate_redirect_invalid_url() { 110 110 return array( 111 111 // parse_url() fails. … … 177 177 /** 178 178 * @ticket 47980 179 * @dataProvider relative_url_provider179 * @dataProvider data_wp_validate_redirect_relative_url 180 180 * 181 181 * @covers ::wp_validate_redirect … … 212 212 * } 213 213 */ 214 public function relative_url_provider() {214 public function data_wp_validate_redirect_relative_url() { 215 215 return array( 216 216 array(
Note: See TracChangeset
for help on using the changeset viewer.