Changeset 30514
- Timestamp:
- 11/22/2014 03:39:38 PM (10 years ago)
- Location:
- trunk/tests/phpunit/tests/formatting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscUrl.php
r25002 r30514 64 64 65 65 /** 66 * @ticket 1685967 */68 function test_square_brackets() {69 $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) );70 $this->assertEquals( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) );71 //IPv6 addresses in urls - RFC273272 $this->assertEquals( 'http://[::FFFF::127.0.0.1]', esc_url( 'http://[::FFFF::127.0.0.1]' ) );73 $this->assertEquals( 'http://[::127.0.0.1]', esc_url( 'http://[::127.0.0.1]' ) );74 $this->assertEquals( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]', esc_url( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]' ) );75 }76 77 /**78 66 * @ticket 21974 79 67 */ -
trunk/tests/phpunit/tests/formatting/MakeClickable.php
r26974 r30514 366 366 367 367 /** 368 * @ticket 16859369 */370 function test_square_brackets() {371 $urls_before = array(372 'http://example.com/?foo[bar]=baz',373 'http://example.com/?baz=bar&foo[bar]=baz',374 );375 $urls_expected = array(376 '<a href="http://example.com/?foo%5Bbar%5D=baz" rel="nofollow">http://example.com/?foo%5Bbar%5D=baz</a>',377 '<a href="http://example.com/?baz=bar&foo%5Bbar%5D=baz" rel="nofollow">http://example.com/?baz=bar&foo%5Bbar%5D=baz</a>',378 );379 foreach ($urls_before as $key => $url) {380 $this->assertEquals( $urls_expected[$key], make_clickable( $url ) );381 }382 }383 384 /**385 368 * @ticket 19028 386 369 */
Note: See TracChangeset
for help on using the changeset viewer.