Changeset 54728 for trunk/tests/phpunit/tests/formatting/escUrl.php
- Timestamp:
- 10/31/2022 01:54:00 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/escUrl.php
r53574 r54728 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_url 5 7 */ 6 8 class Tests_Formatting_EscUrl extends WP_UnitTestCase { … … 8 10 /** 9 11 * @ticket 23605 10 *11 * @covers ::esc_url12 12 */ 13 13 public function test_spaces() { … … 22 22 } 23 23 24 /**25 * @covers ::esc_url26 */27 24 public function test_bad_characters() { 28 25 $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) ); … … 39 36 } 40 37 41 /**42 * @covers ::esc_url43 */44 38 public function test_relative() { 45 39 $this->assertSame( '/example.php', esc_url( '/example.php' ) ); … … 50 44 51 45 /** 52 * @covers ::esc_url53 46 * @covers ::sanitize_url 54 47 */ … … 73 66 } 74 67 75 /**76 * @covers ::esc_url77 */78 68 public function test_bare() { 79 69 $this->assertSame( 'http://example.com?foo', esc_url( 'example.com?foo' ) ); … … 85 75 86 76 /** 87 * @covers ::esc_url88 77 * @covers ::sanitize_url 89 78 */ … … 102 91 103 92 /** 104 * @covers ::esc_url105 93 * @covers ::wp_allowed_protocols 106 94 */ … … 169 157 /** 170 158 * @ticket 23187 171 *172 * @covers ::esc_url173 159 */ 174 160 public function test_protocol_case() { … … 177 163 } 178 164 179 /**180 * @covers ::esc_url181 */182 165 public function test_display_extras() { 183 166 $this->assertSame( 'http://example.com/'quoted'', esc_url( 'http://example.com/\'quoted\'' ) ); … … 185 168 } 186 169 187 /**188 * @covers ::esc_url189 */190 170 public function test_non_ascii() { 191 171 $this->assertSame( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) ); … … 194 174 } 195 175 196 /**197 * @covers ::esc_url198 */199 176 public function test_feed() { 200 177 $this->assertSame( '', esc_url( 'feed:javascript:alert(1)' ) ); … … 207 184 /** 208 185 * @ticket 16859 209 *210 * @covers ::esc_url211 186 */ 212 187 public function test_square_brackets() { … … 234 209 /** 235 210 * @ticket 21974 236 *237 * @covers ::esc_url238 211 */ 239 212 public function test_protocol_relative_with_colon() { … … 243 216 /** 244 217 * @ticket 31632 245 *246 * @covers ::esc_url247 218 */ 248 219 public function test_mailto_with_newline() { … … 260 231 /** 261 232 * @ticket 31632 262 *263 * @covers ::esc_url264 233 */ 265 234 public function test_mailto_in_http_url_with_newline() { … … 277 246 /** 278 247 * @ticket 23605 279 *280 * @covers ::esc_url281 248 */ 282 249 public function test_mailto_with_spaces() { … … 299 266 /** 300 267 * @ticket 34202 301 *302 * @covers ::esc_url303 268 */ 304 269 public function test_ipv6_hosts() {
Note: See TracChangeset
for help on using the changeset viewer.