Changeset 43571 for trunk/tests/phpunit/tests/formatting/EscUrl.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscUrl.php
r42343 r43571 53 53 'query' => 'query=2&r[]=3', 54 54 'fragment' => 'fragment', 55 ), parse_url( $url ) 55 ), 56 parse_url( $url ) 56 57 ); 57 58 $this->assertEquals( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) ); … … 84 85 $this->assertEquals( '', esc_url( 'nasty://example.com/' ) ); 85 86 $this->assertEquals( 86 '', esc_url( 87 'example.com', array( 87 '', 88 esc_url( 89 'example.com', 90 array( 88 91 'https', 89 92 ) … … 91 94 ); 92 95 $this->assertEquals( 93 '', esc_url( 94 'http://example.com', array( 96 '', 97 esc_url( 98 'http://example.com', 99 array( 95 100 'https', 96 101 ) … … 98 103 ); 99 104 $this->assertEquals( 100 'https://example.com', esc_url( 101 'https://example.com', array( 105 'https://example.com', 106 esc_url( 107 'https://example.com', 108 array( 102 109 'http', 103 110 'https', … … 109 116 $this->assertEquals( "{$scheme}://example.com", esc_url( "{$scheme}://example.com" ), $scheme ); 110 117 $this->assertEquals( 111 "{$scheme}://example.com", esc_url( 112 "{$scheme}://example.com", array( 118 "{$scheme}://example.com", 119 esc_url( 120 "{$scheme}://example.com", 121 array( 113 122 $scheme, 114 123 ) 115 ), $scheme 124 ), 125 $scheme 116 126 ); 117 127 } … … 122 132 $this->assertTrue( ! in_array( 'foo', wp_allowed_protocols(), true ) ); 123 133 $this->assertEquals( 124 'foo://example.com', esc_url( 125 'foo://example.com', array( 134 'foo://example.com', 135 esc_url( 136 'foo://example.com', 137 array( 126 138 'foo', 127 139 )
Note: See TracChangeset
for help on using the changeset viewer.