Changeset 53863
- Timestamp:
- 08/08/2022 11:12:30 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment-submission.php
r53732 r53863 40 40 } 41 41 42 /** 43 * @covers ::wp_handle_comment_submission 44 */ 42 45 public function test_submitting_comment_to_invalid_post_returns_error() { 43 46 $error = 'comment_id_not_found'; … … 56 59 } 57 60 61 /** 62 * @covers ::wp_handle_comment_submission 63 */ 58 64 public function test_submitting_comment_to_post_with_closed_comments_returns_error() { 59 65 … … 79 85 } 80 86 87 /** 88 * @covers ::wp_handle_comment_submission 89 */ 81 90 public function test_submitting_comment_to_trashed_post_returns_error() { 82 91 … … 100 109 } 101 110 111 /** 112 * @covers ::wp_handle_comment_submission 113 */ 102 114 public function test_submitting_comment_to_draft_post_returns_error() { 103 115 $error = 'comment_on_draft'; … … 125 137 /** 126 138 * @ticket 39650 139 * 140 * @covers ::wp_handle_comment_submission 127 141 */ 128 142 public function test_submitting_comment_to_draft_post_returns_error_message_for_user_with_correct_caps() { … … 151 165 } 152 166 167 /** 168 * @covers ::wp_handle_comment_submission 169 */ 153 170 public function test_submitting_comment_to_scheduled_post_returns_error() { 154 171 … … 177 194 } 178 195 196 /** 197 * @covers ::wp_handle_comment_submission 198 */ 179 199 public function test_submitting_comment_to_password_required_post_returns_error() { 180 200 … … 200 220 } 201 221 222 /** 223 * @covers ::wp_handle_comment_submission 224 */ 202 225 public function test_submitting_comment_to_password_protected_post_succeeds() { 203 226 if ( PHP_VERSION_ID >= 80100 ) { … … 237 260 } 238 261 262 /** 263 * @covers ::wp_handle_comment_submission 264 */ 239 265 public function test_submitting_valid_comment_as_logged_in_user_succeeds() { 240 266 … … 264 290 } 265 291 292 /** 293 * @covers ::wp_handle_comment_submission 294 */ 266 295 public function test_submitting_valid_comment_anonymously_succeeds() { 267 296 … … 290 319 * 291 320 * @group slashes 321 * 322 * @covers ::wp_handle_comment_submission 292 323 */ 293 324 public function test_submitting_comment_handles_slashes_correctly_handles_slashes() { … … 319 350 } 320 351 352 /** 353 * @covers ::wp_handle_comment_submission 354 */ 321 355 public function test_submitting_comment_anonymously_to_private_post_returns_error() { 322 356 … … 340 374 } 341 375 376 /** 377 * @covers ::wp_handle_comment_submission 378 */ 342 379 public function test_submitting_comment_as_logged_in_user_to_inaccessible_private_post_returns_error() { 343 380 … … 370 407 } 371 408 409 /** 410 * @covers ::wp_handle_comment_submission 411 */ 372 412 public function test_submitting_comment_to_private_post_with_closed_comments_returns_correct_error() { 373 413 … … 401 441 } 402 442 443 /** 444 * @covers ::wp_handle_comment_submission 445 */ 403 446 public function test_submitting_comment_to_own_private_post_succeeds() { 404 447 … … 424 467 } 425 468 469 /** 470 * @covers ::wp_handle_comment_submission 471 */ 426 472 public function test_submitting_comment_to_accessible_private_post_succeeds() { 427 473 … … 447 493 } 448 494 495 /** 496 * @covers ::wp_handle_comment_submission 497 */ 449 498 public function test_anonymous_user_cannot_comment_unfiltered_html() { 450 499 if ( PHP_VERSION_ID >= 80100 ) { … … 472 521 } 473 522 523 /** 524 * @covers ::wp_handle_comment_submission 525 */ 474 526 public function test_unprivileged_user_cannot_comment_unfiltered_html() { 475 527 … … 490 542 } 491 543 544 /** 545 * @covers ::wp_handle_comment_submission 546 */ 492 547 public function test_unprivileged_user_cannot_comment_unfiltered_html_even_with_valid_nonce() { 493 548 … … 514 569 } 515 570 571 /** 572 * @covers ::wp_handle_comment_submission 573 */ 516 574 public function test_privileged_user_can_comment_unfiltered_html_with_valid_nonce() { 517 575 … … 546 604 } 547 605 606 /** 607 * @covers ::wp_handle_comment_submission 608 */ 548 609 public function test_privileged_user_cannot_comment_unfiltered_html_without_valid_nonce() { 549 610 … … 570 631 } 571 632 633 /** 634 * @covers ::wp_handle_comment_submission 635 */ 572 636 public function test_submitting_comment_as_anonymous_user_when_registration_required_returns_error() { 573 637 … … 589 653 } 590 654 655 /** 656 * @covers ::wp_handle_comment_submission 657 */ 591 658 public function test_submitting_comment_with_no_name_when_name_email_required_returns_error() { 592 659 … … 610 677 } 611 678 679 /** 680 * @covers ::wp_handle_comment_submission 681 */ 612 682 public function test_submitting_comment_with_no_email_when_name_email_required_returns_error() { 613 683 … … 631 701 } 632 702 703 /** 704 * @covers ::wp_handle_comment_submission 705 */ 633 706 public function test_submitting_comment_with_invalid_email_when_name_email_required_returns_error() { 634 707 … … 653 726 } 654 727 728 /** 729 * @covers ::wp_handle_comment_submission 730 */ 655 731 public function test_submitting_comment_with_no_comment_content_returns_error() { 656 732 … … 672 748 /** 673 749 * @ticket 10377 750 * 751 * @covers ::wp_handle_comment_submission 674 752 */ 675 753 public function test_submitting_comment_with_content_too_long_returns_error() { … … 690 768 /** 691 769 * @ticket 10377 770 * 771 * @covers ::wp_handle_comment_submission 692 772 */ 693 773 public function test_submitting_comment_with_author_too_long_returns_error() { … … 708 788 /** 709 789 * @ticket 10377 790 * 791 * @covers ::wp_handle_comment_submission 710 792 */ 711 793 public function test_submitting_comment_with_email_too_long_returns_error() { … … 726 808 /** 727 809 * @ticket 10377 810 * 811 * @covers ::wp_handle_comment_submission 728 812 */ 729 813 public function test_submitting_comment_with_url_too_long_returns_error() { … … 745 829 /** 746 830 * @ticket 49236 831 * 832 * @covers ::wp_handle_comment_submission 747 833 */ 748 834 public function test_submitting_comment_with_empty_type_results_in_correct_type() { … … 774 860 /** 775 861 * @ticket 49236 862 * 863 * @covers ::wp_insert_comment 776 864 */ 777 865 public function test_inserting_comment_with_empty_type_results_in_correct_type() { … … 794 882 /** 795 883 * @ticket 34997 884 * 885 * @covers ::wp_handle_comment_submission 796 886 */ 797 887 public function test_comment_submission_sends_all_expected_parameters_to_preprocess_comment_filter() { … … 838 928 /** 839 929 * @ticket 36901 930 * 931 * @covers ::wp_handle_comment_submission 840 932 */ 841 933 public function test_submitting_duplicate_comments() { … … 864 956 /** 865 957 * @ticket 36901 958 * 959 * @covers ::wp_handle_comment_submission 866 960 */ 867 961 public function test_comments_flood() { … … 893 987 /** 894 988 * @ticket 36901 989 * 990 * @covers ::wp_handle_comment_submission 895 991 */ 896 992 public function test_comments_flood_user_is_admin() { -
trunk/tests/phpunit/tests/comment.php
r52010 r53863 31 31 } 32 32 33 /** 34 * @covers ::wp_update_comment 35 */ 33 36 public function test_wp_update_comment() { 34 37 $post = self::factory()->post->create_and_get( … … 79 82 /** 80 83 * @ticket 30627 84 * 85 * @covers ::wp_update_comment 81 86 */ 82 87 public function test_wp_update_comment_updates_comment_type() { … … 96 101 /** 97 102 * @ticket 36784 103 * 104 * @covers ::wp_update_comment 98 105 */ 99 106 public function test_wp_update_comment_updates_comment_meta() { … … 115 122 /** 116 123 * @ticket 30307 124 * 125 * @covers ::wp_update_comment 117 126 */ 118 127 public function test_wp_update_comment_updates_user_id() { … … 132 141 /** 133 142 * @ticket 34954 143 * 144 * @covers ::wp_update_comment 134 145 */ 135 146 public function test_wp_update_comment_with_no_post_id() { … … 153 164 /** 154 165 * @ticket 39732 166 * 167 * @covers ::wp_update_comment 155 168 */ 156 169 public function test_wp_update_comment_returns_false_for_invalid_comment_or_post_id() { … … 176 189 /** 177 190 * @ticket 39732 191 * 192 * @covers ::wp_update_comment 178 193 */ 179 194 public function test_wp_update_comment_is_wp_error() { … … 202 217 } 203 218 219 /** 220 * @covers ::get_approved_comments 221 */ 204 222 public function test_get_approved_comments() { 205 223 $ca1 = self::factory()->comment->create( … … 258 276 /** 259 277 * @ticket 30412 278 * 279 * @covers ::get_approved_comments 260 280 */ 261 281 public function test_get_approved_comments_with_post_id_0_should_return_empty_array() { … … 274 294 /** 275 295 * @ticket 14279 296 * 297 * @covers ::wp_new_comment 276 298 */ 277 299 public function test_wp_new_comment_respects_dates() { … … 297 319 /** 298 320 * @ticket 14601 321 * 322 * @covers ::wp_new_comment 299 323 */ 300 324 public function test_wp_new_comment_respects_author_ip() { … … 318 342 /** 319 343 * @ticket 14601 344 * 345 * @covers ::wp_new_comment 320 346 */ 321 347 public function test_wp_new_comment_respects_author_ip_empty_string() { … … 339 365 /** 340 366 * @ticket 14601 367 * 368 * @covers ::wp_new_comment 341 369 */ 342 370 public function test_wp_new_comment_respects_comment_agent() { … … 361 389 /** 362 390 * @ticket 14601 391 * 392 * @covers ::wp_new_comment 363 393 */ 364 394 public function test_wp_new_comment_should_trim_provided_comment_agent_to_254_chars() { … … 383 413 /** 384 414 * @ticket 14601 415 * 416 * @covers ::wp_new_comment 385 417 */ 386 418 public function test_wp_new_comment_respects_comment_agent_empty_string() { … … 403 435 } 404 436 405 437 /** 438 * @covers ::wp_new_comment 439 */ 406 440 public function test_comment_field_lengths() { 407 441 $data = array( … … 425 459 /** 426 460 * @ticket 32566 461 * 462 * @covers ::wp_notify_moderator 427 463 */ 428 464 public function test_wp_notify_moderator_should_not_throw_notice_when_post_author_is_0() { … … 442 478 } 443 479 480 /** 481 * @covers ::wp_new_comment_notify_postauthor 482 */ 444 483 public function test_wp_new_comment_notify_postauthor_should_send_email_when_comment_is_approved() { 445 484 $c = self::factory()->comment->create( … … 453 492 } 454 493 494 /** 495 * @covers ::wp_new_comment_notify_postauthor 496 */ 455 497 public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_is_unapproved() { 456 498 $c = self::factory()->comment->create( … … 467 509 /** 468 510 * @ticket 33587 511 * 512 * @covers ::wp_new_comment_notify_postauthor 469 513 */ 470 514 public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_has_been_marked_as_spam() { … … 482 526 /** 483 527 * @ticket 35006 528 * 529 * @covers ::wp_new_comment_notify_postauthor 484 530 */ 485 531 public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_has_been_trashed() { … … 497 543 /** 498 544 * @ticket 43805 545 * 546 * @covers ::wp_new_comment_notify_postauthor 499 547 */ 500 548 public function test_wp_new_comment_notify_postauthor_content_should_include_link_to_parent() { … … 521 569 /** 522 570 * @ticket 43805 571 * 572 * @covers ::wp_new_comment_notify_moderator 523 573 */ 524 574 public function test_wp_new_comment_notify_moderator_content_should_include_link_to_parent() { … … 557 607 /** 558 608 * @ticket 12431 609 * 610 * @covers ::get_comment_meta 559 611 */ 560 612 public function test_wp_new_comment_with_meta() { … … 574 626 /** 575 627 * @ticket 8071 628 * 629 * @covers WP_Comment::get_children 576 630 */ 577 631 public function test_wp_comment_get_children_should_fill_children() { … … 634 688 /** 635 689 * @ticket 27571 690 * 691 * @covers ::get_comment 636 692 */ 637 693 public function test_post_properties_should_be_lazyloaded() { … … 685 741 /** 686 742 * @ticket 761 743 * 744 * @covers ::wp_new_comment 687 745 */ 688 746 public function test_wp_notify_moderator_filter_moderation_notify_option_true_filter_false() { … … 706 764 /** 707 765 * @ticket 761 766 * 767 * @covers ::wp_new_comment 708 768 */ 709 769 public function test_wp_notify_moderator_filter_moderation_notify_option_false_filter_true() { … … 727 787 /** 728 788 * @ticket 761 789 * 790 * @covers ::wp_new_comment 729 791 */ 730 792 public function test_wp_notify_post_author_filter_comments_notify_option_true_filter_false() { … … 749 811 /** 750 812 * @ticket 761 813 * 814 * @covers ::wp_new_comment 751 815 */ 752 816 public function test_wp_notify_post_author_filter_comments_notify_option_false_filter_true() { … … 853 917 } 854 918 919 /** 920 * @covers ::_close_comments_for_old_post 921 */ 855 922 public function test_close_comments_for_old_post() { 856 923 update_option( 'close_comments_for_old_posts', true ); … … 868 935 } 869 936 937 /** 938 * @covers ::_close_comments_for_old_post 939 */ 870 940 public function test_close_comments_for_old_post_undated_draft() { 871 941 $draft_id = self::factory()->post->create( … … 882 952 /** 883 953 * @ticket 35276 954 * 955 * @covers ::wp_update_comment 884 956 */ 885 957 public function test_wp_update_comment_author_id_and_agent() { … … 918 990 } 919 991 992 /** 993 * @covers ::wp_get_comment_fields_max_lengths 994 */ 920 995 public function test_wp_get_comment_fields_max_lengths() { 921 996 $expected = array( … … 938 1013 * @group privacy 939 1014 * @ticket 43442 1015 * 1016 * @covers ::wp_comments_personal_data_eraser 940 1017 */ 941 1018 public function test_wp_comments_personal_data_eraser() { … … 995 1072 * @group privacy 996 1073 * @ticket 43442 1074 * 1075 * @covers ::wp_comments_personal_data_eraser 997 1076 */ 998 1077 public function test_wp_comments_personal_data_eraser_empty_first_page_output() { … … 1014 1093 * @group privacy 1015 1094 * @ticket 43442 1095 * 1096 * @covers ::wp_comments_personal_data_eraser 1016 1097 */ 1017 1098 public function test_wp_comments_personal_data_eraser_non_empty_first_page_output() { … … 1046 1127 * @group privacy 1047 1128 * @ticket 43442 1129 * 1130 * @covers ::wp_comments_personal_data_eraser 1048 1131 */ 1049 1132 public function test_wp_comments_personal_data_eraser_empty_second_page_output() { … … 1078 1161 * @group privacy 1079 1162 * @ticket 43442 1163 * 1164 * @covers ::wp_comments_personal_data_eraser 1080 1165 */ 1081 1166 public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization() { … … 1115 1200 * @group privacy 1116 1201 * @ticket 43442 1202 * 1203 * @covers ::wp_comments_personal_data_eraser 1117 1204 */ 1118 1205 public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization_with_custom_message() { … … 1180 1267 } 1181 1268 1269 /** 1270 * @covers ::wp_trash_comment 1271 */ 1182 1272 public function test_trash_should_invalidate_comment_cache() { 1183 1273 global $wpdb; … … 1194 1284 } 1195 1285 1286 /** 1287 * @covers ::wp_untrash_comment 1288 */ 1196 1289 public function test_untrash_should_invalidate_comment_cache() { 1197 1290 global $wpdb; … … 1210 1303 } 1211 1304 1305 /** 1306 * @covers ::wp_spam_comment 1307 */ 1212 1308 public function test_spam_should_invalidate_comment_cache() { 1213 1309 global $wpdb; … … 1224 1320 } 1225 1321 1322 /** 1323 * @covers ::wp_unspam_comment 1324 */ 1226 1325 public function test_unspam_should_invalidate_comment_cache() { 1227 1326 global $wpdb; … … 1245 1344 * @group privacy 1246 1345 * @ticket 43440 1346 * 1347 * @covers ::wp_comments_personal_data_exporter 1247 1348 */ 1248 1349 public function test_wp_comments_personal_data_exporter() { … … 1291 1392 * @group privacy 1292 1393 * @ticket 43440 1394 * 1395 * @covers ::wp_comments_personal_data_exporter 1293 1396 */ 1294 1397 public function test_wp_comments_personal_data_exporter_no_comments_found() { … … 1309 1412 * @group privacy 1310 1413 * @ticket 43440 1414 * 1415 * @covers ::wp_comments_personal_data_exporter 1311 1416 */ 1312 1417 public function test_wp_comments_personal_data_exporter_empty_comment_prop() { … … 1340 1445 * @group privacy 1341 1446 * @ticket 43440 1447 * 1448 * @covers ::wp_comments_personal_data_exporter 1342 1449 */ 1343 1450 public function test_wp_comments_personal_data_exporter_empty_second_page() { -
trunk/tests/phpunit/tests/comment/checkComment.php
r48121 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::check_comment 5 7 */ 6 8 class Tests_Comment_CheckComment extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/commentForm.php
r52175 r53863 3 3 /** 4 4 * @group comment 5 * 5 6 * @covers ::comment_form 6 7 */ -
trunk/tests/phpunit/tests/comment/commentsTemplate.php
r51657 r53863 5 5 * 6 6 * Testing items that are only testable by grabbing the markup of `comments_template()` from the output buffer. 7 * 8 * @covers ::comments_template 7 9 */ 8 10 class Tests_Comment_CommentsTemplate extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/dateQuery.php
r51568 r53863 13 13 * @group date 14 14 * @group datequery 15 * 16 * @covers ::get_comments 15 17 */ 16 18 class Tests_Comment_DateQuery extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php
r51568 r53863 2 2 /** 3 3 * @group comment 4 * 5 * @covers ::get_comment_author_email_link 4 6 */ 5 7 class Tests_Comment_GetCommentAuthorEmailLink extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php
r46586 r53863 3 3 /** 4 4 * @group comment 5 * 6 *@covers ::get_comment_author_url 5 7 */ 6 8 class Tests_Comment_GetCommentAuthorUrl extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php
r49603 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::get_comment_author_url_link 5 7 */ 6 8 class Tests_Comment_GetCommentAuthorUrlLink extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentClass.php
r46586 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::get_comment_class 5 7 */ 6 8 class Tests_Comment_GetCommentClass extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentCount.php
r53036 r53863 1 1 <?php 2 2 3 /** 4 * @group comment 5 * 6 * Class Tests_Get_Comment_Count 7 * 8 * @covers ::get_comment_count 9 */ 3 10 class Tests_Get_Comment_Count extends WP_UnitTestCase { 4 11 -
trunk/tests/phpunit/tests/comment/getCommentExcerpt.php
r51367 r53863 1 1 <?php 2 2 3 /** 4 * @group comment 5 * 6 * Class Tests_Get_Comment_Excerpt 7 * 8 * @covers ::get_comment_excerpt 9 */ 3 10 class Tests_Get_Comment_Excerpt extends WP_UnitTestCase { 4 11 protected static $bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey. -
trunk/tests/phpunit/tests/comment/getCommentLink.php
r51462 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::get_comment_link 5 7 */ 6 8 class Tests_Comment_GetCommentLink extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentReplyLink.php
r51462 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::get_comment_reply_link 5 7 */ 6 8 class Tests_Comment_GetCommentReplyLink extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getCommentsPagesCount.php
r52010 r53863 4 4 * 5 5 * @group comment 6 * 7 * @covers ::get_comment_pages_count 6 8 */ 7 9 class Tests_Comment_GetCommentsPagesCount extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/getPageOfComment.php
r51571 r53863 3 3 /** 4 4 * @group comment 5 * 5 6 * @covers ::get_page_of_comment 6 7 */ -
trunk/tests/phpunit/tests/comment/isAvatarCommentType.php
r48848 r53863 12 12 * 13 13 * @group comment 14 * @covers ::is_avatar_comment_type15 14 * 16 15 * @since 5.1.0 16 * 17 * @covers ::is_avatar_comment_type 17 18 */ 18 19 class Tests_Comment_IsAvatarCommentType extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/lastCommentModified.php
r50337 r53863 4 4 * @group comment 5 5 * @ticket 38027 6 * 7 * @covers ::get_lastcommentmodified 6 8 */ 7 9 class Tests_Comment_Last_Modified extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/metaCache.php
r51331 r53863 1 1 <?php 2 2 /** 3 * @group comment 4 */ 3 5 class Tests_Comment_Meta_Cache extends WP_UnitTestCase { 4 6 protected $i = 0; … … 7 9 /** 8 10 * @ticket 16894 11 * 12 * @covers ::update_comment_meta 9 13 */ 10 14 public function test_update_comment_meta_cache_should_default_to_true() { … … 37 41 /** 38 42 * @ticket 16894 43 * 44 * @covers ::update_comment_meta 39 45 */ 40 46 public function test_update_comment_meta_cache_true() { … … 68 74 /** 69 75 * @ticket 16894 76 * 77 * @covers ::update_comment_meta 70 78 */ 71 79 public function test_update_comment_meta_cache_false() { … … 96 104 /** 97 105 * @ticket 16894 106 * 107 * @covers ::get_comment_meta 98 108 */ 99 109 public function test_comment_meta_should_be_lazy_loaded_for_all_comments_in_comments_template() { … … 131 141 /** 132 142 * @ticket 34047 143 * 144 * @covers ::get_comment_meta 133 145 */ 134 146 public function test_comment_meta_should_be_lazy_loaded_in_comment_feed_queries() { … … 179 191 /** 180 192 * @ticket 34047 193 * 194 * @covers ::get_comment_meta 181 195 */ 182 196 public function test_comment_meta_should_be_lazy_loaded_in_single_post_comment_feed_queries() { … … 228 242 /** 229 243 * @ticket 44467 244 * 245 * @covers ::add_metadata 230 246 */ 231 247 public function test_add_metadata_sets_comments_last_changed() { … … 240 256 /** 241 257 * @ticket 44467 258 * 259 * @covers ::update_metadata 242 260 */ 243 261 public function test_update_metadata_sets_comments_last_changed() { … … 252 270 /** 253 271 * @ticket 44467 272 * 273 * @covers ::delete_metadata 254 274 */ 255 275 public function test_delete_metadata_sets_comments_last_changed() { -
trunk/tests/phpunit/tests/comment/query.php
r53291 r53863 14 14 } 15 15 16 /** 17 * @covers WP_Comment_Query::query 18 */ 16 19 public function test_query() { 17 20 $c1 = self::factory()->comment->create( … … 60 63 } 61 64 65 /** 66 * @covers WP_Comment_Query::query 67 */ 62 68 public function test_query_post_id_0() { 63 69 $c1 = self::factory()->comment->create( … … 81 87 /** 82 88 * @ticket 12668 89 * 90 * @covers WP_Comment_Query::query 83 91 */ 84 92 public function test_query_type_empty_string() { … … 131 139 /** 132 140 * @ticket 12668 141 * 142 * @covers WP_Comment_Query::query 133 143 */ 134 144 public function test_query_type_comment() { … … 179 189 } 180 190 191 /** 192 * @covers WP_Comment_Query::query 193 */ 181 194 public function test_query_type_pingback() { 182 195 $c1 = self::factory()->comment->create( … … 220 233 } 221 234 235 /** 236 * @covers WP_Comment_Query::query 237 */ 222 238 public function test_query_type_trackback() { 223 239 $c1 = self::factory()->comment->create( … … 263 279 /** 264 280 * 'pings' is an alias for 'trackback' + 'pingback'. 281 * 282 * @covers WP_Comment_Query::query 265 283 */ 266 284 public function test_query_type_pings() { … … 315 333 * 316 334 * @ticket 12668 335 * 336 * @covers WP_Comment_Query::query 317 337 */ 318 338 public function test_type_array_comments_and_custom() { … … 372 392 /** 373 393 * @ticket 12668 394 * 395 * @covers WP_Comment_Query::query 374 396 */ 375 397 public function test_type_not__in_array_custom() { … … 429 451 /** 430 452 * @ticket 12668 453 * 454 * @covers WP_Comment_Query::query 431 455 */ 432 456 public function test_type__in_array_and_not_type_array_custom() { … … 487 511 /** 488 512 * @ticket 12668 513 * 514 * @covers WP_Comment_Query::query 489 515 */ 490 516 public function test_type_array_and_type__not_in_array_custom() { … … 545 571 /** 546 572 * @ticket 12668 573 * 574 * @covers WP_Comment_Query::query 547 575 */ 548 576 public function test_type__not_in_custom() { … … 602 630 /** 603 631 * @ticket 12668 632 * 633 * @covers WP_Comment_Query::query 604 634 */ 605 635 public function test_type_array_comments_and_pings() { … … 652 682 /** 653 683 * @ticket 12668 684 * 685 * @covers WP_Comment_Query::query 654 686 */ 655 687 public function test_type_array_comment_pings() { … … 688 720 /** 689 721 * @ticket 12668 722 * 723 * @covers WP_Comment_Query::query 690 724 */ 691 725 public function test_type_array_pingback() { … … 724 758 /** 725 759 * @ticket 12668 760 * 761 * @covers WP_Comment_Query::query 726 762 */ 727 763 public function test_type_array_custom_pingpack() { … … 760 796 /** 761 797 * @ticket 12668 798 * 799 * @covers WP_Comment_Query::query 762 800 */ 763 801 public function test_type_array_pings() { … … 796 834 /** 797 835 * @ticket 12668 836 * 837 * @covers WP_Comment_Query::query 798 838 */ 799 839 public function test_type_status_approved_array_comment_pings() { … … 840 880 /** 841 881 * @ticket 12668 882 * 883 * @covers WP_Comment_Query::query 842 884 */ 843 885 public function test_type_array_trackback() { … … 876 918 /** 877 919 * @ticket 12668 920 * 921 * @covers WP_Comment_Query::query 878 922 */ 879 923 public function test_type_array_custom_trackback() { … … 912 956 /** 913 957 * @ticket 12668 958 * 959 * @covers WP_Comment_Query::query 914 960 */ 915 961 public function test_type_array_pings_approved() { … … 956 1002 /** 957 1003 * @ticket 29612 1004 * 1005 * @covers WP_Comment_Query::query 958 1006 */ 959 1007 public function test_status_empty_string() { … … 990 1038 /** 991 1039 * @ticket 21101 1040 * 1041 * @covers WP_Comment_Query::query 992 1042 */ 993 1043 public function test_status_hold() { … … 1018 1068 /** 1019 1069 * @ticket 21101 1070 * 1071 * @covers WP_Comment_Query::query 1020 1072 */ 1021 1073 public function test_status_approve() { … … 1044 1096 } 1045 1097 1098 /** 1099 * @covers WP_Comment_Query::query 1100 */ 1046 1101 public function test_status_custom() { 1047 1102 $c1 = self::factory()->comment->create( … … 1075 1130 } 1076 1131 1132 /** 1133 * @covers WP_Comment_Query::query 1134 */ 1077 1135 public function test_status_all() { 1078 1136 $c1 = self::factory()->comment->create( … … 1106 1164 } 1107 1165 1166 /** 1167 * @covers WP_Comment_Query::query 1168 */ 1108 1169 public function test_status_default_to_all() { 1109 1170 $c1 = self::factory()->comment->create( … … 1138 1199 /** 1139 1200 * @ticket 29612 1201 * 1202 * @covers WP_Comment_Query::query 1140 1203 */ 1141 1204 public function test_status_comma_any() { … … 1172 1235 /** 1173 1236 * @ticket 29612 1237 * 1238 * @covers WP_Comment_Query::query 1174 1239 */ 1175 1240 public function test_status_comma_separated() { … … 1206 1271 /** 1207 1272 * @ticket 29612 1273 * 1274 * @covers WP_Comment_Query::query 1208 1275 */ 1209 1276 public function test_status_array() { … … 1240 1307 /** 1241 1308 * @ticket 35478 1309 * 1310 * @covers WP_Comment_Query::__construct 1242 1311 */ 1243 1312 public function test_multiple_post_fields_should_all_be_respected() { … … 1285 1354 } 1286 1355 1356 /** 1357 * @covers ::get_comments 1358 */ 1287 1359 public function test_get_comments_for_post() { 1288 1360 $limit = 5; … … 1344 1416 /** 1345 1417 * @ticket 21003 1418 * 1419 * @covers ::get_comments 1346 1420 */ 1347 1421 public function test_orderby_meta() { … … 1436 1510 /** 1437 1511 * @ticket 30478 1512 * 1513 * @covers WP_Comment_Query::query 1438 1514 */ 1439 1515 public function test_orderby_clause_key() { … … 1463 1539 /** 1464 1540 * @ticket 30478 1541 * 1542 * @covers WP_Comment_Query::query 1465 1543 */ 1466 1544 public function test_orderby_clause_key_as_secondary_sort() { … … 1507 1585 /** 1508 1586 * @ticket 30478 1587 * 1588 * @covers WP_Comment_Query::query 1509 1589 */ 1510 1590 public function test_orderby_more_than_one_clause_key() { … … 1544 1624 /** 1545 1625 * @ticket 32081 1626 * 1627 * @covers WP_Comment_Query::__construct 1628 * @covers WP_Comment_Query::get_comments 1546 1629 */ 1547 1630 public function test_meta_query_should_work_with_comment__in() { … … 1570 1653 /** 1571 1654 * @ticket 32081 1655 * 1656 * @covers WP_Comment_Query::__construct 1657 * @covers WP_Comment_Query::get_comments 1572 1658 */ 1573 1659 public function test_meta_query_should_work_with_comment__not_in() { … … 1596 1682 /** 1597 1683 * @ticket 27064 1684 * 1685 * @covers ::get_comments 1598 1686 */ 1599 1687 public function test_get_comments_by_user() { … … 1650 1738 /** 1651 1739 * @ticket 35377 1740 * 1741 * @covers ::get_comments 1652 1742 */ 1653 1743 public function test_get_comments_by_author_url() { … … 1689 1779 /** 1690 1780 * @ticket 28434 1781 * 1782 * @covers ::get_comments 1691 1783 */ 1692 1784 public function test_fields_ids_query() { … … 1725 1817 /** 1726 1818 * @ticket 29189 1819 * 1820 * @covers ::get_comments 1727 1821 */ 1728 1822 public function test_fields_comment__in() { … … 1761 1855 /** 1762 1856 * @ticket 29189 1857 * 1858 * @covers ::get_comments 1763 1859 */ 1764 1860 public function test_fields_comment__not_in() { … … 1797 1893 /** 1798 1894 * @ticket 29189 1895 * 1896 * @covers ::get_comments 1799 1897 */ 1800 1898 public function test_fields_post__in() { … … 1837 1935 /** 1838 1936 * @ticket 29189 1937 * 1938 * @covers ::get_comments 1839 1939 */ 1840 1940 public function test_fields_post__not_in() { … … 1877 1977 /** 1878 1978 * @ticket 29885 1979 * 1980 * @covers ::get_comments 1879 1981 */ 1880 1982 public function test_fields_post_author__in() { … … 1920 2022 /** 1921 2023 * @ticket 29885 2024 * 2025 * @covers ::get_comments 1922 2026 */ 1923 2027 public function test_fields_post_author__not_in() { … … 1963 2067 /** 1964 2068 * @ticket 29885 2069 * 2070 * @covers ::get_comments 1965 2071 */ 1966 2072 public function test_fields_author__in() { … … 2011 2117 /** 2012 2118 * @ticket 29885 2119 * 2120 * @covers ::get_comments 2013 2121 */ 2014 2122 public function test_fields_author__not_in() { … … 2059 2167 /** 2060 2168 * @ticket 19623 2169 * 2170 * @covers ::get_comments 2061 2171 */ 2062 2172 public function test_get_comments_with_status_all() { … … 2090 2200 /** 2091 2201 * @ticket 19623 2202 * 2203 * @covers ::get_comments 2092 2204 */ 2093 2205 public function test_get_comments_with_include_unapproved_user_id() { … … 2134 2246 /** 2135 2247 * @ticket 19623 2248 * 2249 * @covers ::get_comments 2136 2250 */ 2137 2251 public function test_get_comments_with_include_unapproved_user_id_array() { … … 2185 2299 /** 2186 2300 * @ticket 19623 2301 * 2302 * @covers ::get_comments 2187 2303 */ 2188 2304 public function test_get_comments_with_include_unapproved_user_id_comma_separated() { … … 2236 2352 /** 2237 2353 * @ticket 19623 2354 * 2355 * @covers ::get_comments 2238 2356 */ 2239 2357 public function test_get_comments_with_include_unapproved_author_email() { … … 2286 2404 /** 2287 2405 * @ticket 19623 2406 * 2407 * @covers ::get_comments 2288 2408 */ 2289 2409 public function test_get_comments_with_include_unapproved_mixed_array() { … … 2345 2465 /** 2346 2466 * @ticket 19623 2467 * 2468 * @covers ::get_comments 2347 2469 */ 2348 2470 public function test_get_comments_with_include_unapproved_mixed_comma_separated() { … … 2402 2524 } 2403 2525 2526 /** 2527 * @covers WP_Comment_Query::query 2528 */ 2404 2529 public function test_search() { 2405 2530 $c1 = self::factory()->comment->create( … … 2477 2602 /** 2478 2603 * @ticket 35513 2604 * 2605 * @covers WP_Comment_Query::query 2479 2606 */ 2480 2607 public function test_search_false_should_be_ignored() { … … 2490 2617 /** 2491 2618 * @ticket 35513 2619 * 2620 * @covers WP_Comment_Query::query 2492 2621 */ 2493 2622 public function test_search_null_should_be_ignored() { … … 2503 2632 /** 2504 2633 * @ticket 35513 2634 * 2635 * @covers WP_Comment_Query::query 2505 2636 */ 2506 2637 public function test_search_empty_string_should_be_ignored() { … … 2516 2647 /** 2517 2648 * @ticket 35513 2649 * 2650 * @covers WP_Comment_Query::query 2518 2651 */ 2519 2652 public function test_search_int_0_should_not_be_ignored() { … … 2530 2663 /** 2531 2664 * @ticket 35513 2665 * 2666 * @covers WP_Comment_Query::query 2532 2667 */ 2533 2668 public function test_search_string_0_should_not_be_ignored() { … … 2542 2677 } 2543 2678 2679 /** 2680 * @covers WP_Comment_Query::query 2681 */ 2544 2682 public function test_orderby_default() { 2545 2683 global $wpdb; … … 2551 2689 } 2552 2690 2691 /** 2692 * @covers WP_Comment_Query::query 2693 */ 2553 2694 public function test_orderby_single() { 2554 2695 global $wpdb; … … 2564 2705 } 2565 2706 2707 /** 2708 * @covers WP_Comment_Query::query 2709 */ 2566 2710 public function test_orderby_single_invalid() { 2567 2711 global $wpdb; … … 2577 2721 } 2578 2722 2723 /** 2724 * @covers WP_Comment_Query::query 2725 */ 2579 2726 public function test_orderby_space_separated() { 2580 2727 global $wpdb; … … 2590 2737 } 2591 2738 2739 /** 2740 * @covers WP_Comment_Query::query 2741 */ 2592 2742 public function test_orderby_comma_separated() { 2593 2743 global $wpdb; … … 2603 2753 } 2604 2754 2755 /** 2756 * @covers WP_Comment_Query::query 2757 */ 2605 2758 public function test_orderby_flat_array() { 2606 2759 global $wpdb; … … 2616 2769 } 2617 2770 2771 /** 2772 * @covers WP_Comment_Query::query 2773 */ 2618 2774 public function test_orderby_array_contains_invalid_item() { 2619 2775 global $wpdb; … … 2629 2785 } 2630 2786 2787 /** 2788 * @covers WP_Comment_Query::query 2789 */ 2631 2790 public function test_orderby_array_contains_all_invalid_items() { 2632 2791 global $wpdb; … … 2644 2803 /** 2645 2804 * @ticket 29902 2805 * 2806 * @covers WP_Comment_Query::query 2646 2807 */ 2647 2808 public function test_orderby_none() { … … 2658 2819 /** 2659 2820 * @ticket 29902 2821 * 2822 * @covers WP_Comment_Query::query 2660 2823 */ 2661 2824 public function test_orderby_empty_array() { … … 2672 2835 /** 2673 2836 * @ticket 29902 2837 * 2838 * @covers WP_Comment_Query::query 2674 2839 */ 2675 2840 public function test_orderby_false() { … … 2686 2851 /** 2687 2852 * @ticket 30478 2853 * 2854 * @covers WP_Comment_Query::query 2688 2855 */ 2689 2856 public function test_orderby_array() { … … 2707 2874 /** 2708 2875 * @ticket 30478 2876 * 2877 * @covers WP_Comment_Query::query 2709 2878 */ 2710 2879 public function test_orderby_array_should_discard_invalid_columns() { … … 2728 2897 /** 2729 2898 * @ticket 30478 2899 * 2900 * @covers WP_Comment_Query::query 2730 2901 */ 2731 2902 public function test_orderby_array_should_convert_invalid_order_to_DESC() { … … 2749 2920 /** 2750 2921 * @ticket 30478 2922 * 2923 * @covers WP_Comment_Query::query 2751 2924 */ 2752 2925 public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_should_inherit_order_from_comment_date_gmt() { … … 2769 2942 /** 2770 2943 * @ticket 30478 2944 * 2945 * @covers WP_Comment_Query::query 2771 2946 */ 2772 2947 public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_should_inherit_order_from_comment_date() { … … 2789 2964 /** 2790 2965 * @ticket 30478 2966 * 2967 * @covers WP_Comment_Query::query 2791 2968 */ 2792 2969 public function test_orderby_array_should_sort_by_comment_ID_DESC_as_fallback_when_not_sorted_by_date() { … … 2808 2985 /** 2809 2986 * @ticket 30478 2987 * 2988 * @covers WP_Comment_Query::query 2810 2989 */ 2811 2990 public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_ASC() { … … 2833 3012 /** 2834 3013 * @ticket 30478 3014 * 3015 * @covers WP_Comment_Query::query 2835 3016 */ 2836 3017 public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_DESC() { … … 2858 3039 } 2859 3040 3041 /** 3042 * @covers WP_Comment_Query::query 3043 */ 2860 3044 public function test_meta_vars_should_be_converted_to_meta_query() { 2861 3045 $q = new WP_Comment_Query(); … … 2875 3059 } 2876 3060 3061 /** 3062 * @covers WP_Comment_Query::query 3063 */ 2877 3064 public function test_count() { 2878 3065 $c1 = self::factory()->comment->create( … … 2901 3088 /** 2902 3089 * @ticket 23369 3090 * 3091 * @covers WP_Comment_Query::query 2903 3092 */ 2904 3093 public function test_count_with_meta_query() { … … 2942 3131 /** 2943 3132 * @ticket 38268 3133 * 3134 * @covers WP_Comment_Query::query 2944 3135 */ 2945 3136 public function test_paged() { … … 2988 3179 /** 2989 3180 * @ticket 38268 3181 * 3182 * @covers WP_Comment_Query::query 2990 3183 */ 2991 3184 public function test_offset_should_take_precedence_over_paged() { … … 3034 3227 } 3035 3228 3229 /** 3230 * @covers WP_Comment_Query::query 3231 */ 3036 3232 public function test_post_type_single_value() { 3037 3233 register_post_type( 'post-type-1' ); … … 3060 3256 /** 3061 3257 * @ticket 20006 3258 * 3259 * @covers WP_Comment_Query::query 3062 3260 */ 3063 3261 public function test_post_type_singleton_array() { … … 3087 3285 /** 3088 3286 * @ticket 20006 3287 * 3288 * @covers WP_Comment_Query::query 3089 3289 */ 3090 3290 public function test_post_type_array() { … … 3112 3312 } 3113 3313 3314 /** 3315 * 3316 * @covers WP_Comment_Query::query 3317 */ 3114 3318 public function test_post_name_single_value() { 3115 3319 $p1 = self::factory()->post->create( array( 'post_name' => 'foo' ) ); … … 3132 3336 /** 3133 3337 * @ticket 20006 3338 * 3339 * @covers WP_Comment_Query::query 3134 3340 */ 3135 3341 public function test_post_name_singleton_array() { … … 3153 3359 /** 3154 3360 * @ticket 20006 3361 * 3362 * @covers WP_Comment_Query::query 3155 3363 */ 3156 3364 public function test_post_name_array() { … … 3174 3382 } 3175 3383 3384 /** 3385 * @covers WP_Comment_Query::query 3386 */ 3176 3387 public function test_post_status_single_value() { 3177 3388 $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); … … 3194 3405 /** 3195 3406 * @ticket 20006 3407 * 3408 * @covers WP_Comment_Query::query 3196 3409 */ 3197 3410 public function test_post_status_singleton_array() { … … 3215 3428 /** 3216 3429 * @ticket 20006 3430 * 3431 * @covers WP_Comment_Query::query 3217 3432 */ 3218 3433 public function test_post_status_array() { … … 3238 3453 /** 3239 3454 * @ticket 35512 3455 * 3456 * @covers WP_Comment_Query::query 3240 3457 */ 3241 3458 public function test_post_type_any_should_override_other_post_types() { … … 3261 3478 /** 3262 3479 * @ticket 35512 3480 * 3481 * @covers WP_Comment_Query::query 3263 3482 */ 3264 3483 public function test_post_type_any_as_part_of_an_array_of_post_types() { … … 3284 3503 /** 3285 3504 * @ticket 35512 3505 * 3506 * @covers WP_Comment_Query::query 3286 3507 */ 3287 3508 public function test_post_status_any_should_override_other_post_statuses() { … … 3304 3525 /** 3305 3526 * @ticket 35512 3527 * 3528 * @covers WP_Comment_Query::query 3306 3529 */ 3307 3530 public function test_post_status_any_as_part_of_an_array_of_post_statuses() { … … 3324 3547 /** 3325 3548 * @ticket 24826 3549 * 3550 * @covers WP_Comment_Query::__construct 3551 * @covers WP_Comment_Query::get_comments 3326 3552 */ 3327 3553 public function test_comment_query_object() { … … 3344 3570 /** 3345 3571 * @ticket 22400 3572 * 3573 * @covers WP_Comment_Query::query 3346 3574 */ 3347 3575 public function test_comment_cache_key_should_ignore_custom_params() { … … 3375 3603 /** 3376 3604 * @ticket 35677 3605 * 3606 * @covers WP_Comment_Query::__construct 3377 3607 */ 3378 3608 public function test_cache_should_be_sensitive_to_parent__in() { … … 3398 3628 /** 3399 3629 * @ticket 35677 3630 * 3631 * @covers WP_Comment_Query::__construct 3400 3632 */ 3401 3633 public function test_cache_should_be_sensitive_to_parent__not_in() { … … 3421 3653 /** 3422 3654 * @ticket 32762 3655 * 3656 * @covers WP_Comment_Query::__construct 3423 3657 */ 3424 3658 public function test_it_should_be_possible_to_modify_meta_query_using_pre_get_comments_action() { … … 3459 3693 /** 3460 3694 * @ticket 32762 3695 * 3696 * @covers WP_Comment_Query::__construct 3461 3697 */ 3462 3698 public function test_it_should_be_possible_to_modify_meta_params_using_pre_get_comments_action() { … … 3491 3727 /** 3492 3728 * @ticket 33882 3729 * 3730 * @covers WP_Comment_Query::__construct 3493 3731 */ 3494 3732 public function test_parent__in() { … … 3520 3758 /** 3521 3759 * @ticket 33882 3760 * 3761 * @covers WP_Comment_Query::__construct 3522 3762 */ 3523 3763 public function test_parent__in_commas() { … … 3562 3802 /** 3563 3803 * @ticket 33882 3804 * 3805 * @covers WP_Comment_Query::__construct 3564 3806 */ 3565 3807 public function test_parent__not_in() { … … 3592 3834 /** 3593 3835 * @ticket 33882 3836 * 3837 * @covers WP_Comment_Query::__construct 3594 3838 */ 3595 3839 public function test_parent__not_in_commas() { … … 3635 3879 /** 3636 3880 * @ticket 33883 3881 * 3882 * @covers WP_Comment_Query::__construct 3637 3883 */ 3638 3884 public function test_orderby_comment__in() { … … 3678 3924 /** 3679 3925 * @ticket 8071 3926 * 3927 * @covers WP_Comment_Query::__construct 3680 3928 */ 3681 3929 public function test_no_found_rows_should_default_to_true() { … … 3695 3943 /** 3696 3944 * @ticket 8071 3945 * 3946 * @covers WP_Comment_Query::__construct 3697 3947 */ 3698 3948 public function test_should_respect_no_found_rows_true() { … … 3713 3963 /** 3714 3964 * @ticket 8071 3965 * 3966 * @covers WP_Comment_Query::__construct 3715 3967 */ 3716 3968 public function test_should_respect_no_found_rows_false() { … … 3731 3983 /** 3732 3984 * @ticket 37184 3985 * 3986 * @covers WP_Comment_Query::__construct 3733 3987 */ 3734 3988 public function test_found_rows_should_be_fetched_from_the_cache() { … … 3758 4012 /** 3759 4013 * @ticket 8071 4014 * 4015 * @covers WP_Comment_Query::__construct 3760 4016 */ 3761 4017 public function test_hierarchical_should_skip_child_comments_in_offset() { … … 3800 4056 /** 3801 4057 * @ticket 8071 4058 * 4059 * @covers WP_Comment_Query::__construct 3802 4060 */ 3803 4061 public function test_hierarchical_should_not_include_child_comments_in_number() { … … 3840 4098 /** 3841 4099 * @ticket 8071 4100 * 4101 * @covers WP_Comment_Query::__construct 3842 4102 */ 3843 4103 public function test_hierarchical_threaded() { … … 3918 4178 /** 3919 4179 * @ticket 8071 4180 * 4181 * @covers WP_Comment_Query::__construct 3920 4182 */ 3921 4183 public function test_hierarchical_threaded_approved() { … … 3994 4256 /** 3995 4257 * @ticket 35192 4258 * 4259 * @covers WP_Comment_Query::__construct 3996 4260 */ 3997 4261 public function test_comment_clauses_prepend_callback_should_be_respected_when_filling_descendants() { … … 4051 4315 /** 4052 4316 * @ticket 35192 4317 * 4318 * @covers WP_Comment_Query::__construct 4053 4319 */ 4054 4320 public function test_comment_clauses_append_callback_should_be_respected_when_filling_descendants() { … … 4108 4374 /** 4109 4375 * @ticket 36487 4376 * 4377 * @covers WP_Comment_Query::__construct 4110 4378 */ 4111 4379 public function test_cache_should_be_hit_when_querying_descendants() { … … 4164 4432 /** 4165 4433 * @ticket 37696 4434 * 4435 * @covers WP_Comment_Query::__construct 4166 4436 */ 4167 4437 public function test_hierarchy_should_be_filled_when_cache_is_incomplete() { … … 4226 4496 * @ticket 37966 4227 4497 * @ticket 37696 4498 * 4499 * @covers WP_Comment_Query::query 4228 4500 */ 4229 4501 public function test_fill_hierarchy_should_disregard_offset_and_number() { … … 4293 4565 /** 4294 4566 * @ticket 27571 4567 * 4568 * @covers WP_Comment_Query::__construct 4295 4569 */ 4296 4570 public function test_update_comment_post_cache_should_be_disabled_by_default() { … … 4313 4587 /** 4314 4588 * @ticket 27571 4589 * 4590 * @covers WP_Comment_Query::__construct 4315 4591 */ 4316 4592 public function test_should_respect_update_comment_post_cache_true() { … … 4334 4610 /** 4335 4611 * @ticket 34138 4612 * 4613 * @covers WP_Comment_Query::__construct 4336 4614 */ 4337 4615 public function test_comment_objects_should_be_filled_from_cache() { … … 4362 4640 /** 4363 4641 * @ticket 34138 4642 * 4643 * @covers WP_Comment_Query::__construct 4364 4644 */ 4365 4645 public function test_comment_objects_should_be_fetched_from_database_when_suspend_cache_addition() { … … 4381 4661 } 4382 4662 4663 /** 4664 * @covers WP_Comment_Query::__construct 4665 */ 4383 4666 public function test_comment_query_should_be_cached() { 4384 4667 global $wpdb; … … 4411 4694 } 4412 4695 4696 /** 4697 * @covers WP_Comment_Query::__construct 4698 */ 4413 4699 public function test_created_comment_should_invalidate_query_cache() { 4414 4700 global $wpdb; … … 4441 4727 } 4442 4728 4729 /** 4730 * @covers WP_Comment_Query::__construct 4731 */ 4443 4732 public function test_updated_comment_should_invalidate_query_cache() { 4444 4733 global $wpdb; … … 4481 4770 } 4482 4771 4772 /** 4773 * @covers WP_Comment_Query::__construct 4774 */ 4483 4775 public function test_deleted_comment_should_invalidate_query_cache() { 4484 4776 global $wpdb; … … 4514 4806 } 4515 4807 4808 /** 4809 * @covers WP_Comment_Query::__construct 4810 */ 4516 4811 public function test_trashed_comment_should_invalidate_query_cache() { 4517 4812 global $wpdb; … … 4547 4842 } 4548 4843 4844 /** 4845 * @covers WP_Comment_Query::__construct 4846 */ 4549 4847 public function test_untrashed_comment_should_invalidate_query_cache() { 4550 4848 global $wpdb; … … 4582 4880 } 4583 4881 4882 /** 4883 * @covers WP_Comment_Query::__construct 4884 */ 4584 4885 public function test_spammed_comment_should_invalidate_query_cache() { 4585 4886 global $wpdb; … … 4615 4916 } 4616 4917 4918 /** 4919 * @covers WP_Comment_Query::__construct 4920 */ 4617 4921 public function test_unspammed_comment_should_invalidate_query_cache() { 4618 4922 global $wpdb; … … 4652 4956 /** 4653 4957 * @ticket 41348 4958 * 4959 * @covers WP_Comment_Query::query 4654 4960 */ 4655 4961 public function test_count_query_should_miss_noncount_cache() { … … 4681 4987 /** 4682 4988 * @ticket 41348 4989 * 4990 * @covers WP_Comment_Query::query 4683 4991 */ 4684 4992 public function test_count_query_should_hit_count_cache() { … … 4710 5018 /** 4711 5019 * @ticket 41348 5020 * 5021 * @covers WP_Comment_Query::query 4712 5022 */ 4713 5023 public function test_different_values_of_fields_should_share_cached_values() { … … 4738 5048 /** 4739 5049 * @ticket 40669 5050 * 5051 * @covers ::get_comments 4740 5052 */ 4741 5053 public function test_add_comment_meta_should_invalidate_query_cache() { … … 4787 5099 /** 4788 5100 * @ticket 40669 5101 * 5102 * @covers ::get_comments 4789 5103 */ 4790 5104 public function test_update_comment_meta_should_invalidate_query_cache() { … … 4836 5150 /** 4837 5151 * @ticket 40669 5152 * 5153 * @covers ::get_comments 4838 5154 */ 4839 5155 public function test_delete_comment_meta_should_invalidate_query_cache() { … … 4885 5201 /** 4886 5202 * @ticket 45800 5203 * 5204 * @covers WP_Comment_Query::query 4887 5205 */ 4888 5206 public function test_comments_pre_query_filter_should_bypass_database_query() { … … 4916 5234 /** 4917 5235 * @ticket 50521 5236 * 5237 * @covers WP_Comment_Query::query 4918 5238 */ 4919 5239 public function test_comments_pre_query_filter_should_set_comments_property() { … … 4945 5265 /** 4946 5266 * @ticket 55460 5267 * 5268 * @covers WP_Comment_Query::__construct 4947 5269 */ 4948 5270 public function test_comment_cache_key_should_ignore_unset_params() { … … 4972 5294 /** 4973 5295 * @ticket 55218 5296 * 5297 * @covers WP_Comment_Query::__construct 4974 5298 */ 4975 5299 public function test_unapproved_comment_with_meta_query_does_not_trigger_ambiguous_identifier_error() { -
trunk/tests/phpunit/tests/comment/slashes.php
r53557 r53863 38 38 /** 39 39 * Tests the extended model function that expects slashed data. 40 * 41 * @covers ::wp_new_comment 40 42 */ 41 43 public function test_wp_new_comment() { … … 77 79 /** 78 80 * Tests the controller function that expects slashed data. 81 * 82 * @covers ::edit_comment 79 83 */ 80 84 public function test_edit_comment() { … … 123 127 /** 124 128 * Tests the model function that expects slashed data. 129 * 130 * @covers ::wp_insert_comment 125 131 */ 126 132 public function test_wp_insert_comment() { … … 154 160 /** 155 161 * Tests the model function that expects slashed data. 162 * 163 * @covers ::wp_update_comment 156 164 */ 157 165 public function test_wp_update_comment() { -
trunk/tests/phpunit/tests/comment/template.php
r52010 r53863 20 20 } 21 21 22 /** 23 * @covers ::get_comments_number 24 */ 22 25 public function test_get_comments_number() { 23 26 $post_id = self::$post_id; … … 33 36 } 34 37 38 /** 39 * @covers ::get_comments_number 40 */ 35 41 public function test_get_comments_number_without_arg() { 36 42 $post_id = self::$post_id; … … 48 54 /** 49 55 * @ticket 48772 56 * 57 * @covers ::get_comments_number_text 50 58 */ 51 59 public function test_get_comments_number_text_with_post_id() { … … 67 75 /** 68 76 * @ticket 13651 77 * 78 * @covers ::get_comments_number_text 69 79 */ 70 80 public function test_get_comments_number_text_declension_with_default_args() { … … 90 100 * @ticket 13651 91 101 * @dataProvider data_get_comments_number_text_declension 102 * 103 * @covers ::get_comments_number_text 92 104 */ 93 105 public function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) { -
trunk/tests/phpunit/tests/comment/walker.php
r52010 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::wp_list_comments 5 7 */ 6 8 class Tests_Comment_Walker extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/wpAllowComment.php
r49603 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::wp_allow_comment 5 7 */ 6 8 class Tests_Comment_WpAllowComment extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php
r48937 r53863 3 3 /** 4 4 * @group comment 5 * 5 6 * @covers ::_wp_batch_update_comment_type 6 7 */ -
trunk/tests/phpunit/tests/comment/wpComment.php
r49603 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers WP_Comment::get_instance 5 7 */ 6 8 class Tests_Term_WpComment extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/wpCountComments.php
r48937 r53863 1 1 <?php 2 2 3 /** 4 * @group comment 5 * 6 * Class Tests_WP_Count_Comments 7 * 8 * @covers ::wp_count_comments 9 */ 3 10 class Tests_WP_Count_Comments extends WP_UnitTestCase { 4 11 -
trunk/tests/phpunit/tests/comment/wpListComments.php
r47122 r53863 3 3 /** 4 4 * @group comment 5 * 6 * @covers ::wp_list_comments 5 7 */ 6 8 class Tests_Comment_WpListComments extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php
r37447 r53863 3 3 /** 4 4 * @group comment 5 * 5 6 * @covers ::wp_update_comment_count_now 6 7 */
Note: See TracChangeset
for help on using the changeset viewer.