Changeset 123 in tests for wp-testcase/jacob/TestFormatting.php
- Timestamp:
- 12/05/2007 08:19:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/jacob/TestFormatting.php
r122 r123 7 7 define('TEST_DATA', DIR_TESTDATA.'/jacob/'); 8 8 9 class WPTest extends PHPUnit_Framework_TestCase { 9 10 11 12 13 14 15 class WPFormattingTest extends WPTestCase { 10 16 11 17 function file_test($name, $callback) { … … 45 51 tags within `<pre>` elements as part of the nightmare that 46 52 is `wpautop`. */ 47 class Test_Clean_Pre extends WP Test {53 class Test_Clean_Pre extends WPFormattingTest { 48 54 function test_removes_self_closing_br_with_space() { 49 55 $source = 'a b c\n<br />sldfj<br />'; … … 76 82 `seems_utf8` returns true for utf-8 strings, false otherwise. 77 83 */ 78 class Test_Seems_UTF8 extends WP Test {84 class Test_Seems_UTF8 extends WPFormattingTest { 79 85 function test_returns_true_for_utf8_strings() { 80 86 // from http://www.i18nguy.com/unicode-example.html … … 100 106 ampersands if they are already part of entities. 101 107 */ 102 class Test_WP_Specialchars extends WP Test {108 class Test_WP_Specialchars extends WPFormattingTest { 103 109 function test_escapes_ampersands() { 104 110 $source = "penn & teller & at&t"; … … 124 130 } 125 131 126 class Test_UTF8_URI_Encode extends WP Test {132 class Test_UTF8_URI_Encode extends WPFormattingTest { 127 133 /* 128 134 Non-ASCII UTF-8 characters should be percent encoded. Spaces etc. … … 150 156 Removes accents from characters and decomposes ligatures. 151 157 */ 152 class Test_Remove_Accents extends WP Test {158 class Test_Remove_Accents extends WPFormattingTest { 153 159 154 160 /* … … 201 207 Sanitizes filenames. 202 208 */ 203 class Test_Sanitize_File_Name extends WP Test {209 class Test_Sanitize_File_Name extends WPFormattingTest { 204 210 function test_makes_lowercase() { 205 211 $this->assertEquals("att", sanitize_file_name("ATT")); … … 233 239 Léon: No women, no kids, that's the rules. 234 240 */ 235 class Test_Sanitize_User extends WP Test {241 class Test_Sanitize_User extends WPFormattingTest { 236 242 function test_strips_html() { 237 243 $input = "Captain <strong>Awesome</strong>"; … … 250 256 } 251 257 252 class Test_Sanitize_Title extends WP Test {258 class Test_Sanitize_Title extends WPFormattingTest { 253 259 function test_strips_html() { 254 260 $input = "Captain <strong>Awesome</strong>"; … … 264 270 } 265 271 266 class Test_Sanitize_Title_With_Dashes extends WP Test {272 class Test_Sanitize_Title_With_Dashes extends WPFormattingTest { 267 273 function test_strips_html() { 268 274 $input = "Captain <strong>Awesome</strong>"; … … 295 301 four unrelated tasks. ;) 296 302 */ 297 class Test_Convert_Chars extends WP Test {303 class Test_Convert_Chars extends WPFormattingTest { 298 304 function test_replaces_windows1252_entities_with_unicode_ones() { 299 305 $input = "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ"; … … 320 326 } 321 327 322 class Test_Funky_JavaScript_Fix extends WP Test {328 class Test_Funky_JavaScript_Fix extends WPFormattingTest { 323 329 function test_does_nothing_if_not_mac_or_win_ie() { 324 330 global $is_macIE, $is_winIE; … … 356 362 357 363 358 class Test_BalanceTags extends WP Test {364 class Test_BalanceTags extends WPFormattingTest { 359 365 function test_adds_missing_end_tags() { 360 366 $this->assertEquals("<b><i>abc</i></b>", balanceTags("<b><i>abc</b>", true)); … … 365 371 } 366 372 367 class Test_Zeroise extends WP Test {373 class Test_Zeroise extends WPFormattingTest { 368 374 function test_pads_with_leading_zeroes() { 369 375 $this->assertEquals("00005", zeroise(5, 5)); … … 374 380 } 375 381 376 class Test_Backslashit extends WP Test {382 class Test_Backslashit extends WPFormattingTest { 377 383 function test_backslashes_alphas() { 378 384 $this->assertEquals("\\a943\\b\\c", backslashit("a943bc")); … … 383 389 } 384 390 385 class Test_Untrailingslashit extends WP Test {391 class Test_Untrailingslashit extends WPFormattingTest { 386 392 function test_removes_trailing_slashes() { 387 393 $this->assertEquals("a", untrailingslashit("a/")); … … 390 396 } 391 397 392 class Test_Trailingslashit extends WP Test {398 class Test_Trailingslashit extends WPFormattingTest { 393 399 function test_adds_trailing_slash() { 394 400 $this->assertEquals("a/", trailingslashit("a")); … … 399 405 } 400 406 401 class Test_Is_Email extends WP Test {407 class Test_Is_Email extends WPFormattingTest { 402 408 function test_returns_true_if_given_a_valid_email_address() { 403 409 $data = array( … … 432 438 =?iso-8859-1?q?this=20is=20some=20text?= 433 439 */ 434 class Test_WP_ISO_Descrambler extends WP Test {440 class Test_WP_ISO_Descrambler extends WPFormattingTest { 435 441 function test_decodes_iso_8859_1_rfc2047_q_encoding() { 436 442 $this->assertEquals("this is some text", wp_iso_descrambler("=?iso-8859-1?q?this=20is=20some=20text?=")); … … 438 444 } 439 445 440 class Test_Ent2NCR extends WP Test {446 class Test_Ent2NCR extends WPFormattingTest { 441 447 function test_converts_named_entities_to_numeric_character_references() { 442 448 $data = get_testdata("entities.txt");
Note: See TracChangeset
for help on using the changeset viewer.