- Timestamp:
- 11/22/2014 07:53:37 PM (10 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.