Make WordPress Core

Changeset 123 in tests for wp-testcase/jacob/TestFormatting.php


Ignore:
Timestamp:
12/05/2007 08:19:37 PM (16 years ago)
Author:
tellyworth
Message:

make new formatting tests run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/jacob/TestFormatting.php

    r122 r123  
    77define('TEST_DATA', DIR_TESTDATA.'/jacob/');
    88
    9 class WPTest extends PHPUnit_Framework_TestCase {
     9
     10
     11
     12
     13
     14
     15class WPFormattingTest extends WPTestCase {
    1016   
    1117    function file_test($name, $callback) {
     
    4551   tags within `<pre>` elements as part of the nightmare that
    4652   is `wpautop`. */
    47 class Test_Clean_Pre extends WPTest {
     53class Test_Clean_Pre extends WPFormattingTest {
    4854    function test_removes_self_closing_br_with_space() {
    4955        $source = 'a b c\n<br />sldfj<br />';
     
    7682`seems_utf8` returns true for utf-8 strings, false otherwise.
    7783*/
    78 class Test_Seems_UTF8 extends WPTest {
     84class Test_Seems_UTF8 extends WPFormattingTest {
    7985    function test_returns_true_for_utf8_strings() {
    8086        // from http://www.i18nguy.com/unicode-example.html
     
    100106ampersands if they are already part of entities.
    101107*/
    102 class Test_WP_Specialchars extends WPTest {
     108class Test_WP_Specialchars extends WPFormattingTest {
    103109    function test_escapes_ampersands() {
    104110        $source = "penn & teller & at&t";
     
    124130}
    125131
    126 class Test_UTF8_URI_Encode extends WPTest {
     132class Test_UTF8_URI_Encode extends WPFormattingTest {
    127133    /*
    128134    Non-ASCII UTF-8 characters should be percent encoded. Spaces etc.
     
    150156Removes accents from characters and decomposes ligatures.
    151157*/
    152 class Test_Remove_Accents extends WPTest {
     158class Test_Remove_Accents extends WPFormattingTest {
    153159   
    154160    /*
     
    201207Sanitizes filenames.
    202208*/
    203 class Test_Sanitize_File_Name extends WPTest {
     209class Test_Sanitize_File_Name extends WPFormattingTest {
    204210    function test_makes_lowercase() {
    205211        $this->assertEquals("att", sanitize_file_name("ATT"));
     
    233239Léon: No women, no kids, that's the rules.
    234240*/
    235 class Test_Sanitize_User extends WPTest {
     241class Test_Sanitize_User extends WPFormattingTest {
    236242    function test_strips_html() {
    237243        $input = "Captain <strong>Awesome</strong>";
     
    250256}
    251257
    252 class Test_Sanitize_Title extends WPTest {
     258class Test_Sanitize_Title extends WPFormattingTest {
    253259    function test_strips_html() {
    254260        $input = "Captain <strong>Awesome</strong>";
     
    264270}
    265271
    266 class Test_Sanitize_Title_With_Dashes extends WPTest {
     272class Test_Sanitize_Title_With_Dashes extends WPFormattingTest {
    267273    function test_strips_html() {
    268274        $input = "Captain <strong>Awesome</strong>";
     
    295301four unrelated tasks. ;)
    296302*/
    297 class Test_Convert_Chars extends WPTest {
     303class Test_Convert_Chars extends WPFormattingTest {
    298304    function test_replaces_windows1252_entities_with_unicode_ones() {
    299305        $input = "&#130;&#131;&#132;&#133;&#134;&#135;&#136;&#137;&#138;&#139;&#140;&#145;&#146;&#147;&#148;&#149;&#150;&#151;&#152;&#153;&#154;&#155;&#156;&#159;";
     
    320326}
    321327
    322 class Test_Funky_JavaScript_Fix extends WPTest {
     328class Test_Funky_JavaScript_Fix extends WPFormattingTest {
    323329    function test_does_nothing_if_not_mac_or_win_ie() {
    324330        global $is_macIE, $is_winIE;
     
    356362
    357363
    358 class Test_BalanceTags extends WPTest {
     364class Test_BalanceTags extends WPFormattingTest {
    359365    function test_adds_missing_end_tags() {
    360366        $this->assertEquals("<b><i>abc</i></b>", balanceTags("<b><i>abc</b>", true));
     
    365371}
    366372
    367 class Test_Zeroise extends WPTest {
     373class Test_Zeroise extends WPFormattingTest {
    368374    function test_pads_with_leading_zeroes() {
    369375        $this->assertEquals("00005", zeroise(5, 5));
     
    374380}
    375381
    376 class Test_Backslashit extends WPTest {
     382class Test_Backslashit extends WPFormattingTest {
    377383    function test_backslashes_alphas() {
    378384        $this->assertEquals("\\a943\\b\\c", backslashit("a943bc"));
     
    383389}
    384390
    385 class Test_Untrailingslashit extends WPTest {
     391class Test_Untrailingslashit extends WPFormattingTest {
    386392    function test_removes_trailing_slashes() {
    387393        $this->assertEquals("a", untrailingslashit("a/"));
     
    390396}
    391397
    392 class Test_Trailingslashit extends WPTest {
     398class Test_Trailingslashit extends WPFormattingTest {
    393399    function test_adds_trailing_slash() {
    394400        $this->assertEquals("a/", trailingslashit("a"));
     
    399405}
    400406
    401 class Test_Is_Email extends WPTest {
     407class Test_Is_Email extends WPFormattingTest {
    402408    function test_returns_true_if_given_a_valid_email_address() {
    403409        $data = array(
     
    432438    =?iso-8859-1?q?this=20is=20some=20text?=
    433439*/
    434 class Test_WP_ISO_Descrambler extends WPTest {
     440class Test_WP_ISO_Descrambler extends WPFormattingTest {
    435441    function test_decodes_iso_8859_1_rfc2047_q_encoding() {
    436442        $this->assertEquals("this is some text", wp_iso_descrambler("=?iso-8859-1?q?this=20is=20some=20text?="));
     
    438444}
    439445
    440 class Test_Ent2NCR extends WPTest {
     446class Test_Ent2NCR extends WPFormattingTest {
    441447    function test_converts_named_entities_to_numeric_character_references() {
    442448        $data = get_testdata("entities.txt");
Note: See TracChangeset for help on using the changeset viewer.