WordPress.org

Make WordPress Core

Ticket #21974: 21974.unit-test.patch

File 21974.unit-test.patch, 943 bytes (added by SergeyBiryukov, 6 years ago)
  • tests/formatting/EscUrl.php

     
    6565                $this->assertEquals( 'http://[::127.0.0.1]', esc_url( 'http://[::127.0.0.1]' ) );
    6666                $this->assertEquals( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]', esc_url( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]' ) );
    6767        }
     68
     69        /**
     70         * @ticket 21974
     71         */
     72        function test_colons() {
     73                $this->assertEquals( 'http://example.com/?foo=bar:baz', esc_url( 'http://example.com/?foo=bar:baz' ) );
     74                $this->assertEquals( 'http://example.com/css?foo=bar:baz', esc_url( 'http://example.com/css?foo=bar:baz' ) );
     75                $this->assertEquals( '//example.com/?foo=bar:baz', esc_url( '//example.com/?foo=bar:baz' ) );
     76                $this->assertEquals( '//example.com/css?foo=bar:baz', esc_url( '//example.com/css?foo=bar:baz' ) );
     77        }
    6878}