Index: /wp-testcase/jacob/TestFormatting.php =================================================================== --- /wp-testcase/jacob/TestFormatting.php (revision 122) +++ /wp-testcase/jacob/TestFormatting.php (revision 123) @@ -7,5 +7,11 @@ define('TEST_DATA', DIR_TESTDATA.'/jacob/'); -class WPTest extends PHPUnit_Framework_TestCase { + + + + + + +class WPFormattingTest extends WPTestCase { function file_test($name, $callback) { @@ -45,5 +51,5 @@ tags within `
` elements as part of the nightmare that is `wpautop`. */ -class Test_Clean_Pre extends WPTest { +class Test_Clean_Pre extends WPFormattingTest { function test_removes_self_closing_br_with_space() { $source = 'a b c\n
sldfj
'; @@ -76,5 +82,5 @@ `seems_utf8` returns true for utf-8 strings, false otherwise. */ -class Test_Seems_UTF8 extends WPTest { +class Test_Seems_UTF8 extends WPFormattingTest { function test_returns_true_for_utf8_strings() { // from http://www.i18nguy.com/unicode-example.html @@ -100,5 +106,5 @@ ampersands if they are already part of entities. */ -class Test_WP_Specialchars extends WPTest { +class Test_WP_Specialchars extends WPFormattingTest { function test_escapes_ampersands() { $source = "penn & teller & at&t"; @@ -124,5 +130,5 @@ } -class Test_UTF8_URI_Encode extends WPTest { +class Test_UTF8_URI_Encode extends WPFormattingTest { /* Non-ASCII UTF-8 characters should be percent encoded. Spaces etc. @@ -150,5 +156,5 @@ Removes accents from characters and decomposes ligatures. */ -class Test_Remove_Accents extends WPTest { +class Test_Remove_Accents extends WPFormattingTest { /* @@ -201,5 +207,5 @@ Sanitizes filenames. */ -class Test_Sanitize_File_Name extends WPTest { +class Test_Sanitize_File_Name extends WPFormattingTest { function test_makes_lowercase() { $this->assertEquals("att", sanitize_file_name("ATT")); @@ -233,5 +239,5 @@ Léon: No women, no kids, that's the rules. */ -class Test_Sanitize_User extends WPTest { +class Test_Sanitize_User extends WPFormattingTest { function test_strips_html() { $input = "Captain Awesome"; @@ -250,5 +256,5 @@ } -class Test_Sanitize_Title extends WPTest { +class Test_Sanitize_Title extends WPFormattingTest { function test_strips_html() { $input = "Captain Awesome"; @@ -264,5 +270,5 @@ } -class Test_Sanitize_Title_With_Dashes extends WPTest { +class Test_Sanitize_Title_With_Dashes extends WPFormattingTest { function test_strips_html() { $input = "Captain Awesome"; @@ -295,5 +301,5 @@ four unrelated tasks. ;) */ -class Test_Convert_Chars extends WPTest { +class Test_Convert_Chars extends WPFormattingTest { function test_replaces_windows1252_entities_with_unicode_ones() { $input = " "; @@ -320,5 +326,5 @@ } -class Test_Funky_JavaScript_Fix extends WPTest { +class Test_Funky_JavaScript_Fix extends WPFormattingTest { function test_does_nothing_if_not_mac_or_win_ie() { global $is_macIE, $is_winIE; @@ -356,5 +362,5 @@ -class Test_BalanceTags extends WPTest { +class Test_BalanceTags extends WPFormattingTest { function test_adds_missing_end_tags() { $this->assertEquals("abc", balanceTags("abc", true)); @@ -365,5 +371,5 @@ } -class Test_Zeroise extends WPTest { +class Test_Zeroise extends WPFormattingTest { function test_pads_with_leading_zeroes() { $this->assertEquals("00005", zeroise(5, 5)); @@ -374,5 +380,5 @@ } -class Test_Backslashit extends WPTest { +class Test_Backslashit extends WPFormattingTest { function test_backslashes_alphas() { $this->assertEquals("\\a943\\b\\c", backslashit("a943bc")); @@ -383,5 +389,5 @@ } -class Test_Untrailingslashit extends WPTest { +class Test_Untrailingslashit extends WPFormattingTest { function test_removes_trailing_slashes() { $this->assertEquals("a", untrailingslashit("a/")); @@ -390,5 +396,5 @@ } -class Test_Trailingslashit extends WPTest { +class Test_Trailingslashit extends WPFormattingTest { function test_adds_trailing_slash() { $this->assertEquals("a/", trailingslashit("a")); @@ -399,5 +405,5 @@ } -class Test_Is_Email extends WPTest { +class Test_Is_Email extends WPFormattingTest { function test_returns_true_if_given_a_valid_email_address() { $data = array( @@ -432,5 +438,5 @@ =?iso-8859-1?q?this=20is=20some=20text?= */ -class Test_WP_ISO_Descrambler extends WPTest { +class Test_WP_ISO_Descrambler extends WPFormattingTest { function test_decodes_iso_8859_1_rfc2047_q_encoding() { $this->assertEquals("this is some text", wp_iso_descrambler("=?iso-8859-1?q?this=20is=20some=20text?=")); @@ -438,5 +444,5 @@ } -class Test_Ent2NCR extends WPTest { +class Test_Ent2NCR extends WPFormattingTest { function test_converts_named_entities_to_numeric_character_references() { $data = get_testdata("entities.txt");