Changeset 53863 for trunk/tests/phpunit/tests/comment-submission.php
- Timestamp:
- 08/08/2022 11:12:30 PM (3 years ago)
- File:
-
- 1 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() {
Note: See TracChangeset
for help on using the changeset viewer.