Changeset 53455 for trunk/tests/phpunit/tests/formatting/escUrl.php
- Timestamp:
- 06/01/2022 06:12:25 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/escUrl.php
r52010 r53455 57 57 parse_url( $url ) 58 58 ); 59 $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) );59 $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', sanitize_url( $url ) ); 60 60 $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url( $url ) ); 61 61 } … … 70 70 71 71 public function test_encoding() { 72 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) );73 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) );74 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) );72 $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); 73 $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); 74 $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); 75 75 76 76 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); … … 191 191 public function test_reserved_characters() { 192 192 $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;="; 193 $this->assertSame( $url, esc_url_raw( $url ) );193 $this->assertSame( $url, sanitize_url( $url ) ); 194 194 } 195 195 … … 246 246 */ 247 247 public function test_invalid_charaters() { 248 $this->assertEmpty( esc_url_raw( '"^<>{}`' ) );248 $this->assertEmpty( sanitize_url( '"^<>{}`' ) ); 249 249 } 250 250
Note: See TracChangeset
for help on using the changeset viewer.