diff --git a/tests/phpunit/tests/formatting/escUrl.php b/tests/phpunit/tests/formatting/escUrl.php index d81ac9a95c..9c830cb570 100644 --- a/tests/phpunit/tests/formatting/escUrl.php +++ b/tests/phpunit/tests/formatting/escUrl.php @@ -50,7 +50,7 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase { /** * @covers ::esc_url - * @covers ::esc_url_raw + * @covers ::sanitize_url */ public function test_all_url_parts() { $url = 'https://user:pass@host.example.com:1234/path;p=1?query=2&r[]=3#fragment'; @@ -68,7 +68,7 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase { ), parse_url( $url ) ); - $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) ); + $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', sanitize_url( $url ) ); $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url( $url ) ); } @@ -85,12 +85,12 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase { /** * @covers ::esc_url - * @covers ::esc_url_raw + * @covers ::sanitize_url */ public function test_encoding() { - $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); - $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); - $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) ); $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); @@ -224,11 +224,11 @@ class Tests_Formatting_EscUrl extends WP_UnitTestCase { /** * Courtesy of http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding * - * @covers ::esc_url_raw + * @covers ::sanitize_url */ public function test_reserved_characters() { $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;="; - $this->assertSame( $url, esc_url_raw( $url ) ); + $this->assertSame( $url, sanitize_url( $url ) ); } /** @@ -290,10 +290,10 @@ EOT; /** * @ticket 28015 * - * @covers ::esc_url_raw + * @covers ::sanitize_url */ public function test_invalid_charaters() { - $this->assertEmpty( esc_url_raw( '"^<>{}`' ) ); + $this->assertEmpty( sanitize_url( '"^<>{}`' ) ); } /**