Changeset 32947
- Timestamp:
- 06/25/2015 07:50:14 PM (8 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/ConvertInvalidEntries.php
r32946 r32947 4 4 * @group formatting 5 5 */ 6 class Tests_Formatting_Convert Chars extends WP_UnitTestCase {6 class Tests_Formatting_ConvertInvalidEntities extends WP_UnitTestCase { 7 7 function test_replaces_windows1252_entities_with_unicode_ones() { 8 8 $input = "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ"; 9 9 $output = "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ"; 10 $this->assertEquals( $output, convert_chars($input));10 $this->assertEquals( $output, convert_invalid_entities( $input ) ); 11 11 } 12 12 … … 17 17 $input = "Žž"; 18 18 $output = "Žž"; 19 $this->assertEquals( $output, convert_chars( $input ) ); 20 } 21 22 function test_converts_html_br_and_hr_to_the_xhtml_self_closing_variety() { 23 $inputs = array( 24 "abc <br> lol <br />" => "abc <br /> lol <br />", 25 "<br> ho ho <hr>" => "<br /> ho ho <hr />", 26 "<hr><br>" => "<hr /><br />" 27 ); 28 foreach ($inputs as $input => $expected) { 29 $this->assertEquals($expected, convert_chars($input)); 30 } 19 $this->assertEquals( $output, convert_invalid_entities( $input ) ); 31 20 } 32 21 … … 34 23 $this->assertEquals("at&t", convert_chars("at&t")); 35 24 } 36 37 function test_removes_category_and_title_metadata_tags() {38 $this->assertEquals("", convert_chars("<title><div class='lol'>abc</div></title><category>a</category>"));39 }40 25 }
Note: See TracChangeset
for help on using the changeset viewer.