Changeset 894 in tests
- Timestamp:
- 07/09/2012 03:32:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/testcase.php
r893 r894 125 125 $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName() ); 126 126 foreach ( $tickets as $ticket ) { 127 $annotation = explode( ' ', $ticket, 2 ); 128 $ticket = $annotation[0]; 129 $message = isset( $annotation[1] ) ? $annotation[1] : ''; 130 127 131 if ( is_numeric( $ticket ) ) { 128 $this->knownWPBug( $ticket );132 $this->knownWPBug( $ticket, $message ); 129 133 } elseif ( 'UT' == substr( $ticket, 0, 2 ) ) { 130 $this->knownUTBug( substr( $ticket, 2 ) );134 $this->knownUTBug( substr( $ticket, 2 ), $message ); 131 135 } 132 136 } … … 136 140 * Skips the current test if there is an open WordPress ticket with id $ticket_id 137 141 */ 138 function knownWPBug( $ticket_id ) {142 function knownWPBug( $ticket_id, $message = '' ) { 139 143 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 ); 141 145 } 142 146 } … … 145 149 * Skips the current test if there is an open unit tests ticket with id $ticket_id 146 150 */ 147 function knownUTBug( $ticket_id ) {151 function knownUTBug( $ticket_id, $message = '' ) { 148 152 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 ); 150 154 } 151 155 } … … 154 158 * Skips the current test if there is an open plugin ticket with id $ticket_id 155 159 */ 156 function knownPluginBug( $ticket_id ) {160 function knownPluginBug( $ticket_id, $message = '' ) { 157 161 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 ); 159 163 } 160 164 } -
trunk/tests/test-xmlrpc-api/test_mw_getPost.php
r883 r894 38 38 } 39 39 40 /** 41 * @ticket 20336 42 */ 40 43 function test_invalid_postid() { 41 $this->knownWPBug(20336);42 43 44 $result = $this->myxmlrpcserver->mw_getPost( array( 9999, 'author', 'author' ) ); 44 45 $this->assertInstanceOf( 'IXR_Error', $result ); -
trunk/tests/test-xmlrpc-api/test_mw_newPost.php
r771 r894 86 86 } 87 87 88 /** 89 * @ticket 20356 90 */ 88 91 function test_invalid_author() { 89 $this->knownWPBug( 20356 );90 92 $this->make_user_by_role( 'editor' ); 91 93 -
trunk/tests/test-xmlrpc-api/test_wp_getOptions.php
r771 r894 30 30 } 31 31 32 /** 33 * @ticket 20201 34 */ 32 35 function test_option_values_subscriber() { 33 36 global $wp_version; 34 35 $this->knownWPBug( 20201 );36 37 37 $this->make_user_by_role( 'subscriber' ); 38 38 -
trunk/tests/test-xmlrpc-api/test_wp_getPage.php
r883 r894 36 36 } 37 37 38 /** 39 * @ticket 20336 40 */ 38 41 function test_invalid_pageid() { 39 $this->knownWPBug(20336);40 41 42 $this->make_user_by_role( 'editor' ); 42 43 -
trunk/tests/test-xmlrpc-api/test_wp_getPages.php
r883 r894 60 60 } 61 61 62 function test_semi_capable_user() { 63 $this->knownWPBug( 20629 ); 64 62 /** 63 * @ticket 20629 64 */ 65 function test_semi_capable_user() { 65 66 add_filter( 'map_meta_cap', array( $this, 'remove_editor_edit_page_cap') , 10, 4 ); 66 67 -
trunk/tests/test-xmlrpc-api/test_wp_getPosts.php
r883 r894 12 12 } 13 13 14 /** 15 * @ticket 20991 16 */ 14 17 function test_incapable_user() { 15 $this->knownWPBug( 20991 );16 17 18 $this->make_user_by_role( 'subscriber' ); 18 19 -
trunk/tests/test_actions.php
r892 r894 218 218 } 219 219 220 /** 221 * @ticket 11241 222 */ 220 223 function test_action_keyed_array() { 221 $this->knownWPBug(11241);222 224 $a = new MockAction(); 223 225 -
trunk/tests/test_actions_closures.php
r883 r894 8 8 class WP_Test_Actions_Closures extends WP_UnitTestCase { 9 9 10 /** 11 * @ticket 10493 12 */ 10 13 function test_action_closure() { 11 $this->knownWPBug(10493);12 13 14 $tag = rand_str(); 14 15 $closure = function($a, $b) { $GLOBALS[$a] = $b;}; -
trunk/tests/test_admin_includes_theme.php
r828 r894 36 36 } 37 37 38 /** 39 * @ticket 10959 40 * @ticket 11216 41 */ 38 42 function test_page_templates() { 39 $this->knownWPBug(10959);40 $this->knownWPBug(11216);41 43 $theme = get_theme('Page Template Theme'); 42 44 $this->assertFalse( empty($theme) ); -
trunk/tests/test_cron.php
r828 r894 151 151 } 152 152 153 /** 154 * @ticket 10468 155 */ 153 156 function test_clear_schedule_new_args() { 154 $this->knownWPBug(10468);155 157 $hook = rand_str(); 156 158 $args = array(rand_str()); … … 188 190 } 189 191 192 /** 193 * @ticket 6966 194 */ 190 195 function test_duplicate_event() { 191 $this->knownWPBug(6966);192 196 // duplicate events close together should be skipped 193 197 $hook = rand_str(); … … 205 209 } 206 210 211 /** 212 * @ticket 6966 213 */ 207 214 function test_not_duplicate_event() { 208 $this->knownWPBug(6966);209 215 // duplicate events far apart should work normally 210 216 $hook = rand_str(); -
trunk/tests/test_db.php
r804 r894 44 44 * Test that floats formatted as "0,700" get sanitized properly by wpdb 45 45 * @global mixed $wpdb 46 * 47 * @ticket 19861 46 48 */ 47 49 public function test_locale_floats() { 48 50 global $wpdb; 49 50 $this->knownWPBug( 19861 );51 51 52 52 // Save the current locale -
trunk/tests/test_filters.php
r828 r894 193 193 } 194 194 195 /** 196 * @ticket 9886 197 */ 195 198 function test_filter_ref_array() { 196 $this->knownWPBug(9886);197 199 $obj = new stdClass(); 198 200 $a = new MockAction(); … … 210 212 } 211 213 214 /** 215 * @ticket 12723 216 */ 212 217 function test_filter_ref_array_result() { 213 $this->knownWPBug(12723);214 218 $obj = new stdClass(); 215 219 $a = new MockAction(); -
trunk/tests/test_http.php
r875 r894 59 59 } 60 60 61 /** 62 * @ticket 16855 63 */ 61 64 function test_redirect_on_301_no_redirect() { 62 $this->knownWPBug(16855);63 65 // 5 > 0 & 301 64 66 $res = wp_remote_request($this->redirection_script . '?code=301&rt=' . 5, array('redirection' => 0) ); … … 67 69 } 68 70 71 /** 72 * @ticket 16855 73 */ 69 74 function test_redirect_on_302_no_redirect() { 70 $this->knownWPBug(16855);71 75 // 5 > 0 & 302 72 76 $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); … … 89 93 } 90 94 95 /** 96 * @ticket 16855 97 */ 91 98 function test_redirect_on_head() { 92 $this->knownWPBug(16855);93 99 // Redirections on HEAD request when Requested 94 100 $res = wp_remote_request($this->redirection_script . '?rt=' . 5, array('redirection' => 5, 'method' => 'HEAD') ); … … 115 121 } 116 122 123 /** 124 * @ticket 16855 125 */ 117 126 function test_redirections_zero_redirections_specified() { 118 $this->knownWPBug(16855);119 127 // 0 redirections asked for, Should return the document? 120 128 $res = wp_remote_request($this->redirection_script . '?code=302&rt=' . 5, array('redirection' => 0) ); … … 123 131 } 124 132 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 */ 125 141 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 codes130 //$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 */ 134 150 function test_send_headers() { 135 $this->knownWPBug(11888);136 151 // Test that the headers sent are recieved by the server 137 152 $headers = array('test1' => 'test', 'test2' => 0, 'test3' => ''); -
trunk/tests/test_image.php
r877 r894 83 83 } 84 84 85 /** 86 * @ticket 6571 87 */ 85 88 function test_exif_error() { 86 $this->knownWPBug(6571);87 89 88 90 // http://trac.wordpress.org/ticket/6571 … … 118 120 } 119 121 122 /** 123 * @ticket 9417 124 */ 120 125 function test_utf8_iptc_tags() { 121 $this->knownWPBug(9417);122 126 123 127 // trilingual UTF-8 text in the ITPC caption-abstract field -
trunk/tests/test_includes_balance_tags.php
r883 r894 28 28 } 29 29 } 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 */ 32 36 function test_selfcloses_unclosed_known_single_tags() { 33 $this->knownWPBug( 1597 );34 37 35 38 foreach ( $this->single_tags as $tag ) { … … 47 50 } 48 51 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 */ 51 58 function test_selfcloses_known_single_tags_having_closing_tag() { 52 $this->knownWPBug( 1597 );53 59 54 60 foreach ( $this->single_tags as $tag ) { … … 57 63 } 58 64 65 /** 66 * @ticket 1597 67 */ 59 68 function test_closes_unknown_single_tags_with_closing_tag() { 60 $this->knownWPBug( 1597 );61 69 62 70 $inputs = array( … … 137 145 } 138 146 147 /** 148 * @ticket 20401 149 */ 139 150 function test_allows_immediately_nested_object_tags() { 140 $this->knownWPBug( 20401 );141 151 142 152 $object = '<object id="obj1"><param name="param1"/><object id="obj2"><param name="param2"/></object></object>'; -
trunk/tests/test_includes_canonical.php
r877 r894 103 103 function test($test_url, $expected, $ticket = 0) { 104 104 if ( $ticket ) 105 $this->knownWPBug( $ticket);105 $this->knownWPBug( $ticket ); 106 106 107 107 $ticket_ref = ($ticket > 0) ? 'Ticket #' . $ticket : null; -
trunk/tests/test_includes_capabilities.php
r828 r894 216 216 } 217 217 218 /** 219 * @ticket 20488 220 */ 218 221 function test_file_edit_caps_not_reliant_on_unfiltered_html_constant() { 219 $this->knownWPBug(20488);220 222 if ( defined( 'DISALLOW_FILE_MODS' ) || defined( 'DISALLOW_FILE_EDIT' ) ) 221 223 $this->markTestSkipped('DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT is defined.'); -
trunk/tests/test_includes_class-wp-theme.php
r883 r894 71 71 } 72 72 73 /** 74 * @ticket 20313 75 */ 73 76 function test_new_WP_Theme_subdir_bad_root() { 74 $this->knownWPBug( 20313 );75 77 // This is what get_theme_data() does when you pass it a style.css file for a theme in a subdir. 76 78 $theme = new WP_Theme( 'theme2', $this->theme_root . '/subdir' ); -
trunk/tests/test_includes_feed_rss2.php
r877 r894 79 79 } 80 80 81 81 /** 82 * @ticket UT32 83 */ 82 84 function test_items() { 83 $this->knownUTBug(32);84 85 $this->go_to('/feed/'); 85 86 $feed = $this->do_rss2(); -
trunk/tests/test_includes_formatting.php
r865 r894 289 289 } 290 290 291 /** 292 * @ticket 16892 293 */ 291 294 function test_click_inside_html() { 292 $this->knownWPBug( 16892 );293 295 $urls_before = array( 294 296 '<span>http://example.com</span>', … … 327 329 } 328 330 331 /** 332 * @ticket 16859 333 */ 329 334 function test_square_brackets() { 330 $this->knownWPBug( 16859 );331 335 $urls_before = array( 332 336 'http://example.com/?foo[bar]=baz', … … 505 509 } 506 510 507 //WP Tickets #4539, #15241 511 /** 512 * @ticket 4539 513 * @ticket 15241 514 */ 508 515 function test_full_sentences_with_unmatched_single_quotes() { 509 516 $this->assertEquals( … … 513 520 } 514 521 515 //WP Ticket #4539 522 /** 523 * @ticket 4539 524 */ 516 525 function test_quotes() { 517 $this->knownWPBug(4539);518 526 $this->assertEquals('“Quoted String”', wptexturize('"Quoted String"')); 519 527 $this->assertEquals('Here is “<a href="http://example.com">a test with a link</a>”', wptexturize('Here is "<a href="http://example.com">a test with a link</a>"')); … … 531 539 } 532 540 533 //WP Ticket #4539 541 /** 542 * @ticket 4539 543 */ 534 544 function test_quotes_before_s() { 535 $this->knownWPBug(4539);536 545 $this->assertEquals('test’s', wptexturize("test's")); 537 546 $this->assertEquals('‘test’s', wptexturize("'test's")); … … 541 550 } 542 551 543 //WP Ticket #4539 552 /** 553 * @ticket 4539 554 */ 544 555 function test_quotes_before_numbers() { 545 $this->knownWPBug(4539);546 556 $this->assertEquals('Class of ’99', wptexturize("Class of '99")); 547 557 $this->assertEquals('Class of ’99’s', wptexturize("Class of '99's")); … … 557 567 } 558 568 559 //WP Ticket #15241 and #4539 569 /** 570 * @ticket 4539 571 * @ticket 15241 572 */ 560 573 function test_other_html() { 561 $this->knownWPBug(4539);562 574 $this->assertEquals('‘<strong>', wptexturize("'<strong>")); 563 575 $this->assertEquals('‘<strong>Quoted Text</strong>’,', wptexturize("'<strong>Quoted Text</strong>',")); … … 580 592 } 581 593 594 /** 595 * @ticket 8775 596 */ 582 597 function test_wptexturize_quotes_around_numbers() { 583 $this->knownWPBug(8775);584 598 $this->assertEquals('“12345”', wptexturize('"12345"')); 585 599 $this->assertEquals('‘12345’', wptexturize('\'12345\'')); … … 588 602 } 589 603 604 /** 605 * @ticket 8912 606 */ 590 607 function test_wptexturize_html_comments() { 591 $this->knownWPBug(8912);592 608 $this->assertEquals('<!--[if !IE]>--><!--<![endif]-->', wptexturize('<!--[if !IE]>--><!--<![endif]-->')); 593 609 $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]-->')); … … 595 611 } 596 612 597 //WP Ticket #15241 and #4539 613 /** 614 * @ticket 4539 615 * @ticket 15241 616 */ 598 617 function test_entity_quote_cuddling() { 599 $this->knownWPBug(4539);600 618 $this->assertEquals(' “Testing”', wptexturize(' "Testing"')); 601 619 $this->assertEquals('&“Testing”', wptexturize('&"Testing"')); … … 657 675 } 658 676 677 /** 678 * @ticket 16859 679 */ 659 680 function test_square_brackets() { 660 $this->knownWPBug( 16859 );661 681 $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) ); 662 682 $this->assertEquals( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) ); … … 732 752 /** 733 753 * wpautop() Should not alter the contents of "<pre>" elements 734 * @link http://core.trac.wordpress.org/ticket/19855735 * @ return void754 * 755 * @ticket 19855 736 756 */ 737 757 public function test_skip_pre_elements() { 738 $this->knownWPBug( 19855 );739 758 $code = file_get_contents( DIR_TESTDATA . '/formatting/sizzle.js' ); 740 759 $code = str_replace( "\r", '', $code ); … … 760 779 /** 761 780 * wpautop() Should not add <br/> to "<input>" elements 762 * @link http://core.trac.wordpress.org/ticket/16456763 * @ return void781 * 782 * @ticket 16456 764 783 */ 765 784 public function test_skip_input_elements() { 766 $this->knownWPBug( 16456 );767 785 $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />'; 768 786 $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); … … 774 792 */ 775 793 class TestLikeEscape extends WP_UnitTestCase { 794 /** 795 * @ticket 10041 796 */ 776 797 function test_like_escape() { 777 $this->knownWPBug(10041);778 798 779 799 $inputs = array( … … 1032 1052 $this->assertEquals($expected, sanitize_user($input)); 1033 1053 } 1054 /** 1055 * @ticket 10823 1056 */ 1034 1057 function test_strips_entities() { 1035 $this->knownWPBug( 10823 );1036 1058 $this->assertEquals("ATT", sanitize_user("AT&T")); 1037 1059 $this->assertEquals("ATT Test;", sanitize_user("AT&T Test;")); … … 1129 1151 } 1130 1152 1153 /** 1154 * @ticket 10823 1155 */ 1131 1156 function test_strips_entities() { 1132 $this->knownWPBug( 10823 );1133 1157 $this->assertEquals("no-entities-here", sanitize_title_with_dashes("No Entities – Here &")); 1134 1158 $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two", '', 'save')); … … 1175 1199 } 1176 1200 1201 /** 1202 * @ticket 19820 1203 */ 1177 1204 function test_replaces_multiply_sign() { 1178 $this->knownWPBug(19820);1179 1205 $this->assertEquals("6x7-is-42", sanitize_title_with_dashes("6×7 is 42", '', 'save')); 1180 1206 } 1181 1207 1208 /** 1209 * @ticket 20772 1210 */ 1182 1211 function test_replaces_standalone_diacritic() { 1183 $this->knownWPBug(20772);1184 1212 $this->assertEquals("aaaa", sanitize_title_with_dashes("āáǎà", '', 'save')); 1185 1213 } … … 1197 1225 } 1198 1226 1227 /** 1228 * @ticket 20503 1229 */ 1199 1230 function test_replaces_latin_letter_z_with_caron() { 1200 $this->knownWPBug(20503);1201 1231 $input = "Žž"; 1202 1232 $output = "Žž"; … … 1445 1475 } 1446 1476 1477 /** 1478 * @ticket 9591 1479 */ 1447 1480 public function test_remove_accents_latin1_supplement() { 1448 $this->knownWPBug(9591);1449 1450 1481 $input = 'ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'; 1451 1482 $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; … … 1480 1511 } 1481 1512 1513 /** 1514 * @ticket 17738 1515 */ 1482 1516 public function test_remove_accents_vowels_diacritic() { 1483 $this->knownWPBug(17738);1484 1485 1517 // Vowels with diacritic 1486 1518 // unmarked … … 1498 1530 } 1499 1531 1532 /** 1533 * @ticket 20772 1534 */ 1500 1535 public function test_remove_accents_hanyu_pinyin() { 1501 $this->knownWPBug(20772);1502 1503 1536 // Vowels with diacritic (Chinese, Hanyu Pinyin) 1504 1537 // macron … … 1519 1552 */ 1520 1553 class TestStripSlashesDeep extends WP_UnitTestCase { 1554 /** 1555 * @ticket 18026 1556 */ 1521 1557 function test_preserves_original_datatype() { 1522 $this->knownWPBug(18026);1523 1558 1524 1559 $this->assertEquals( true, stripslashes_deep( true ) ); -
trunk/tests/test_includes_functions.php
r877 r894 213 213 } 214 214 215 /** 216 * @ticket 9930 217 */ 215 218 function test_is_serialized() { 216 $this->knownWPBug(9930);217 219 $cases = array( 218 220 serialize(null), -
trunk/tests/test_includes_kses.php
r877 r894 7 7 */ 8 8 class Test_wp_filter_post_kses extends WP_UnitTestCase { 9 10 /** 11 * @ticket 20210 12 */ 9 13 function test_wp_filter_post_kses_address() { 10 14 global $allowedposttags; 11 12 $this->knownWPBug( 20210 );13 15 14 16 $attributes = array( … … 25 27 } 26 28 29 /** 30 * @ticket 20210 31 */ 27 32 function test_wp_filter_post_kses_a() { 28 33 global $allowedposttags; 29 30 $this->knownWPBug( 20210 );31 34 32 35 $attributes = array( … … 48 51 } 49 52 53 /** 54 * @ticket 20210 55 */ 50 56 function test_wp_filter_post_kses_abbr() { 51 57 global $allowedposttags; 52 53 $this->knownWPBug( 20210 );54 58 55 59 $attributes = array( -
trunk/tests/test_includes_pluggable.php
r828 r894 47 47 * @group pluggable 48 48 * @group mail 49 * @ticket UT47 49 50 */ 50 51 class TestMailFunctions extends WP_UnitTestCase { 51 52 function setUp() { 52 53 parent::setUp(); 53 $this->knownUTBug( 47 );54 54 } 55 55 … … 113 113 } 114 114 115 /** 116 * @ticket 15448 117 */ 115 118 function test_wp_mail_plain_and_html() { 116 $this->knownWPBug(15448);117 119 118 120 $to = 'user@example.com'; … … 149 151 } 150 152 153 /** 154 * @ticket 17305 155 */ 151 156 function test_wp_mail_rfc2822_addresses() { 152 $this->knownWPBug(17305);153 157 154 158 $to = "Name <address@tld.com>"; … … 185 189 } 186 190 191 /** 192 * @ticket 17305 193 */ 187 194 function test_wp_mail_multiple_rfc2822_to_addresses() { 188 $this->knownWPBug(17305);189 195 190 196 $to = "Name <address@tld.com>, Another Name <another_address@different-tld.com>"; … … 227 233 } 228 234 235 /** 236 * @ticket 18463 237 */ 229 238 function test_wp_mail_to_address_no_name() { 230 $this->knownWPBug( 18463 );231 239 232 240 $to = "<address@tld.com>"; … … 268 276 */ 269 277 class TestUserFunction extends WP_UnitTestCase { 270 // #13317 278 /** 279 * @ticket 13317 280 */ 271 281 function test_get_userdata() { 272 282 $id = $this->factory->user->create( array( 'role' => 'administrator' ) ); -
trunk/tests/test_includes_post.php
r877 r894 382 382 } 383 383 384 /** 385 * @ticket 5364 386 */ 384 387 function test_delete_future_post_cron() { 385 // http://trac.wordpress.org/ticket/5364386 388 // "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 390 389 $future_date = strtotime('+1 day'); 391 390 … … 410 409 } 411 410 412 function test_perm link_without_title() {411 function test_permalink_without_title() { 413 412 // bug: permalink doesn't work if post title is empty 414 413 // wpcom #663, also http://trac.wordpress.org/ticket/5305 … … 436 435 } 437 436 438 function test_attachment_url() {439 }440 437 /** 438 * @ticket 21013 439 */ 441 440 function test_wp_unique_post_slug_with_non_latin_slugs() { 442 $this->knownWPBug(21013);443 444 441 $inputs = array( 445 442 'Αρνάκι άσπρο και παχύ της μάνας του καμάρι, και άλλα τραγούδια', … … 896 893 } 897 894 895 /** 896 * @ticket 12860 897 */ 898 898 function test_funky_post_meta() { 899 $this->knownWPBug(12860);900 901 899 $classy = new StdClass(); 902 900 $classy->ID = 1; … … 922 920 */ 923 921 class WPTestPostTypes extends WP_UnitTestCase { 924 function setUp() {925 parent::setUp();926 }927 928 function tearDown() {929 parent::tearDown();930 }931 932 922 function test_register_post_type() { 933 923 $this->assertNull( get_post_type_object( 'foo' ) ); -
trunk/tests/test_includes_taxonomy.php
r860 r894 13 13 } 14 14 15 /** 16 * @ticket 5417 17 */ 15 18 function test_get_unknown_taxonomies() { 16 19 // taxonomies for an unknown object type 17 $this->knownWPBug(5417);18 20 $this->assertEquals( array(), get_object_taxonomies(rand_str()) ); 19 21 $this->assertEquals( array(), get_object_taxonomies('') ); … … 156 158 } 157 159 160 /** 161 * @ticket 5381 162 */ 158 163 function test_is_term_type() { 159 164 // insert a term 160 $this->knownWPBug(5381);161 165 $term = rand_str(); 162 166 $t = wp_insert_term( $term, $this->taxonomy ); -
trunk/tests/test_includes_theme.php
r828 r894 133 133 } 134 134 135 /** 136 * @ticket 20897 137 */ 135 138 function test_extra_theme_headers() { 136 $this->knownWPBug( 20897 );137 139 $wp_theme = wp_get_theme( $this->theme_slug ); 138 140 $this->assertNotEmpty( $wp_theme->get('License') ); … … 498 500 } 499 501 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 */ 501 505 function test_smaller_storage() { 502 $this->knownWPBug(11214);503 506 $themes = get_themes(); 504 507 $this->_filter_out_themes_not_in_root( $themes ); -
trunk/tests/test_includes_wp-scripts.php
r828 r894 22 22 } 23 23 24 // Test versioning 24 /** 25 * Test versioning 26 * @ticket 11315 27 */ 25 28 function test_wp_enqueue_script() { 26 $this->knownWPBug(11315);27 29 wp_enqueue_script('no-deps-no-version', 'example.com', array()); 28 30 wp_enqueue_script('empty-deps-no-version', 'example.com' ); … … 44 46 * Test the different protocol references in wp_enqueue_script 45 47 * @global WP_Scripts $wp_scripts 48 * @ticket 16560 Protocol-relative references 46 49 */ 47 50 public function test_protocols() { 48 $this->knownWPBug( 16560 );49 50 51 // Init 51 52 global $wp_scripts; -
trunk/tests/test_includes_wp-styles.php
r828 r894 21 21 } 22 22 23 // Test versioning #11315 23 /** 24 * Test versioning 25 * @ticket 11315 26 */ 24 27 function test_wp_enqueue_style() { 25 28 wp_enqueue_style('no-deps-no-version', 'example.com' ); … … 42 45 * Test the different protocol references in wp_enqueue_style 43 46 * @global WP_Styles $wp_styles 47 * @ticket 16560 Protocol-relative references 44 48 */ 45 49 public function test_protocols() { 46 $this->knownWPBug( 16560 );47 48 50 // Init 49 51 global $wp_styles; -
trunk/tests/test_ms.php
r844 r894 242 242 } 243 243 244 /** 245 * @ticket 18119 246 */ 244 247 function test_upload_is_user_over_quota() { 245 $this->knownWPBug( 18119 );246 247 248 $default_space_allowed = 50; 248 249 $echo = false; -
trunk/tests/test_post_filtering.php
r877 r894 71 71 } 72 72 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 */ 75 77 function test_post_content_xhtml_empty_elem() { 76 $this->knownWPBug( 12394 );77 78 $content = <<<EOF 78 79 <img src='foo' width='500' height='300'/> … … 89 90 } 90 91 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 */ 92 96 function test_post_content_unbalanced_more() { 93 $this->knownWPBug(6297);94 95 97 $content = <<<EOF 96 98 <em>some text<!--more--> … … 109 111 } 110 112 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 */ 112 117 function test_post_content_unbalanced_nextpage() { 113 $this->knownWPBug(6297);114 115 118 $content = <<<EOF 116 119 <em>some text<!--nextpage--> … … 129 132 } 130 133 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 */ 132 138 function test_post_content_unbalanced_more_nextpage() { 133 $this->knownWPBug(6297);134 135 139 $content = <<<EOF 136 140 <em>some text<!--more--> … … 157 161 } 158 162 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 */ 160 167 function test_post_content_unbalanced_nextpage_more() { 161 $this->knownWPBug(6297);162 163 168 $content = <<<EOF 164 169 <em>some text<!--nextpage--> -
trunk/tests/test_query.php
r871 r894 358 358 } 359 359 360 /** 361 * @ticket 13961 362 */ 360 363 function test_search_encoded_chars() { 361 $this->knownWPBug(13961);362 364 $this->go_to('/search/F%C3%BCnf%2Bbar/'); 363 365 $this->assertEquals( get_query_var( 's' ), 'Fünf+bar' ); -
trunk/tests/test_query_results.php
r879 r894 259 259 } 260 260 261 /** 262 * @ticket 18897 263 */ 261 264 function test_query_offset_and_paged() { 262 $this->knownWPBug(18897);263 264 265 $posts = $this->q->query('paged=2&offset=3'); 265 266 -
trunk/tests/test_uploads.php
r828 r894 12 12 function setUp() { 13 13 if ( is_multisite() ) 14 $this->knownUTBug( 35);14 $this->knownUTBug( 35 ); 15 15 16 16 parent::setUp(); … … 51 51 } 52 52 53 /** 54 * @ticket 5953 55 */ 53 56 function test_upload_dir_absolute() { 54 $this->knownWPBug(5953);55 57 // wp_upload_dir() with an absolute upload path 56 58 update_option( 'upload_path', '/tmp' ); -
trunk/tests/test_user.php
r865 r894 163 163 /** 164 164 * Test the magic __unset method 165 * @return void 165 * 166 * @ticket 20043 166 167 */ 167 168 public function test_user_unset() { 168 $this->knownWPBug( 20043 );169 170 169 // New user 171 170 $user_id = $this->factory->user->create( array( 'role' => 'author' ) ); … … 336 335 } 337 336 337 /** 338 * @ticket 19500 Usermeta cache is not cleared after user deletion 339 */ 338 340 function test_get_blogs_of_user() { 339 // Usermeta cache is not cleared after user deletion.340 $this->knownWPBug(19500);341 342 341 // Logged out users don't have blogs. 343 342 $this->assertEquals( array(), get_blogs_of_user( 0 ) ); … … 355 354 } 356 355 356 /** 357 * @ticket 19500 Usermeta cache is not cleared after user deletion 358 */ 357 359 function test_is_user_member_of_blog() { 358 // Usermeta cache is not cleared after user deletion.359 $this->knownWPBug(19500);360 361 360 $old_current = get_current_user_id(); 362 361 -
trunk/tests/test_user_capabilities.php
r828 r894 539 539 $this->assertFalse($contributor->has_cap('delete_page', $page)); 540 540 } 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 code547 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 capabilities562 $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 have569 $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 }583 541 }
Note: See TracChangeset
for help on using the changeset viewer.