Changeset 65086
- Timestamp:
- 10/30/2026 08:21:22 PM (45 hours ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 3 edited
-
data/formatting/whole-posts.php (modified) (1 diff)
-
tests/formatting/wpHtmlSplit.php (modified) (2 diffs)
-
tests/formatting/wpTexturize.php (modified) (44 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/data/formatting/whole-posts.php
r60627 r65086 1 1 <?php 2 2 3 function data_whole_posts() { 3 /** 4 * @return non-empty-list<array{ non-falsy-string }> 5 */ 6 function data_whole_posts(): array { 4 7 return array( 5 8 -
trunk/tests/phpunit/tests/formatting/wpHtmlSplit.php
r64439 r65086 12 12 * 13 13 * @dataProvider data_basic_features 14 * 15 * @param non-falsy-string $input 16 * @param list<non-falsy-string> $output 14 17 */ 15 public function test_basic_features( $input, $output ){16 return$this->assertSame( $output, wp_html_split( $input ) );18 public function test_basic_features( string $input, array $output ): void { 19 $this->assertSame( $output, wp_html_split( $input ) ); 17 20 } 18 21 19 public static function data_basic_features() { 22 /** 23 * Data provider for {@see self::test_basic_features()}. 24 * 25 * @return list<array{ 0: non-falsy-string, 1: list<non-falsy-string> }> 26 */ 27 public static function data_basic_features(): array { 20 28 return array( 21 29 array( … … 44 52 * 45 53 * @covers ::get_html_split_regex 54 * 55 * @param non-falsy-string $input 46 56 */ 47 public function test_pcre_performance( $input ){57 public function test_pcre_performance( string $input ): void { 48 58 $regex = get_html_split_regex(); 49 59 $result = benchmark_pcre_backtracking( $regex, $input, 'split' ); 50 return$this->assertLessThan( 200, $result );60 $this->assertLessThan( 200, $result ); 51 61 } 52 62 53 public static function data_whole_posts() { 63 /** 64 * Data provider for {@see self::test_pcre_performance()}. 65 * 66 * @return non-empty-list<array{ non-falsy-string }> 67 */ 68 public static function data_whole_posts(): array { 54 69 require_once DIR_TESTDATA . '/formatting/whole-posts.php'; 55 70 return data_whole_posts(); -
trunk/tests/phpunit/tests/formatting/wpTexturize.php
r64439 r65086 8 8 class Tests_Formatting_wpTexturize extends WP_UnitTestCase { 9 9 10 public function test_dashes() { 10 /** 11 * Tests smart dash conversion. 12 */ 13 public function test_dashes(): void { 11 14 $this->assertSame( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) ); 12 15 $this->assertSame( '<a href="http://xx--xx">Hey — boo?</a>', wptexturize( '<a href="http://xx--xx">Hey -- boo?</a>' ) ); 13 16 } 14 17 15 public function test_disable() { 18 /** 19 * Tests texturization is disabled inside certain HTML elements. 20 */ 21 public function test_disable(): void { 16 22 $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) ); 17 23 $this->assertSame( '<pre><code></code>--&</pre>', wptexturize( '<pre><code></code>--&</pre>' ) ); … … 36 42 37 43 /** 44 * Tests bracketed quote conversion. 45 * 38 46 * @ticket 1418 39 47 */ 40 public function test_bracketed_quotes_1418() {48 public function test_bracketed_quotes_1418(): void { 41 49 $this->assertSame( '(“test”)', wptexturize( '("test")' ) ); 42 50 $this->assertSame( '(‘test’)', wptexturize( "('test')" ) ); … … 45 53 46 54 /** 55 * Tests bracketed quote conversion with a specific example. 56 * 47 57 * @ticket 3810 48 58 */ 49 public function test_bracketed_quotes_3810() {59 public function test_bracketed_quotes_3810(): void { 50 60 $this->assertSame( 'A dog (“Hubertus”) was sent out.', wptexturize( 'A dog ("Hubertus") was sent out.' ) ); 51 61 } 52 62 53 63 /** 64 * Tests basic quote conversion (apostrophes, single quotes, double quotes). 65 * 54 66 * @ticket 4539 55 67 */ 56 public function test_basic_quotes() {68 public function test_basic_quotes(): void { 57 69 $this->assertSame( 'test’s', wptexturize( 'test\'s' ) ); 58 70 … … 74 86 75 87 /** 88 * Tests full sentences with unmatched single quotes. 89 * 76 90 * @ticket 4539 77 91 * @ticket 15241 78 92 */ 79 public function test_full_sentences_with_unmatched_single_quotes() {93 public function test_full_sentences_with_unmatched_single_quotes(): void { 80 94 $this->assertSame( 81 95 'That means every moment you’re working on something without it being in the public it’s actually dying.', … … 85 99 86 100 /** 101 * Tests quote conversion with various surrounding contexts. 102 * 87 103 * @ticket 4539 88 104 */ 89 public function test_quotes() {105 public function test_quotes(): void { 90 106 $this->assertSame( '“Quoted String”', wptexturize( '"Quoted String"' ) ); 91 107 // $this->assertSame( '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>"' ) ); … … 104 120 105 121 /** 122 * Tests quotes before an "s" (possessives and contractions). 123 * 106 124 * @ticket 4539 107 125 */ 108 public function test_quotes_before_s() {126 public function test_quotes_before_s(): void { 109 127 $this->assertSame( 'test’s', wptexturize( "test's" ) ); 110 128 $this->assertSame( '‘test’s', wptexturize( "'test's" ) ); … … 115 133 116 134 /** 135 * Tests quotes before numbers (year abbreviations, etc.). 136 * 117 137 * @ticket 4539 118 138 */ 119 public function test_quotes_before_numbers() {139 public function test_quotes_before_numbers(): void { 120 140 $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); 121 141 $this->assertSame( 'Class of ’99’s', wptexturize( "Class of '99's" ) ); … … 144 164 } 145 165 146 public function test_quotes_after_numbers() { 166 /** 167 * Tests quotes after numbers. 168 */ 169 public function test_quotes_after_numbers(): void { 147 170 $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); 148 171 } 149 172 150 173 /** 174 * Tests quotes next to HTML tags. 175 * 151 176 * @ticket 4539 152 177 * @ticket 15241 153 178 */ 154 public function test_other_html() {179 public function test_other_html(): void { 155 180 $this->assertSame( '‘<strong>', wptexturize( "'<strong>" ) ); 156 181 // $this->assertSame( '‘<strong>Quoted Text</strong>’,', wptexturize( "'<strong>Quoted Text</strong>'," ) ); … … 158 183 } 159 184 160 public function test_x() { 185 /** 186 * Tests multiplication sign (x between digits) conversion. 187 */ 188 public function test_x(): void { 161 189 $this->assertSame( '14×24', wptexturize( '14x24' ) ); 162 190 } 163 191 164 public function test_minutes_seconds() { 192 /** 193 * Tests prime (minutes/feet) and double-prime (seconds/inches) conversion. 194 */ 195 public function test_minutes_seconds(): void { 165 196 $this->assertSame( '9′', wptexturize( '9\'' ) ); 166 197 $this->assertSame( '9″', wptexturize( '9"' ) ); … … 174 205 175 206 /** 207 * Tests quotes around numbers. 208 * 176 209 * @ticket 8775 177 210 */ 178 public function test_wptexturize_quotes_around_numbers() {211 public function test_wptexturize_quotes_around_numbers(): void { 179 212 $this->assertSame( '“12345”', wptexturize( '"12345"' ) ); 180 213 $this->assertSame( '‘12345’', wptexturize( '\'12345\'' ) ); … … 184 217 185 218 /** 219 * Tests HTML comments are not texturized. 220 * 186 221 * @ticket 8912 187 222 */ 188 public function test_wptexturize_html_comments() {223 public function test_wptexturize_html_comments(): void { 189 224 $this->assertSame( '<!--[if !IE]>--><!--<![endif]-->', wptexturize( '<!--[if !IE]>--><!--<![endif]-->' ) ); 190 225 $this->assertSame( '<!--[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]-->' ) ); … … 193 228 194 229 /** 230 * Tests quote cuddling with HTML entities. 231 * 195 232 * @ticket 4539 196 233 * @ticket 15241 197 234 */ 198 public function test_entity_quote_cuddling() {235 public function test_entity_quote_cuddling(): void { 199 236 $this->assertSame( ' “Testing”', wptexturize( ' "Testing"' ) ); 200 237 // $this->assertSame( '&“Testing”', wptexturize( '&"Testing"' ) ); … … 202 239 203 240 /** 241 * Tests apostrophes before primes in version numbers. 242 * 204 243 * @ticket 22823 205 244 */ 206 public function test_apostrophes_before_primes() {245 public function test_apostrophes_before_primes(): void { 207 246 $this->assertSame( 'WordPress 3.5’s release date', wptexturize( "WordPress 3.5's release date" ) ); 208 247 } 209 248 210 249 /** 250 * Tests spaces around hyphens and dashes. 251 * 211 252 * @ticket 23185 212 253 */ 213 public function test_spaces_around_hyphens() {254 public function test_spaces_around_hyphens(): void { 214 255 $nbsp = "\xC2\xA0"; 215 256 … … 232 273 233 274 /** 275 * Tests hyphens and dashes at the start or end of strings. 276 * 234 277 * @ticket 31030 235 278 */ 236 public function test_hyphens_at_start_and_end() {279 public function test_hyphens_at_start_and_end(): void { 237 280 $this->assertSame( '– ', wptexturize( '- ' ) ); 238 281 $this->assertSame( '– –', wptexturize( '- -' ) ); … … 251 294 * @ticket 22692 252 295 */ 253 public function test_spaces_around_quotes_never() {296 public function test_spaces_around_quotes_never(): void { 254 297 $nbsp = "\xC2\xA0"; 255 298 … … 268 311 * @dataProvider data_spaces_around_quotes 269 312 */ 270 public function test_spaces_around_quotes( $input, $output ){313 public function test_spaces_around_quotes( string $input, string $output ): void { 271 314 $this->assertSame( $output, wptexturize( $input ) ); 272 315 } 273 316 274 public static function data_spaces_around_quotes() { 317 /** 318 * Data provider for {@see self::test_spaces_around_quotes()}. 319 * 320 * @return list<array{0: string, 1: string}> 321 */ 322 public static function data_spaces_around_quotes(): array { 275 323 $nbsp = "\xC2\xA0"; 276 324 $pi = "\xCE\xA0"; … … 324 372 * @dataProvider data_apos_before_digits 325 373 */ 326 public function test_apos_before_digits( $input, $output ){374 public function test_apos_before_digits( string $input, string $output ): void { 327 375 $this->assertSame( $output, wptexturize( $input ) ); 328 376 } 329 377 330 public static function data_apos_before_digits() { 378 /** 379 * Data provider for {@see self::test_apos_before_digits()}. 380 * 381 * @return list<array{0: string, 1: string}> 382 */ 383 public static function data_apos_before_digits(): array { 331 384 return array( 332 385 array( … … 365 418 * @dataProvider data_opening_single_quote 366 419 */ 367 public function test_opening_single_quote( $input, $output ){420 public function test_opening_single_quote( string $input, string $output ): void { 368 421 $this->assertSame( $output, wptexturize( $input ) ); 369 422 } 370 423 371 public static function data_opening_single_quote() { 424 /** 425 * Data provider for {@see self::test_opening_single_quote()}. 426 * 427 * @return list<array{0: string, 1: string}> 428 */ 429 public static function data_opening_single_quote(): array { 372 430 return array( 373 431 array( … … 494 552 * @dataProvider data_double_prime 495 553 */ 496 public function test_double_prime( $input, $output ){554 public function test_double_prime( string $input, string $output ): void { 497 555 $this->assertSame( $output, wptexturize( $input ) ); 498 556 } 499 557 500 public static function data_double_prime() { 558 /** 559 * Data provider for {@see self::test_double_prime()}. 560 * 561 * @return list<array{0: string, 1: string}> 562 */ 563 public static function data_double_prime(): array { 501 564 return array( 502 565 array( … … 527 590 * @dataProvider data_single_prime 528 591 */ 529 public function test_single_prime( $input, $output ){592 public function test_single_prime( string $input, string $output ): void { 530 593 $this->assertSame( $output, wptexturize( $input ) ); 531 594 } 532 595 533 public static function data_single_prime() { 596 /** 597 * Data provider for {@see self::test_single_prime()}. 598 * 599 * @return list<array{0: string, 1: string}> 600 */ 601 public static function data_single_prime(): array { 534 602 return array( 535 603 array( … … 560 628 * @dataProvider data_contractions 561 629 */ 562 public function test_contractions( $input, $output ){630 public function test_contractions( string $input, string $output ): void { 563 631 $this->assertSame( $output, wptexturize( $input ) ); 564 632 } 565 633 566 public static function data_contractions() { 634 /** 635 * Data provider for {@see self::test_contractions()}. 636 * 637 * @return list<array{0: string, 1: string}> 638 */ 639 public static function data_contractions(): array { 567 640 return array( 568 641 array( … … 601 674 * @dataProvider data_opening_quote 602 675 */ 603 public function test_opening_quote( $input, $output ){676 public function test_opening_quote( string $input, string $output ): void { 604 677 $this->assertSame( $output, wptexturize( $input ) ); 605 678 } 606 679 607 public static function data_opening_quote() { 680 /** 681 * Data provider for {@see self::test_opening_quote()}. 682 * 683 * @return list<array{0: string, 1: string}> 684 */ 685 public static function data_opening_quote(): array { 608 686 return array( 609 687 array( … … 678 756 * @dataProvider data_closing_quote 679 757 */ 680 public function test_closing_quote( $input, $output ){758 public function test_closing_quote( string $input, string $output ): void { 681 759 $this->assertSame( $output, wptexturize( $input ) ); 682 760 } 683 761 684 public static function data_closing_quote() { 762 /** 763 * Data provider for {@see self::test_closing_quote()}. 764 * 765 * @return list<array{0: string, 1: string}> 766 */ 767 public static function data_closing_quote(): array { 685 768 return array( 686 769 array( … … 767 850 * @dataProvider data_closing_single_quote 768 851 */ 769 public function test_closing_single_quote( $input, $output ){852 public function test_closing_single_quote( string $input, string $output ): void { 770 853 $this->assertSame( $output, wptexturize( $input ) ); 771 854 } 772 855 773 public static function data_closing_single_quote() { 856 /** 857 * Data provider for {@see self::test_closing_single_quote()}. 858 * 859 * @return list<array{0: string, 1: string}> 860 */ 861 public static function data_closing_single_quote(): array { 774 862 return array( 775 863 array( … … 857 945 * @dataProvider data_multiplication 858 946 */ 859 public function test_multiplication( $input, $output ){947 public function test_multiplication( string $input, string $output ): void { 860 948 $this->assertSame( $output, wptexturize( $input ) ); 861 949 } 862 950 863 public static function data_multiplication() { 951 /** 952 * Data provider for {@see self::test_multiplication()}. 953 * 954 * @return list<array{0: string, 1: string}> 955 */ 956 public static function data_multiplication(): array { 864 957 return array( 865 958 array( … … 907 1000 * @dataProvider data_ampersand 908 1001 */ 909 public function test_ampersand( $input, $output ){1002 public function test_ampersand( string $input, string $output ): void { 910 1003 $this->assertSame( $output, wptexturize( $input ) ); 911 1004 } 912 1005 913 public static function data_ampersand() { 1006 /** 1007 * Data provider for {@see self::test_ampersand()}. 1008 * 1009 * @return list<array{0: string, 1: string}> 1010 */ 1011 public static function data_ampersand(): array { 914 1012 return array( 915 1013 array( … … 972 1070 * @dataProvider data_cockney 973 1071 */ 974 public function test_cockney( $input, $output ){1072 public function test_cockney( string $input, string $output ): void { 975 1073 $this->assertSame( $output, wptexturize( $input ) ); 976 1074 } 977 1075 978 public static function data_cockney() { 1076 /** 1077 * Data provider for {@see self::test_cockney()}. 1078 * 1079 * @return list<array{0: string, 1: string}> 1080 */ 1081 public static function data_cockney(): array { 979 1082 return array( 980 1083 array( … … 1033 1136 * @dataProvider data_smart_dashes 1034 1137 */ 1035 public function test_smart_dashes( $input, $output ){1138 public function test_smart_dashes( string $input, string $output ): void { 1036 1139 $this->assertSame( $output, wptexturize( $input ) ); 1037 1140 } 1038 1141 1039 public static function data_smart_dashes() { 1142 /** 1143 * Data provider for {@see self::test_smart_dashes()}. 1144 * 1145 * @return list<array{0: string, 1: string}> 1146 */ 1147 public static function data_smart_dashes(): array { 1040 1148 return array( 1041 1149 array( … … 1086 1194 * @dataProvider data_misc_static_replacements 1087 1195 */ 1088 public function test_misc_static_replacements( $input, $output ){1196 public function test_misc_static_replacements( string $input, string $output ): void { 1089 1197 $this->assertSame( $output, wptexturize( $input ) ); 1090 1198 } 1091 1199 1092 public static function data_misc_static_replacements() { 1200 /** 1201 * Data provider for {@see self::test_misc_static_replacements()}. 1202 * 1203 * @return list<array{0: string, 1: string}> 1204 */ 1205 public static function data_misc_static_replacements(): array { 1093 1206 return array( 1094 1207 array( … … 1141 1254 * @dataProvider data_quoted_numbers 1142 1255 */ 1143 public function test_quoted_numbers( $input, $output ){1256 public function test_quoted_numbers( string $input, string $output ): void { 1144 1257 $this->assertSame( $output, wptexturize( $input ) ); 1145 1258 } 1146 1259 1147 public static function data_quoted_numbers() { 1260 /** 1261 * Data provider for {@see self::test_quoted_numbers()}. 1262 * 1263 * @return list<array{0: string, 1: string}> 1264 */ 1265 public static function data_quoted_numbers(): array { 1148 1266 return array( 1149 1267 array( … … 1192 1310 * @dataProvider data_quotes_and_dashes 1193 1311 */ 1194 public function test_quotes_and_dashes( $input, $output ){1312 public function test_quotes_and_dashes( string $input, string $output ): void { 1195 1313 $this->assertSame( $output, wptexturize( $input ) ); 1196 1314 } 1197 1315 1198 public static function data_quotes_and_dashes() { 1316 /** 1317 * Data provider for {@see self::test_quotes_and_dashes()}. 1318 * 1319 * @return list<array{0: string, 1: string}> 1320 */ 1321 public static function data_quotes_and_dashes(): array { 1199 1322 return array( 1200 1323 array( … … 1255 1378 * @dataProvider data_tag_avoidance 1256 1379 */ 1257 public function test_tag_avoidance( $input, $output ){1380 public function test_tag_avoidance( string $input, string $output ): void { 1258 1381 $this->assertSame( $output, wptexturize( $input ) ); 1259 1382 } 1260 1383 1261 public static function data_tag_avoidance() { 1384 /** 1385 * Data provider for {@see self::test_tag_avoidance()}. 1386 * 1387 * @return list<array{0: string, 1: string}> 1388 */ 1389 public static function data_tag_avoidance(): array { 1262 1390 return array( 1263 1391 array( … … 1478 1606 * @dataProvider data_year_abbr 1479 1607 */ 1480 public function test_year_abbr( $input, $output ){1608 public function test_year_abbr( string $input, string $output ): void { 1481 1609 $this->assertSame( $output, wptexturize( $input ) ); 1482 1610 } 1483 1611 1484 public static function data_year_abbr() { 1612 /** 1613 * Data provider for {@see self::test_year_abbr()}. 1614 * 1615 * @return list<array{0: string, 1: string}> 1616 */ 1617 public static function data_year_abbr(): array { 1485 1618 return array( 1486 1619 array( … … 1567 1700 * @dataProvider data_translate 1568 1701 */ 1569 public function test_translate( $input, $output ){1702 public function test_translate( string $input, string $output ): void { 1570 1703 add_filter( 'gettext_with_context', array( $this, 'filter_translate' ), 10, 4 ); 1571 1704 … … 1607 1740 } 1608 1741 1609 public static function data_translate() { 1742 /** 1743 * Data provider for {@see self::test_translate()}. 1744 * 1745 * @return list<array{0: string, 1: string}> 1746 */ 1747 public static function data_translate(): array { 1610 1748 return array( 1611 1749 array( … … 1794 1932 * @dataProvider data_element_stack 1795 1933 */ 1796 public function test_element_stack( $input, $output ){1934 public function test_element_stack( string $input, string $output ): void { 1797 1935 $this->assertSame( $output, wptexturize( $input ) ); 1798 1936 } 1799 1937 1800 public static function data_element_stack() { 1938 /** 1939 * Data provider for {@see self::test_element_stack()}. 1940 * 1941 * @return list<array{0: string, 1: string}> 1942 */ 1943 public static function data_element_stack(): array { 1801 1944 return array( 1802 1945 array( … … 1845 1988 * @dataProvider data_unregistered_shortcodes 1846 1989 */ 1847 public function test_unregistered_shortcodes( $input, $output ){1990 public function test_unregistered_shortcodes( string $input, string $output ): void { 1848 1991 add_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 ); 1849 1992 1850 $ output = $this->assertSame( $output, wptexturize( $input ) );1993 $this->assertSame( $output, wptexturize( $input ) ); 1851 1994 1852 1995 remove_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ) ); 1853 return $output;1854 1996 } 1855 1997 … … 1859 2001 } 1860 2002 1861 public static function data_unregistered_shortcodes() { 2003 /** 2004 * Data provider for {@see self::test_unregistered_shortcodes()}. 2005 * 2006 * @return list<array{0: string, 1: string}> 2007 */ 2008 public static function data_unregistered_shortcodes(): array { 1862 2009 return array( 1863 2010 array( … … 1930 2077 * @dataProvider data_primes_vs_quotes 1931 2078 */ 1932 public function test_primes_vs_quotes( $input, $output ){2079 public function test_primes_vs_quotes( string $input, string $output ): void { 1933 2080 $this->assertSame( $output, wptexturize( $input ) ); 1934 2081 } 1935 2082 1936 public static function data_primes_vs_quotes() { 2083 /** 2084 * Data provider for {@see self::test_primes_vs_quotes()}. 2085 * 2086 * @return list<array{0: string, 1: string}> 2087 */ 2088 public static function data_primes_vs_quotes(): array { 1937 2089 return array( 1938 2090 array( … … 1992 2144 * @dataProvider data_primes_quotes_translation 1993 2145 */ 1994 public function test_primes_quotes_translation( $input, $output ){2146 public function test_primes_quotes_translation( string $input, string $output ): void { 1995 2147 add_filter( 'gettext_with_context', array( $this, 'filter_translate2' ), 10, 4 ); 1996 2148 … … 2030 2182 } 2031 2183 2032 public static function data_primes_quotes_translation() { 2184 /** 2185 * Data provider for {@see self::test_primes_quotes_translation()}. 2186 * 2187 * @return list<array{0: string, 1: string}> 2188 */ 2189 public static function data_primes_quotes_translation(): array { 2033 2190 return array( 2034 2191 array( … … 2087 2244 * @covers ::_get_wptexturize_split_regex 2088 2245 * @covers ::_get_wptexturize_shortcode_regex 2089 */ 2090 public function test_pcre_performance( $input ) { 2246 * @covers ::get_html_split_regex 2247 */ 2248 public function test_pcre_performance( string $input ): void { 2091 2249 global $shortcode_tags; 2092 2250 … … 2100 2258 $regex = _get_wptexturize_split_regex( $shortcode_regex ); 2101 2259 $result = benchmark_pcre_backtracking( $regex, $input, 'split' ); 2102 return$this->assertLessThan( 200, $result );2260 $this->assertLessThan( 200, $result ); 2103 2261 } 2104 2262 … … 2108 2266 * @ticket 35864 2109 2267 */ 2110 public function test_trailing_less_than() {2268 public function test_trailing_less_than(): void { 2111 2269 $this->assertSame( 'F–oo<', wptexturize( 'F--oo<', true ) ); 2112 2270 } 2113 2271 2114 public static function data_whole_posts() { 2272 /** 2273 * Data provider for {@see self::test_pcre_performance()}. 2274 * 2275 * @return array<int, array{0: string}> 2276 */ 2277 public static function data_whole_posts(): array { 2115 2278 require_once DIR_TESTDATA . '/formatting/whole-posts.php'; 2116 2279 return data_whole_posts();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)