Changeset 894 in tests for trunk/tests/test_includes_formatting.php
- Timestamp:
- 07/09/2012 03:32:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_includes_formatting.php
r865 r894 289 289 } 290 290 291 /** 292 * @ticket 16892 293 */ 291 294 function test_click_inside_html() { 292 $this->knownWPBug( 16892 );293 295 $urls_before = array( 294 296 '<span>http://example.com</span>', … … 327 329 } 328 330 331 /** 332 * @ticket 16859 333 */ 329 334 function test_square_brackets() { 330 $this->knownWPBug( 16859 );331 335 $urls_before = array( 332 336 'http://example.com/?foo[bar]=baz', … … 505 509 } 506 510 507 //WP Tickets #4539, #15241 511 /** 512 * @ticket 4539 513 * @ticket 15241 514 */ 508 515 function test_full_sentences_with_unmatched_single_quotes() { 509 516 $this->assertEquals( … … 513 520 } 514 521 515 //WP Ticket #4539 522 /** 523 * @ticket 4539 524 */ 516 525 function test_quotes() { 517 $this->knownWPBug(4539);518 526 $this->assertEquals('“Quoted String”', wptexturize('"Quoted String"')); 519 527 $this->assertEquals('Here is “<a href="http://example.com">a test with a link</a>”', wptexturize('Here is "<a href="http://example.com">a test with a link</a>"')); … … 531 539 } 532 540 533 //WP Ticket #4539 541 /** 542 * @ticket 4539 543 */ 534 544 function test_quotes_before_s() { 535 $this->knownWPBug(4539);536 545 $this->assertEquals('test’s', wptexturize("test's")); 537 546 $this->assertEquals('‘test’s', wptexturize("'test's")); … … 541 550 } 542 551 543 //WP Ticket #4539 552 /** 553 * @ticket 4539 554 */ 544 555 function test_quotes_before_numbers() { 545 $this->knownWPBug(4539);546 556 $this->assertEquals('Class of ’99', wptexturize("Class of '99")); 547 557 $this->assertEquals('Class of ’99’s', wptexturize("Class of '99's")); … … 557 567 } 558 568 559 //WP Ticket #15241 and #4539 569 /** 570 * @ticket 4539 571 * @ticket 15241 572 */ 560 573 function test_other_html() { 561 $this->knownWPBug(4539);562 574 $this->assertEquals('‘<strong>', wptexturize("'<strong>")); 563 575 $this->assertEquals('‘<strong>Quoted Text</strong>’,', wptexturize("'<strong>Quoted Text</strong>',")); … … 580 592 } 581 593 594 /** 595 * @ticket 8775 596 */ 582 597 function test_wptexturize_quotes_around_numbers() { 583 $this->knownWPBug(8775);584 598 $this->assertEquals('“12345”', wptexturize('"12345"')); 585 599 $this->assertEquals('‘12345’', wptexturize('\'12345\'')); … … 588 602 } 589 603 604 /** 605 * @ticket 8912 606 */ 590 607 function test_wptexturize_html_comments() { 591 $this->knownWPBug(8912);592 608 $this->assertEquals('<!--[if !IE]>--><!--<![endif]-->', wptexturize('<!--[if !IE]>--><!--<![endif]-->')); 593 609 $this->assertEquals('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->', wptexturize('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->')); … … 595 611 } 596 612 597 //WP Ticket #15241 and #4539 613 /** 614 * @ticket 4539 615 * @ticket 15241 616 */ 598 617 function test_entity_quote_cuddling() { 599 $this->knownWPBug(4539);600 618 $this->assertEquals(' “Testing”', wptexturize(' "Testing"')); 601 619 $this->assertEquals('&“Testing”', wptexturize('&"Testing"')); … … 657 675 } 658 676 677 /** 678 * @ticket 16859 679 */ 659 680 function test_square_brackets() { 660 $this->knownWPBug( 16859 );661 681 $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) ); 662 682 $this->assertEquals( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) ); … … 732 752 /** 733 753 * wpautop() Should not alter the contents of "<pre>" elements 734 * @link http://core.trac.wordpress.org/ticket/19855735 * @ return void754 * 755 * @ticket 19855 736 756 */ 737 757 public function test_skip_pre_elements() { 738 $this->knownWPBug( 19855 );739 758 $code = file_get_contents( DIR_TESTDATA . '/formatting/sizzle.js' ); 740 759 $code = str_replace( "\r", '', $code ); … … 760 779 /** 761 780 * wpautop() Should not add <br/> to "<input>" elements 762 * @link http://core.trac.wordpress.org/ticket/16456763 * @ return void781 * 782 * @ticket 16456 764 783 */ 765 784 public function test_skip_input_elements() { 766 $this->knownWPBug( 16456 );767 785 $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />'; 768 786 $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); … … 774 792 */ 775 793 class TestLikeEscape extends WP_UnitTestCase { 794 /** 795 * @ticket 10041 796 */ 776 797 function test_like_escape() { 777 $this->knownWPBug(10041);778 798 779 799 $inputs = array( … … 1032 1052 $this->assertEquals($expected, sanitize_user($input)); 1033 1053 } 1054 /** 1055 * @ticket 10823 1056 */ 1034 1057 function test_strips_entities() { 1035 $this->knownWPBug( 10823 );1036 1058 $this->assertEquals("ATT", sanitize_user("AT&T")); 1037 1059 $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;")); … … 1129 1151 } 1130 1152 1153 /** 1154 * @ticket 10823 1155 */ 1131 1156 function test_strips_entities() { 1132 $this->knownWPBug( 10823 );1133 1157 $this->assertEquals("no-entities-here", sanitize_title_with_dashes("No Entities – Here &")); 1134 1158 $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two", '', 'save')); … … 1175 1199 } 1176 1200 1201 /** 1202 * @ticket 19820 1203 */ 1177 1204 function test_replaces_multiply_sign() { 1178 $this->knownWPBug(19820);1179 1205 $this->assertEquals("6x7-is-42", sanitize_title_with_dashes("6×7 is 42", '', 'save')); 1180 1206 } 1181 1207 1208 /** 1209 * @ticket 20772 1210 */ 1182 1211 function test_replaces_standalone_diacritic() { 1183 $this->knownWPBug(20772);1184 1212 $this->assertEquals("aaaa", sanitize_title_with_dashes("āáǎà", '', 'save')); 1185 1213 } … … 1197 1225 } 1198 1226 1227 /** 1228 * @ticket 20503 1229 */ 1199 1230 function test_replaces_latin_letter_z_with_caron() { 1200 $this->knownWPBug(20503);1201 1231 $input = "Žž"; 1202 1232 $output = "Žž"; … … 1445 1475 } 1446 1476 1477 /** 1478 * @ticket 9591 1479 */ 1447 1480 public function test_remove_accents_latin1_supplement() { 1448 $this->knownWPBug(9591);1449 1450 1481 $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'; 1451 1482 $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; … … 1480 1511 } 1481 1512 1513 /** 1514 * @ticket 17738 1515 */ 1482 1516 public function test_remove_accents_vowels_diacritic() { 1483 $this->knownWPBug(17738);1484 1485 1517 // Vowels with diacritic 1486 1518 // unmarked … … 1498 1530 } 1499 1531 1532 /** 1533 * @ticket 20772 1534 */ 1500 1535 public function test_remove_accents_hanyu_pinyin() { 1501 $this->knownWPBug(20772);1502 1503 1536 // Vowels with diacritic (Chinese, Hanyu Pinyin) 1504 1537 // macron … … 1519 1552 */ 1520 1553 class TestStripSlashesDeep extends WP_UnitTestCase { 1554 /** 1555 * @ticket 18026 1556 */ 1521 1557 function test_preserves_original_datatype() { 1522 $this->knownWPBug(18026);1523 1558 1524 1559 $this->assertEquals( true, stripslashes_deep( true ) );
Note: See TracChangeset
for help on using the changeset viewer.