Changeset 53562 for trunk/tests/phpunit/tests/formatting/wpTexturize.php
- Timestamp:
- 06/23/2022 08:27:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/wpTexturize.php
r52010 r53562 5 5 */ 6 6 class Tests_Formatting_wpTexturize extends WP_UnitTestCase { 7 8 /** 9 * @covers ::wptexturize 10 */ 7 11 public function test_dashes() { 8 12 $this->assertSame( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) ); … … 10 14 } 11 15 16 /** 17 * @covers ::wptexturize 18 */ 12 19 public function test_disable() { 13 20 $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) ); … … 35 42 /** 36 43 * @ticket 1418 44 * 45 * @covers ::wptexturize 37 46 */ 38 47 public function test_bracketed_quotes_1418() { … … 44 53 /** 45 54 * @ticket 3810 55 * 56 * @covers ::wptexturize 46 57 */ 47 58 public function test_bracketed_quotes_3810() { … … 51 62 /** 52 63 * @ticket 4539 64 * 65 * @covers ::wptexturize 53 66 */ 54 67 public function test_basic_quotes() { … … 74 87 * @ticket 4539 75 88 * @ticket 15241 89 * 90 * @covers ::wptexturize 76 91 */ 77 92 public function test_full_sentences_with_unmatched_single_quotes() { … … 84 99 /** 85 100 * @ticket 4539 101 * 102 * @covers ::wptexturize 86 103 */ 87 104 public function test_quotes() { … … 103 120 /** 104 121 * @ticket 4539 122 * 123 * @covers ::wptexturize 105 124 */ 106 125 public function test_quotes_before_s() { … … 114 133 /** 115 134 * @ticket 4539 135 * 136 * @covers ::wptexturize 116 137 */ 117 138 public function test_quotes_before_numbers() { … … 142 163 } 143 164 165 /** 166 * @covers ::wptexturize 167 */ 144 168 public function test_quotes_after_numbers() { 145 169 $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); … … 149 173 * @ticket 4539 150 174 * @ticket 15241 175 * 176 * @covers ::wptexturize 151 177 */ 152 178 public function test_other_html() { … … 156 182 } 157 183 184 /** 185 * @covers ::wptexturize 186 */ 158 187 public function test_x() { 159 188 $this->assertSame( '14×24', wptexturize( '14x24' ) ); 160 189 } 161 190 191 /** 192 * @covers ::wptexturize 193 */ 162 194 public function test_minutes_seconds() { 163 195 $this->assertSame( '9′', wptexturize( '9\'' ) ); … … 173 205 /** 174 206 * @ticket 8775 207 * 208 * @covers ::wptexturize 175 209 */ 176 210 public function test_wptexturize_quotes_around_numbers() { … … 183 217 /** 184 218 * @ticket 8912 219 * 220 * @covers ::wptexturize 185 221 */ 186 222 public function test_wptexturize_html_comments() { … … 193 229 * @ticket 4539 194 230 * @ticket 15241 231 * 232 * @covers ::wptexturize 195 233 */ 196 234 public function test_entity_quote_cuddling() { … … 201 239 /** 202 240 * @ticket 22823 241 * 242 * @covers ::wptexturize 203 243 */ 204 244 public function test_apostrophes_before_primes() { … … 208 248 /** 209 249 * @ticket 23185 250 * 251 * @covers ::wptexturize 210 252 */ 211 253 public function test_spaces_around_hyphens() { … … 231 273 /** 232 274 * @ticket 31030 275 * 276 * @covers ::wptexturize 233 277 */ 234 278 public function test_hyphens_at_start_and_end() { … … 248 292 * 249 293 * @ticket 22692 294 * 295 * @covers ::wptexturize 250 296 */ 251 297 public function test_spaces_around_quotes_never() { … … 265 311 * @ticket 22692 266 312 * @dataProvider data_spaces_around_quotes 313 * 314 * @covers ::wptexturize 267 315 */ 268 316 public function test_spaces_around_quotes( $input, $output ) { 269 return$this->assertSame( $output, wptexturize( $input ) );317 $this->assertSame( $output, wptexturize( $input ) ); 270 318 } 271 319 … … 321 369 * @ticket 22692 322 370 * @dataProvider data_apos_before_digits 371 * 372 * @covers ::wptexturize 323 373 */ 324 374 public function test_apos_before_digits( $input, $output ) { 325 return$this->assertSame( $output, wptexturize( $input ) );375 $this->assertSame( $output, wptexturize( $input ) ); 326 376 } 327 377 … … 362 412 * @ticket 22692 363 413 * @dataProvider data_opening_single_quote 414 * 415 * @covers ::wptexturize 364 416 */ 365 417 public function test_opening_single_quote( $input, $output ) { 366 return$this->assertSame( $output, wptexturize( $input ) );418 $this->assertSame( $output, wptexturize( $input ) ); 367 419 } 368 420 … … 491 543 * @ticket 22692 492 544 * @dataProvider data_double_prime 545 * 546 * @covers ::wptexturize 493 547 */ 494 548 public function test_double_prime( $input, $output ) { 495 return$this->assertSame( $output, wptexturize( $input ) );549 $this->assertSame( $output, wptexturize( $input ) ); 496 550 } 497 551 … … 524 578 * @ticket 22692 525 579 * @dataProvider data_single_prime 580 * 581 * @covers ::wptexturize 526 582 */ 527 583 public function test_single_prime( $input, $output ) { 528 return$this->assertSame( $output, wptexturize( $input ) );584 $this->assertSame( $output, wptexturize( $input ) ); 529 585 } 530 586 … … 557 613 * @ticket 22692 558 614 * @dataProvider data_contractions 615 * 616 * @covers ::wptexturize 559 617 */ 560 618 public function test_contractions( $input, $output ) { 561 return$this->assertSame( $output, wptexturize( $input ) );619 $this->assertSame( $output, wptexturize( $input ) ); 562 620 } 563 621 … … 598 656 * @ticket 22692 599 657 * @dataProvider data_opening_quote 658 * 659 * @covers ::wptexturize 600 660 */ 601 661 public function test_opening_quote( $input, $output ) { 602 return$this->assertSame( $output, wptexturize( $input ) );662 $this->assertSame( $output, wptexturize( $input ) ); 603 663 } 604 664 … … 675 735 * @ticket 22692 676 736 * @dataProvider data_closing_quote 737 * 738 * @covers ::wptexturize 677 739 */ 678 740 public function test_closing_quote( $input, $output ) { 679 return$this->assertSame( $output, wptexturize( $input ) );741 $this->assertSame( $output, wptexturize( $input ) ); 680 742 } 681 743 … … 764 826 * @ticket 22692 765 827 * @dataProvider data_closing_single_quote 828 * 829 * @covers ::wptexturize 766 830 */ 767 831 public function test_closing_single_quote( $input, $output ) { 768 return$this->assertSame( $output, wptexturize( $input ) );832 $this->assertSame( $output, wptexturize( $input ) ); 769 833 } 770 834 … … 854 918 * @ticket 30445 855 919 * @dataProvider data_multiplication 920 * 921 * @covers ::wptexturize 856 922 */ 857 923 public function test_multiplication( $input, $output ) { 858 return$this->assertSame( $output, wptexturize( $input ) );924 $this->assertSame( $output, wptexturize( $input ) ); 859 925 } 860 926 … … 904 970 * @ticket 22692 905 971 * @dataProvider data_ampersand 972 * 973 * @covers ::wptexturize 906 974 */ 907 975 public function test_ampersand( $input, $output ) { 908 return$this->assertSame( $output, wptexturize( $input ) );976 $this->assertSame( $output, wptexturize( $input ) ); 909 977 } 910 978 … … 969 1037 * @ticket 22692 970 1038 * @dataProvider data_cockney 1039 * 1040 * @covers ::wptexturize 971 1041 */ 972 1042 public function test_cockney( $input, $output ) { 973 return$this->assertSame( $output, wptexturize( $input ) );1043 $this->assertSame( $output, wptexturize( $input ) ); 974 1044 } 975 1045 … … 1030 1100 * @ticket 22692 1031 1101 * @dataProvider data_smart_dashes 1102 * 1103 * @covers ::wptexturize 1032 1104 */ 1033 1105 public function test_smart_dashes( $input, $output ) { 1034 return$this->assertSame( $output, wptexturize( $input ) );1106 $this->assertSame( $output, wptexturize( $input ) ); 1035 1107 } 1036 1108 … … 1083 1155 * @ticket 22692 1084 1156 * @dataProvider data_misc_static_replacements 1157 * 1158 * @covers ::wptexturize 1085 1159 */ 1086 1160 public function test_misc_static_replacements( $input, $output ) { 1087 return$this->assertSame( $output, wptexturize( $input ) );1161 $this->assertSame( $output, wptexturize( $input ) ); 1088 1162 } 1089 1163 … … 1138 1212 * @ticket 8775 1139 1213 * @dataProvider data_quoted_numbers 1214 * 1215 * @covers ::wptexturize 1140 1216 */ 1141 1217 public function test_quoted_numbers( $input, $output ) { 1142 return$this->assertSame( $output, wptexturize( $input ) );1218 $this->assertSame( $output, wptexturize( $input ) ); 1143 1219 } 1144 1220 … … 1189 1265 * @ticket 20342 1190 1266 * @dataProvider data_quotes_and_dashes 1267 * 1268 * @covers ::wptexturize 1191 1269 */ 1192 1270 public function test_quotes_and_dashes( $input, $output ) { 1193 return$this->assertSame( $output, wptexturize( $input ) );1271 $this->assertSame( $output, wptexturize( $input ) ); 1194 1272 } 1195 1273 … … 1252 1330 * @ticket 12690 1253 1331 * @dataProvider data_tag_avoidance 1332 * 1333 * @covers ::wptexturize 1254 1334 */ 1255 1335 public function test_tag_avoidance( $input, $output ) { 1256 return$this->assertSame( $output, wptexturize( $input ) );1336 $this->assertSame( $output, wptexturize( $input ) ); 1257 1337 } 1258 1338 … … 1475 1555 * @ticket 26850 1476 1556 * @dataProvider data_year_abbr 1557 * 1558 * @covers ::wptexturize 1477 1559 */ 1478 1560 public function test_year_abbr( $input, $output ) { 1479 return$this->assertSame( $output, wptexturize( $input ) );1561 $this->assertSame( $output, wptexturize( $input ) ); 1480 1562 } 1481 1563 … … 1564 1646 * @ticket 27426 1565 1647 * @dataProvider data_translate 1648 * 1649 * @covers ::wptexturize 1566 1650 */ 1567 1651 public function test_translate( $input, $output ) { … … 1573 1657 wptexturize( 'reset', true ); 1574 1658 1575 return$this->assertSame( $output, $result );1659 $this->assertSame( $output, $result ); 1576 1660 } 1577 1661 … … 1791 1875 * @ticket 28483 1792 1876 * @dataProvider data_element_stack 1877 * 1878 * @covers ::wptexturize 1793 1879 */ 1794 1880 public function test_element_stack( $input, $output ) { 1795 return$this->assertSame( $output, wptexturize( $input ) );1881 $this->assertSame( $output, wptexturize( $input ) ); 1796 1882 } 1797 1883 … … 1842 1928 * @ticket 29557 1843 1929 * @dataProvider data_unregistered_shortcodes 1930 * 1931 * @covers ::wptexturize 1844 1932 */ 1845 1933 public function test_unregistered_shortcodes( $input, $output ) { … … 1927 2015 * @ticket 29256 1928 2016 * @dataProvider data_primes_vs_quotes 2017 * 2018 * @covers ::wptexturize 1929 2019 */ 1930 2020 public function test_primes_vs_quotes( $input, $output ) { 1931 return$this->assertSame( $output, wptexturize( $input ) );2021 $this->assertSame( $output, wptexturize( $input ) ); 1932 2022 } 1933 2023 … … 1989 2079 * @ticket 29256 1990 2080 * @dataProvider data_primes_quotes_translation 2081 * 2082 * @covers ::wptexturize 1991 2083 */ 1992 2084 public function test_primes_quotes_translation( $input, $output ) { … … 1998 2090 wptexturize( 'reset', true ); 1999 2091 2000 return$this->assertSame( $output, $result );2092 $this->assertSame( $output, $result ); 2001 2093 } 2002 2094 … … 2082 2174 * 2083 2175 * @dataProvider data_whole_posts 2176 * 2177 * @covers ::preg_split 2084 2178 */ 2085 2179 public function test_pcre_performance( $input ) { … … 2102 2196 * 2103 2197 * @ticket 35864 2198 * 2199 * @covers ::wptexturize 2104 2200 */ 2105 2201 public function test_trailing_less_than() {
Note: See TracChangeset
for help on using the changeset viewer.