Changeset 30515
- Timestamp:
- 11/22/2014 07:53:37 PM (10 years ago)
- Location:
- trunk/tests/phpunit/tests/formatting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php
r25002 r30515 36 36 } 37 37 38 /** 39 * @ticket 10823 40 */ 41 function test_strips_entities() { 38 public function test_strips_nbsp_ndash_and_amp() { 42 39 $this->assertEquals("no-entities-here", sanitize_title_with_dashes("No Entities – Here &")); 40 } 41 42 public function test_strips_encoded_ampersand() { 43 43 $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two", '', 'save')); 44 } 45 46 public function test_strips_url_encoded_ampersand() { 44 47 $this->assertEquals("one-two", sanitize_title_with_dashes("One { Two;", '', 'save')); 45 $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two;", '', 'save')); 48 } 49 50 public function test_strips_trademark_symbol() { 46 51 $this->assertEquals("one-two", sanitize_title_with_dashes("One Two™;", '', 'save')); 52 } 53 54 public function test_strips_unencoded_ampersand_followed_by_encoded_ampersand() { 47 55 $this->assertEquals("one-two", sanitize_title_with_dashes("One && Two;", '', 'save')); 56 } 57 58 public function test_strips_unencoded_ampersand_when_not_surrounded_by_spaces() { 48 59 $this->assertEquals("onetwo", sanitize_title_with_dashes("One&Two", '', 'save')); 49 $this->assertEquals("onetwo-test", sanitize_title_with_dashes("One&Two Test;", '', 'save'));50 60 } 51 61 -
trunk/tests/phpunit/tests/formatting/SanitizeUser.php
r25002 r30515 10 10 $this->assertEquals($expected, sanitize_user($input)); 11 11 } 12 /** 13 * @ticket 10823 14 */ 15 function test_strips_entities() { 12 13 public function test_strips_encoded_ampersand() { 16 14 $this->assertEquals("ATT", sanitize_user("AT&T")); 15 } 16 17 public function test_strips_encoded_ampersand_when_followed_by_semicolon() { 17 18 $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;")); 18 $this->assertEquals("AT&T Test;", sanitize_user("AT&T Test;"));19 19 } 20 20 21 function test_strips_percent_encoded_octets() { 21 22 $expected = is_multisite() ? 'franois' : 'Franois';
Note: See TracChangeset
for help on using the changeset viewer.