Changeset 33855
- Timestamp:
- 09/02/2015 04:50:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscUrl.php
r33851 r33855 31 31 } 32 32 33 function test_all_url_parts() { 34 $url = 'https://user:password@host.example.com:1234/path;p=1?q=2&r=3#fragment'; 35 $this->assertEquals( $url, esc_url_raw( $url ) ); 36 37 $this->assertEquals( 'https://user:password@host.example.com:1234/path;p=1?q=2&r=3#fragment', esc_url( $url ) ); 38 39 $this->assertEquals( 'http://example.com?foo', esc_url( 'http://example.com?foo' ) ); 40 } 41 33 42 function test_bare() { 34 43 $this->assertEquals( 'http://example.com', esc_url( 'example.com' ) ); … … 39 48 40 49 function test_encoding() { 50 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); 51 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); 52 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); 53 41 54 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); 42 55 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); 43 56 $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); 57 58 $param = urlencode( 'http://example.com/?one=1&two=2' ); 59 $this->assertEquals( "http://example.com?url={$param}", esc_url( "http://example.com?url={$param}" ) ); 44 60 } 45 61
Note: See TracChangeset
for help on using the changeset viewer.