Make WordPress Core


Ignore:
Timestamp:
07/09/2012 03:32:24 PM (13 years ago)
Author:
nacin
Message:

Convert knownWPBug and knownUTBug to @ticket annotations. fixes #102.

Allows for an extra description to be included with the annotation,
which will be passed to markTestSkipped().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/test_includes_formatting.php

    r865 r894  
    289289    }
    290290
     291    /**
     292     * @ticket 16892
     293     */
    291294    function test_click_inside_html() {
    292         $this->knownWPBug( 16892 );
    293295        $urls_before = array(
    294296            '<span>http://example.com</span>',
     
    327329    }
    328330
     331    /**
     332     * @ticket 16859
     333     */
    329334    function test_square_brackets() {
    330         $this->knownWPBug( 16859 );
    331335        $urls_before = array(
    332336            'http://example.com/?foo[bar]=baz',
     
    505509    }
    506510
    507     //WP Tickets #4539, #15241
     511    /**
     512     * @ticket 4539
     513     * @ticket 15241
     514     */
    508515    function test_full_sentences_with_unmatched_single_quotes() {
    509516        $this->assertEquals(
     
    513520    }
    514521
    515     //WP Ticket #4539
     522    /**
     523     * @ticket 4539
     524     */
    516525    function test_quotes() {
    517         $this->knownWPBug(4539);
    518526        $this->assertEquals('&#8220;Quoted String&#8221;', wptexturize('"Quoted String"'));
    519527        $this->assertEquals('Here is &#8220;<a href="http://example.com">a test with a link</a>&#8221;', wptexturize('Here is "<a href="http://example.com">a test with a link</a>"'));
     
    531539    }
    532540
    533     //WP Ticket #4539
     541    /**
     542     * @ticket 4539
     543     */
    534544    function test_quotes_before_s() {
    535         $this->knownWPBug(4539);
    536545        $this->assertEquals('test&#8217;s', wptexturize("test's"));
    537546        $this->assertEquals('&#8216;test&#8217;s', wptexturize("'test's"));
     
    541550    }
    542551
    543     //WP Ticket #4539
     552    /**
     553     * @ticket 4539
     554     */
    544555    function test_quotes_before_numbers() {
    545         $this->knownWPBug(4539);
    546556        $this->assertEquals('Class of &#8217;99', wptexturize("Class of '99"));
    547557        $this->assertEquals('Class of &#8217;99&#8217;s', wptexturize("Class of '99's"));
     
    557567    }
    558568
    559     //WP Ticket #15241 and #4539
     569    /**
     570     * @ticket 4539
     571     * @ticket 15241
     572     */
    560573    function test_other_html() {
    561         $this->knownWPBug(4539);
    562574        $this->assertEquals('&#8216;<strong>', wptexturize("'<strong>"));
    563575        $this->assertEquals('&#8216;<strong>Quoted Text</strong>&#8217;,', wptexturize("'<strong>Quoted Text</strong>',"));
     
    580592    }
    581593
     594    /**
     595     * @ticket 8775
     596     */
    582597    function test_wptexturize_quotes_around_numbers() {
    583         $this->knownWPBug(8775);
    584598        $this->assertEquals('&#8220;12345&#8221;', wptexturize('"12345"'));
    585599        $this->assertEquals('&#8216;12345&#8217;', wptexturize('\'12345\''));
     
    588602    }
    589603
     604    /**
     605     * @ticket 8912
     606     */
    590607    function test_wptexturize_html_comments() {
    591         $this->knownWPBug(8912);
    592608        $this->assertEquals('<!--[if !IE]>--><!--<![endif]-->', wptexturize('<!--[if !IE]>--><!--<![endif]-->'));
    593609        $this->assertEquals('<!--[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]-->'));
     
    595611    }
    596612
    597     //WP Ticket #15241 and #4539
     613    /**
     614     * @ticket 4539
     615     * @ticket 15241
     616     */
    598617    function test_entity_quote_cuddling() {
    599         $this->knownWPBug(4539);
    600618        $this->assertEquals('&nbsp;&#8220;Testing&#8221;', wptexturize('&nbsp;"Testing"'));
    601619        $this->assertEquals('&#38;&#8220;Testing&#8221;', wptexturize('&#38;"Testing"'));
     
    657675    }
    658676
     677    /**
     678     * @ticket 16859
     679     */
    659680    function test_square_brackets() {
    660         $this->knownWPBug( 16859 );
    661681        $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) );
    662682        $this->assertEquals( 'http://example.com/?baz=bar&#038;foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) );
     
    732752    /**
    733753     * wpautop() Should not alter the contents of "<pre>" elements
    734      * @link http://core.trac.wordpress.org/ticket/19855
    735      * @return void
     754     *
     755     * @ticket 19855
    736756     */
    737757    public function test_skip_pre_elements() {
    738         $this->knownWPBug( 19855 );
    739758        $code = file_get_contents( DIR_TESTDATA . '/formatting/sizzle.js' );
    740759        $code = str_replace( "\r", '', $code );
     
    760779    /**
    761780     * wpautop() Should not add <br/> to "<input>" elements
    762      * @link http://core.trac.wordpress.org/ticket/16456
    763      * @return void
     781     *
     782     * @ticket 16456
    764783     */
    765784    public function test_skip_input_elements() {
    766         $this->knownWPBug( 16456 );
    767785        $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />';
    768786        $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) );
     
    774792 */
    775793class TestLikeEscape extends WP_UnitTestCase {
     794    /**
     795     * @ticket 10041
     796     */
    776797    function test_like_escape() {
    777         $this->knownWPBug(10041);
    778798
    779799        $inputs = array(
     
    10321052        $this->assertEquals($expected, sanitize_user($input));
    10331053    }
     1054    /**
     1055     * @ticket 10823
     1056     */
    10341057    function test_strips_entities() {
    1035         $this->knownWPBug( 10823 );
    10361058        $this->assertEquals("ATT", sanitize_user("AT&amp;T"));
    10371059        $this->assertEquals("ATT Test;", sanitize_user("AT&amp;T Test;"));
     
    11291151    }
    11301152
     1153    /**
     1154     * @ticket 10823
     1155     */
    11311156    function test_strips_entities() {
    1132         $this->knownWPBug( 10823 );
    11331157        $this->assertEquals("no-entities-here", sanitize_title_with_dashes("No &nbsp; Entities &ndash; Here &amp;"));
    11341158        $this->assertEquals("one-two", sanitize_title_with_dashes("One &amp; Two", '', 'save'));
     
    11751199    }
    11761200
     1201    /**
     1202     * @ticket 19820
     1203     */
    11771204    function test_replaces_multiply_sign() {
    1178         $this->knownWPBug(19820);
    11791205        $this->assertEquals("6x7-is-42", sanitize_title_with_dashes("6×7 is 42", '', 'save'));
    11801206    }
    11811207
     1208    /**
     1209     * @ticket 20772
     1210     */
    11821211    function test_replaces_standalone_diacritic() {
    1183         $this->knownWPBug(20772);
    11841212        $this->assertEquals("aaaa", sanitize_title_with_dashes("āáǎà", '', 'save'));
    11851213    }
     
    11971225    }
    11981226
     1227    /**
     1228     * @ticket 20503
     1229     */
    11991230    function test_replaces_latin_letter_z_with_caron() {
    1200         $this->knownWPBug(20503);
    12011231        $input = "&#142;&#158;";
    12021232        $output = "&#381;&#382;";
     
    14451475    }
    14461476
     1477    /**
     1478     * @ticket 9591
     1479     */
    14471480    public function test_remove_accents_latin1_supplement() {
    1448         $this->knownWPBug(9591);
    1449 
    14501481        $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ';
    14511482        $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy';
     
    14801511    }
    14811512
     1513    /**
     1514     * @ticket 17738
     1515     */
    14821516    public function test_remove_accents_vowels_diacritic() {
    1483         $this->knownWPBug(17738);
    1484 
    14851517        // Vowels with diacritic
    14861518        // unmarked
     
    14981530    }
    14991531
     1532    /**
     1533     * @ticket 20772
     1534     */
    15001535    public function test_remove_accents_hanyu_pinyin() {
    1501         $this->knownWPBug(20772);
    1502 
    15031536        // Vowels with diacritic (Chinese, Hanyu Pinyin)
    15041537        // macron
     
    15191552 */
    15201553class TestStripSlashesDeep extends WP_UnitTestCase {
     1554    /**
     1555     * @ticket 18026
     1556     */
    15211557    function test_preserves_original_datatype() {
    1522         $this->knownWPBug(18026);
    15231558
    15241559        $this->assertEquals( true, stripslashes_deep( true ) );
Note: See TracChangeset for help on using the changeset viewer.