Changeset 33064 for trunk/tests/phpunit/tests/formatting/EscUrl.php
- Timestamp:
- 07/03/2015 02:27:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscUrl.php
r30514 r33064 69 69 $this->assertEquals( '//example.com/foo?foo=abc:def', esc_url( '//example.com/foo?foo=abc:def' ) ); 70 70 } 71 72 /** 73 * @ticket 31632 74 */ 75 function test_mailto_with_newline() { 76 $body = <<<EOT 77 Hi there, 78 79 I thought you might want to sign up for this newsletter 80 EOT; 81 $email_link = 'mailto:?body=' . rawurlencode( $body ); 82 $email_link = esc_url( $email_link ); 83 $this->assertEquals( 'mailto:?body=Hi%20there%2C%0A%0AI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); 84 } 85 /** 86 * @ticket 31632 87 */ 88 function test_mailto_in_http_url_with_newline() { 89 $body = <<<EOT 90 Hi there, 91 92 I thought you might want to sign up for this newsletter 93 EOT; 94 $email_link = 'http://example.com/mailto:?body=' . rawurlencode( $body ); 95 $email_link = esc_url( $email_link ); 96 $this->assertEquals( 'http://example.com/mailto:?body=Hi%20there%2CI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); 97 } 98 71 99 }
Note: See TracChangeset
for help on using the changeset viewer.