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