WordPress.org

Make WordPress Core

Changeset 894 in tests


Ignore:
Timestamp:
07/09/2012 03:32:24 PM (9 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().

Location:
trunk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/testcase.php

    r893 r894  
    125125        $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName() );
    126126        foreach ( $tickets as $ticket ) {
     127            $annotation = explode( ' ', $ticket, 2 );
     128            $ticket     = $annotation[0];
     129            $message    = isset( $annotation[1] ) ? $annotation[1] : '';
     130
    127131            if ( is_numeric( $ticket ) ) {
    128                 $this->knownWPBug( $ticket );
     132                $this->knownWPBug( $ticket, $message );
    129133            } elseif ( 'UT' == substr( $ticket, 0, 2 ) ) {
    130                 $this->knownUTBug( substr( $ticket, 2 ) );
     134                $this->knownUTBug( substr( $ticket, 2 ), $message );
    131135            }
    132136        }
     
    136140     * Skips the current test if there is an open WordPress ticket with id $ticket_id
    137141     */
    138     function knownWPBug( $ticket_id ) {
     142    function knownWPBug( $ticket_id, $message = '' ) {
    139143        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
    140             $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
     144            $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
    141145        }
    142146    }
     
    145149     * Skips the current test if there is an open unit tests ticket with id $ticket_id
    146150     */
    147     function knownUTBug( $ticket_id ) {
     151    function knownUTBug( $ticket_id, $message = '' ) {
    148152        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
    149             $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
     153            $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
    150154        }
    151155    }
     
    154158     * Skips the current test if there is an open plugin ticket with id $ticket_id
    155159     */
    156     function knownPluginBug( $ticket_id ) {
     160    function knownPluginBug( $ticket_id, $message = '' ) {
    157161        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
    158             $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
     162            $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
    159163        }
    160164    }
  • trunk/tests/test-xmlrpc-api/test_mw_getPost.php

    r883 r894  
    3838    }
    3939
     40    /**
     41     * @ticket 20336
     42     */
    4043    function test_invalid_postid() {
    41         $this->knownWPBug(20336);
    42 
    4344        $result = $this->myxmlrpcserver->mw_getPost( array( 9999, 'author', 'author' ) );
    4445        $this->assertInstanceOf( 'IXR_Error', $result );
  • trunk/tests/test-xmlrpc-api/test_mw_newPost.php

    r771 r894  
    8686    }
    8787
     88    /**
     89     * @ticket 20356
     90     */
    8891    function test_invalid_author() {
    89         $this->knownWPBug( 20356 );
    9092        $this->make_user_by_role( 'editor' );
    9193
  • trunk/tests/test-xmlrpc-api/test_wp_getOptions.php

    r771 r894  
    3030    }
    3131
     32    /**
     33     * @ticket 20201
     34     */
    3235    function test_option_values_subscriber() {
    3336        global $wp_version;
    34 
    35         $this->knownWPBug( 20201 );
    36 
    3737        $this->make_user_by_role( 'subscriber' );
    3838
  • trunk/tests/test-xmlrpc-api/test_wp_getPage.php

    r883 r894  
    3636    }
    3737
     38    /**
     39     * @ticket 20336
     40     */
    3841    function test_invalid_pageid() {
    39         $this->knownWPBug(20336);
    40 
    4142        $this->make_user_by_role( 'editor' );
    4243
  • trunk/tests/test-xmlrpc-api/test_wp_getPages.php

    r883 r894  
    6060    }
    6161
    62     function test_semi_capable_user() {
    63         $this->knownWPBug( 20629 );
    64 
     62    /**
     63     * @ticket 20629
     64     */
     65    function test_semi_capable_user() {
    6566        add_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap') , 10, 4 );
    6667
  • trunk/tests/test-xmlrpc-api/test_wp_getPosts.php

    r883 r894  
    1212    }
    1313
     14    /**
     15     * @ticket 20991
     16     */
    1417    function test_incapable_user() {
    15         $this->knownWPBug( 20991 );
    16 
    1718        $this->make_user_by_role( 'subscriber' );
    1819
  • trunk/tests/test_actions.php

    r892 r894  
    218218    }
    219219
     220    /**
     221     * @ticket 11241
     222     */
    220223    function test_action_keyed_array() {
    221         $this->knownWPBug(11241);
    222224        $a = new MockAction();
    223225
  • trunk/tests/test_actions_closures.php

    r883 r894  
    88class WP_Test_Actions_Closures extends WP_UnitTestCase {
    99
     10    /**
     11     * @ticket 10493
     12     */
    1013    function test_action_closure() {
    11         $this->knownWPBug(10493);
    12 
    1314        $tag = rand_str();
    1415        $closure = function($a, $b) { $GLOBALS[$a] = $b;};
  • trunk/tests/test_admin_includes_theme.php

    r828 r894  
    3636    }
    3737
     38    /**
     39     * @ticket 10959
     40     * @ticket 11216
     41     */
    3842    function test_page_templates() {
    39         $this->knownWPBug(10959);
    40         $this->knownWPBug(11216);
    4143        $theme = get_theme('Page Template Theme');
    4244        $this->assertFalse( empty($theme) );
  • trunk/tests/test_cron.php

    r828 r894  
    151151    }
    152152
     153    /**
     154     * @ticket 10468
     155     */
    153156    function test_clear_schedule_new_args() {
    154         $this->knownWPBug(10468);
    155157        $hook = rand_str();
    156158        $args = array(rand_str());
     
    188190    }
    189191
     192    /**
     193     * @ticket 6966
     194     */
    190195    function test_duplicate_event() {
    191         $this->knownWPBug(6966);
    192196        // duplicate events close together should be skipped
    193197        $hook = rand_str();
     
    205209    }
    206210
     211    /**
     212     * @ticket 6966
     213     */
    207214    function test_not_duplicate_event() {
    208         $this->knownWPBug(6966);
    209215        // duplicate events far apart should work normally
    210216        $hook = rand_str();
  • trunk/tests/test_db.php

    r804 r894  
    4444     * Test that floats formatted as "0,700" get sanitized properly by wpdb
    4545     * @global mixed $wpdb
     46     *
     47     * @ticket 19861
    4648     */
    4749    public function test_locale_floats() {
    4850        global $wpdb;
    49 
    50         $this->knownWPBug( 19861 );
    5151
    5252        // Save the current locale
  • trunk/tests/test_filters.php

    r828 r894  
    193193    }
    194194
     195    /**
     196     * @ticket 9886
     197     */
    195198    function test_filter_ref_array() {
    196         $this->knownWPBug(9886);
    197199        $obj = new stdClass();
    198200        $a = new MockAction();
     
    210212    }
    211213
     214    /**
     215     * @ticket 12723
     216     */
    212217    function test_filter_ref_array_result() {
    213         $this->knownWPBug(12723);
    214218        $obj = new stdClass();
    215219        $a = new MockAction();
  • trunk/tests/test_http.php

    r875 r894  
    5959    }
    6060
     61    /**
     62     * @ticket 16855
     63     */
    6164    function test_redirect_on_301_no_redirect() {
    62         $this->knownWPBug(16855);
    6365        // 5 > 0 & 301
    6466        $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) );
     
    6769    }
    6870
     71    /**
     72     * @ticket 16855
     73     */
    6974    function test_redirect_on_302_no_redirect() {
    70         $this->knownWPBug(16855);
    7175        // 5 > 0 & 302
    7276        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
     
    8993    }
    9094
     95    /**
     96     * @ticket 16855
     97     */
    9198    function test_redirect_on_head() {
    92         $this->knownWPBug(16855);
    9399        // Redirections on HEAD request when Requested
    94100        $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') );
     
    115121    }
    116122
     123    /**
     124     * @ticket 16855
     125     */
    117126    function test_redirections_zero_redirections_specified() {
    118         $this->knownWPBug(16855);
    119127        // 0 redirections asked for, Should return the document?
    120128        $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) );
     
    123131    }
    124132
     133    /**
     134     * Do not redirect on non 3xx status codes
     135     *
     136     * @ticket 16889
     137     *
     138     * Is this valid? Streams, cURL and therefore PHP Extension (ie. all PHP Internal) follow redirects
     139     * on all status codes, currently all of WP_HTTP follows this template.
     140     */
    125141    function test_location_header_on_200() {
    126         //$this->knownWPBug(16889);
    127         // Is this valid? Streams, cURL and therefor, PHP Extension (ie. all PHP Internal) follow redirects on all status codes, currently all of WP_HTTP follows this template.
    128 
    129         // Do not redirect on non 3xx status codes
    130         //$res = wp_remote_request( $this->redirection_script . '?200-location=true' ); // Prints PASS on initial load, FAIL if the client follows the specified redirection
    131         //$this->assertEquals( 'PASS', $res['body']);
    132     }
    133 
     142        // Prints PASS on initial load, FAIL if the client follows the specified redirection
     143        $res = wp_remote_request( $this->redirection_script . '?200-location=true' );
     144        $this->assertEquals( 'PASS', $res['body']);
     145    }
     146
     147    /**
     148     * @ticket 11888
     149     */
    134150    function test_send_headers() {
    135         $this->knownWPBug(11888);
    136151        // Test that the headers sent are recieved by the server
    137152        $headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
  • trunk/tests/test_image.php

    r877 r894  
    8383    }
    8484
     85    /**
     86     * @ticket 6571
     87     */
    8588    function test_exif_error() {
    86         $this->knownWPBug(6571);
    8789
    8890        // http://trac.wordpress.org/ticket/6571
     
    118120    }
    119121
     122    /**
     123     * @ticket 9417
     124     */
    120125    function test_utf8_iptc_tags() {
    121         $this->knownWPBug(9417);
    122126
    123127        // trilingual UTF-8 text in the ITPC caption-abstract field
  • trunk/tests/test_includes_balance_tags.php

    r883 r894  
    2828        }
    2929    }
    30 
    31     // If a recognized valid single tag appears unclosed, it should get self-closed
     30 
     31    /**
     32     * If a recognized valid single tag appears unclosed, it should get self-closed
     33     *
     34     * @ticket 1597
     35     */
    3236    function test_selfcloses_unclosed_known_single_tags() {
    33         $this->knownWPBug( 1597 );
    3437
    3538        foreach ( $this->single_tags as $tag ) {
     
    4750    }
    4851
    49     // If a recognized valid single tag is given a closing tag, the closing tag
    50     //   should get removed and tag should be self-closed.
     52    /**
     53     * If a recognized valid single tag is given a closing tag, the closing tag
     54     *   should get removed and tag should be self-closed.
     55     *
     56     * @ticket 1597
     57     */
    5158    function test_selfcloses_known_single_tags_having_closing_tag() {
    52         $this->knownWPBug( 1597 );
    5359
    5460        foreach ( $this->single_tags as $tag ) {
     
    5763    }
    5864
     65    /**
     66     * @ticket 1597
     67     */
    5968    function test_closes_unknown_single_tags_with_closing_tag() {
    60         $this->knownWPBug( 1597 );
    6169
    6270        $inputs = array(
     
    137145    }
    138146
     147    /**
     148     * @ticket 20401
     149     */
    139150    function test_allows_immediately_nested_object_tags() {
    140         $this->knownWPBug( 20401 );
    141151
    142152        $object = '<object id="obj1"><param name="param1"/><object id="obj2"><param name="param2"/></object></object>';
  • trunk/tests/test_includes_canonical.php

    r877 r894  
    103103    function test($test_url, $expected, $ticket = 0) {
    104104        if ( $ticket )
    105             $this->knownWPBug($ticket);
     105            $this->knownWPBug( $ticket );
    106106
    107107        $ticket_ref = ($ticket > 0) ? 'Ticket #' . $ticket : null;
  • trunk/tests/test_includes_capabilities.php

    r828 r894  
    216216    }
    217217
     218    /**
     219     * @ticket 20488
     220     */
    218221    function test_file_edit_caps_not_reliant_on_unfiltered_html_constant() {
    219         $this->knownWPBug(20488);
    220222        if ( defined( 'DISALLOW_FILE_MODS' ) || defined( 'DISALLOW_FILE_EDIT' ) )
    221223            $this->markTestSkipped('DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT is defined.');
  • trunk/tests/test_includes_class-wp-theme.php

    r883 r894  
    7171    }
    7272
     73    /**
     74     * @ticket 20313
     75     */
    7376    function test_new_WP_Theme_subdir_bad_root() {
    74         $this->knownWPBug( 20313 );
    7577        // This is what get_theme_data() does when you pass it a style.css file for a theme in a subdir.
    7678        $theme = new WP_Theme( 'theme2', $this->theme_root . '/subdir' );
  • trunk/tests/test_includes_feed_rss2.php

    r877 r894  
    7979    }
    8080
    81 
     81    /**
     82     * @ticket UT32
     83     */
    8284    function test_items() {
    83         $this->knownUTBug(32);
    8485        $this->go_to('/feed/');
    8586        $feed = $this->do_rss2();
  • 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 ) );
  • trunk/tests/test_includes_functions.php

    r877 r894  
    213213    }
    214214
     215    /**
     216     * @ticket 9930
     217     */
    215218    function test_is_serialized() {
    216         $this->knownWPBug(9930);
    217219        $cases = array(
    218220            serialize(null),
  • trunk/tests/test_includes_kses.php

    r877 r894  
    77 */
    88class Test_wp_filter_post_kses extends WP_UnitTestCase {
     9
     10    /**
     11     * @ticket 20210
     12     */
    913    function test_wp_filter_post_kses_address() {
    1014        global $allowedposttags;
    11 
    12         $this->knownWPBug( 20210 );
    1315
    1416        $attributes = array(
     
    2527    }
    2628
     29    /**
     30     * @ticket 20210
     31     */
    2732    function test_wp_filter_post_kses_a() {
    2833        global $allowedposttags;
    29 
    30         $this->knownWPBug( 20210 );
    3134
    3235        $attributes = array(
     
    4851    }
    4952
     53    /**
     54     * @ticket 20210
     55     */
    5056    function test_wp_filter_post_kses_abbr() {
    5157        global $allowedposttags;
    52 
    53         $this->knownWPBug( 20210 );
    5458
    5559        $attributes = array(
  • trunk/tests/test_includes_pluggable.php

    r828 r894  
    4747 * @group pluggable
    4848 * @group mail
     49 * @ticket UT47
    4950 */
    5051class TestMailFunctions extends WP_UnitTestCase {
    5152    function setUp() {
    5253        parent::setUp();
    53         $this->knownUTBug( 47 );
    5454    }
    5555
     
    113113    }
    114114
     115    /**
     116     * @ticket 15448
     117     */
    115118    function test_wp_mail_plain_and_html() {
    116         $this->knownWPBug(15448);
    117119
    118120        $to = 'user@example.com';
     
    149151    }
    150152
     153    /**
     154     * @ticket 17305
     155     */
    151156    function test_wp_mail_rfc2822_addresses() {
    152         $this->knownWPBug(17305);
    153157
    154158        $to = "Name <address@tld.com>";
     
    185189    }
    186190
     191    /**
     192     * @ticket 17305
     193     */
    187194    function test_wp_mail_multiple_rfc2822_to_addresses() {
    188         $this->knownWPBug(17305);
    189195
    190196        $to = "Name <address@tld.com>, Another Name <another_address@different-tld.com>";
     
    227233    }
    228234
     235    /**
     236     * @ticket 18463
     237     */
    229238    function test_wp_mail_to_address_no_name() {
    230         $this->knownWPBug( 18463 );
    231239
    232240        $to = "<address@tld.com>";
     
    268276 */
    269277class TestUserFunction extends WP_UnitTestCase {
    270     // #13317
     278    /**
     279     * @ticket 13317
     280     */
    271281    function test_get_userdata() {
    272282        $id = $this->factory->user->create( array( 'role' => 'administrator' ) );
  • trunk/tests/test_includes_post.php

    r877 r894  
    382382    }
    383383
     384    /**
     385     * @ticket 5364
     386     */
    384387    function test_delete_future_post_cron() {
    385         // http://trac.wordpress.org/ticket/5364
    386388        // "When I delete a future post using wp_delete_post($post->ID) it does not update the cron correctly."
    387 
    388         #$this->knownWPBug(5364);
    389 
    390389        $future_date = strtotime('+1 day');
    391390
     
    410409    }
    411410
    412     function test_permlink_without_title() {
     411    function test_permalink_without_title() {
    413412        // bug: permalink doesn't work if post title is empty
    414413        // wpcom #663, also http://trac.wordpress.org/ticket/5305
     
    436435    }
    437436
    438     function test_attachment_url() {
    439     }
    440 
     437    /**
     438     * @ticket 21013
     439     */
    441440    function test_wp_unique_post_slug_with_non_latin_slugs() {
    442         $this->knownWPBug(21013);
    443 
    444441        $inputs = array(
    445442            'Αρνάκι άσπρο και παχύ της μάνας του καμάρι, και άλλα τραγούδια',
     
    896893    }
    897894
     895    /**
     896     * @ticket 12860
     897     */
    898898    function test_funky_post_meta() {
    899         $this->knownWPBug(12860);
    900 
    901899        $classy = new StdClass();
    902900        $classy->ID = 1;
     
    922920 */
    923921class WPTestPostTypes extends WP_UnitTestCase {
    924     function setUp() {
    925         parent::setUp();
    926     }
    927 
    928     function tearDown() {
    929         parent::tearDown();
    930     }
    931 
    932922    function test_register_post_type() {
    933923        $this->assertNull( get_post_type_object( 'foo' ) );
  • trunk/tests/test_includes_taxonomy.php

    r860 r894  
    1313    }
    1414
     15    /**
     16     * @ticket 5417
     17     */
    1518    function test_get_unknown_taxonomies() {
    1619        // taxonomies for an unknown object type
    17         $this->knownWPBug(5417);
    1820        $this->assertEquals( array(), get_object_taxonomies(rand_str()) );
    1921        $this->assertEquals( array(), get_object_taxonomies('') );
     
    156158    }
    157159
     160    /**
     161     * @ticket 5381
     162     */
    158163    function test_is_term_type() {
    159164        // insert a term
    160         $this->knownWPBug(5381);
    161165        $term = rand_str();
    162166        $t = wp_insert_term( $term, $this->taxonomy );
  • trunk/tests/test_includes_theme.php

    r828 r894  
    133133    }
    134134
     135    /**
     136     * @ticket 20897
     137     */
    135138    function test_extra_theme_headers() {
    136         $this->knownWPBug( 20897 );
    137139        $wp_theme = wp_get_theme( $this->theme_slug );
    138140        $this->assertNotEmpty( $wp_theme->get('License') );
     
    498500    }
    499501
    500     // #11214 looked at how we can reduce the in-memory size even more
     502    /**
     503     * @ticket 11214 looked at how we can reduce the in-memory size even more
     504     */
    501505    function test_smaller_storage() {
    502         $this->knownWPBug(11214);
    503506        $themes = get_themes();
    504507        $this->_filter_out_themes_not_in_root( $themes );
  • trunk/tests/test_includes_wp-scripts.php

    r828 r894  
    2222    }
    2323
    24     // Test versioning
     24    /**
     25     * Test versioning
     26     * @ticket 11315
     27     */
    2528    function test_wp_enqueue_script() {
    26         $this->knownWPBug(11315);
    2729        wp_enqueue_script('no-deps-no-version', 'example.com', array());
    2830        wp_enqueue_script('empty-deps-no-version', 'example.com' );
     
    4446     * Test the different protocol references in wp_enqueue_script
    4547     * @global WP_Scripts $wp_scripts
     48     * @ticket 16560 Protocol-relative references
    4649     */
    4750    public function test_protocols() {
    48         $this->knownWPBug( 16560 );
    49 
    5051        // Init
    5152        global $wp_scripts;
  • trunk/tests/test_includes_wp-styles.php

    r828 r894  
    2121    }
    2222
    23     // Test versioning #11315
     23    /**
     24     * Test versioning
     25     * @ticket 11315
     26     */
    2427    function test_wp_enqueue_style() {
    2528        wp_enqueue_style('no-deps-no-version', 'example.com' );
     
    4245     * Test the different protocol references in wp_enqueue_style
    4346     * @global WP_Styles $wp_styles
     47     * @ticket 16560 Protocol-relative references
    4448     */
    4549    public function test_protocols() {
    46         $this->knownWPBug( 16560 );
    47 
    4850        // Init
    4951        global $wp_styles;
  • trunk/tests/test_ms.php

    r844 r894  
    242242    }
    243243
     244    /**
     245     * @ticket 18119
     246     */
    244247    function test_upload_is_user_over_quota() {
    245         $this->knownWPBug( 18119 );
    246 
    247248        $default_space_allowed = 50;
    248249        $echo = false;
  • trunk/tests/test_post_filtering.php

    r877 r894  
    7171    }
    7272
    73     // test kses bug. xhtml does not require space before closing
    74     // empty element
     73    /**
     74     * test kses bug. xhtml does not require space before closing empty element
     75     * @ticket 12394
     76     */
    7577    function test_post_content_xhtml_empty_elem() {
    76         $this->knownWPBug( 12394 );
    7778        $content = <<<EOF
    7879<img src='foo' width='500' height='300'/>
     
    8990    }
    9091
    91     // make sure unbalanced tags are fixed when they span a --more-- tag
     92    /**
     93     * make sure unbalanced tags are fixed when they span a --more-- tag
     94     * @ticket 6297
     95     */
    9296    function test_post_content_unbalanced_more() {
    93         $this->knownWPBug(6297);
    94 
    9597        $content = <<<EOF
    9698<em>some text<!--more-->
     
    109111    }
    110112
    111     // make sure unbalanced tags are fixed when they span a --nextpage-- tag
     113    /**
     114     * make sure unbalanced tags are fixed when they span a --nextpage-- tag
     115     * @ticket 6297
     116     */
    112117    function test_post_content_unbalanced_nextpage() {
    113         $this->knownWPBug(6297);
    114 
    115118        $content = <<<EOF
    116119<em>some text<!--nextpage-->
     
    129132    }
    130133
    131     // make sure unbalanced tags are fixed when they span both --more-- and --nextpage-- tags (in that order)
     134    /**
     135     * make sure unbalanced tags are fixed when they span both --more-- and --nextpage-- tags (in that order)
     136     * @ticket 6297
     137     */
    132138    function test_post_content_unbalanced_more_nextpage() {
    133         $this->knownWPBug(6297);
    134 
    135139        $content = <<<EOF
    136140<em>some text<!--more-->
     
    157161    }
    158162
    159     // make sure unbalanced tags are fixed when they span both --nextpage-- and --more-- tags (in that order)
     163    /**
     164     * make sure unbalanced tags are fixed when they span both --nextpage-- and --more-- tags (in that order)
     165     * @ticket 6297
     166     */
    160167    function test_post_content_unbalanced_nextpage_more() {
    161         $this->knownWPBug(6297);
    162 
    163168        $content = <<<EOF
    164169<em>some text<!--nextpage-->
  • trunk/tests/test_query.php

    r871 r894  
    358358    }
    359359
     360    /**
     361     * @ticket 13961
     362     */
    360363    function test_search_encoded_chars() {
    361         $this->knownWPBug(13961);
    362364        $this->go_to('/search/F%C3%BCnf%2Bbar/');
    363365        $this->assertEquals( get_query_var( 's' ), 'Fünf+bar' );
  • trunk/tests/test_query_results.php

    r879 r894  
    259259    }
    260260
     261    /**
     262     * @ticket 18897
     263     */
    261264    function test_query_offset_and_paged() {
    262         $this->knownWPBug(18897);
    263 
    264265        $posts = $this->q->query('paged=2&offset=3');
    265266
  • trunk/tests/test_uploads.php

    r828 r894  
    1212    function setUp() {
    1313        if ( is_multisite() )
    14             $this->knownUTBug(35);
     14            $this->knownUTBug( 35 );
    1515
    1616        parent::setUp();
     
    5151    }
    5252
     53    /**
     54     * @ticket 5953
     55     */
    5356    function test_upload_dir_absolute() {
    54         $this->knownWPBug(5953);
    5557        // wp_upload_dir() with an absolute upload path
    5658        update_option( 'upload_path', '/tmp' );
  • trunk/tests/test_user.php

    r865 r894  
    163163    /**
    164164     * Test the magic __unset method
    165      * @return void
     165     *
     166     * @ticket 20043
    166167     */
    167168    public function test_user_unset() {
    168         $this->knownWPBug( 20043 );
    169        
    170169        // New user
    171170        $user_id = $this->factory->user->create( array( 'role' => 'author' ) );
     
    336335    }
    337336
     337    /**
     338     * @ticket 19500 Usermeta cache is not cleared after user deletion
     339     */
    338340    function test_get_blogs_of_user() {
    339         // Usermeta cache is not cleared after user deletion.
    340         $this->knownWPBug(19500);
    341 
    342341        // Logged out users don't have blogs.
    343342        $this->assertEquals( array(), get_blogs_of_user( 0 ) );
     
    355354    }
    356355
     356    /**
     357     * @ticket 19500 Usermeta cache is not cleared after user deletion
     358     */
    357359    function test_is_user_member_of_blog() {
    358         // Usermeta cache is not cleared after user deletion.
    359         $this->knownWPBug(19500);
    360 
    361360        $old_current = get_current_user_id();
    362361
  • trunk/tests/test_user_capabilities.php

    r828 r894  
    539539        $this->assertFalse($contributor->has_cap('delete_page', $page));
    540540    }
    541 
    542     function test_usermeta_caps() {
    543 
    544         $this->knownWPBug(5541);
    545 
    546         // make sure an old style usermeta capabilities entry is still recognized by the new code
    547 
    548         $id = $this->factory->user->create( array( 'role' => 'author' ) );
    549         $user = new WP_User($id);
    550         $this->assertTrue($user->exists(), "Problem getting user $id");
    551 
    552         global $wpdb;
    553         if (!empty($wpdb->user_role))
    554             $wpdb->query("DELETE FROM {$wpdb->user_role} WHERE user_id = {$id}");
    555 
    556         update_usermeta($id, $user->cap_key, array('editor' => true));
    557 
    558         $user = new WP_User($id);
    559         $this->assertTrue($user->exists(), "Problem getting user $id");
    560 
    561         // check a few of the main capabilities
    562         $this->assertEquals(array('editor'), $user->roles);
    563         $this->assertTrue($user->has_cap('moderate_comments'));
    564         $this->assertTrue($user->has_cap('manage_categories'));
    565         $this->assertTrue($user->has_cap('upload_files'));
    566         $this->assertTrue($user->has_cap('level_7'));
    567 
    568         // and a few capabilities this user doesn't have
    569         $this->assertFalse($user->has_cap('switch_themes'));
    570         $this->assertFalse($user->has_cap('edit_users'));
    571         $this->assertFalse($user->has_cap('level_8'));
    572     }
    573 
    574     function _test_generate_role_thingy() {
    575         global $wp_roles;
    576         foreach (array_keys($wp_roles->roles) as $role) {
    577             $obj = $wp_roles->role_objects[$role];
    578 
    579             echo "\nadd_role('{$role}', '{$obj->name}', ".var_export($obj->capabilities, true)."\n";
    580             echo ")\n";
    581         }
    582     }
    583541}
Note: See TracChangeset for help on using the changeset viewer.