Changeset 53564
- Timestamp:
- 06/23/2022 08:41:22 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/cron.php
r53492 r53564 31 31 } 32 32 33 /** 34 * @covers ::wp_get_schedule 35 */ 33 36 public function test_wp_get_schedule_empty() { 34 37 // Nothing scheduled. … … 37 40 } 38 41 42 /** 43 * @covers ::wp_schedule_single_event 44 */ 39 45 public function test_schedule_event_single() { 40 46 // Schedule an event and make sure it's returned by wp_next_scheduled(). … … 51 57 } 52 58 59 /** 60 * @covers ::wp_schedule_single_event 61 */ 53 62 public function test_schedule_event_single_args() { 54 63 // Schedule an event with arguments and make sure it's returned by wp_next_scheduled(). … … 69 78 } 70 79 80 /** 81 * @covers ::wp_schedule_event 82 */ 71 83 public function test_schedule_event() { 72 84 // Schedule an event and make sure it's returned by wp_next_scheduled(). … … 83 95 } 84 96 97 /** 98 * @covers ::wp_schedule_event 99 */ 85 100 public function test_schedule_event_args() { 86 101 // Schedule an event and make sure it's returned by wp_next_scheduled(). … … 103 118 /** 104 119 * Tests that a call to wp_schedule_event() on a site without any scheduled events 105 * does not result in a PHP deprecation noticeon PHP 8.1 or higher.106 * 107 * The noticethat we should not see:120 * does not result in a PHP deprecation warning on PHP 8.1 or higher. 121 * 122 * The warning that we should not see: 108 123 * `Deprecated: Automatic conversion of false to array is deprecated`. 109 124 * … … 112 127 * @covers ::wp_schedule_event 113 128 */ 114 public function test_wp_schedule_event_without_cron_option_does_not_throw_ deprecation_notice() {129 public function test_wp_schedule_event_without_cron_option_does_not_throw_warning() { 115 130 delete_option( 'cron' ); 116 131 … … 149 164 } 150 165 166 /** 167 * @covers ::wp_unschedule_event 168 */ 151 169 public function test_unschedule_event() { 152 170 // Schedule an event and make sure it's returned by wp_next_scheduled(). … … 163 181 } 164 182 183 /** 184 * @covers ::wp_clear_scheduled_hook 185 */ 165 186 public function test_clear_schedule() { 166 187 $hook = __FUNCTION__; … … 190 211 } 191 212 213 /** 214 * @covers ::wp_clear_scheduled_hook 215 */ 192 216 public function test_clear_undefined_schedule() { 193 217 $hook = __FUNCTION__; … … 202 226 } 203 227 228 /** 229 * @covers ::wp_clear_scheduled_hook 230 */ 204 231 public function test_clear_schedule_multiple_args() { 205 232 $hook = __FUNCTION__; … … 230 257 /** 231 258 * @ticket 10468 259 * 260 * @covers ::wp_clear_scheduled_hook 232 261 */ 233 262 public function test_clear_schedule_new_args() { … … 268 297 /** 269 298 * @ticket 18997 299 * 300 * @covers ::wp_unschedule_hook 270 301 */ 271 302 public function test_unschedule_hook() { … … 289 320 } 290 321 322 /** 323 * @covers ::wp_unschedule_hook 324 */ 291 325 public function test_unschedule_undefined_hook() { 292 326 $hook = __FUNCTION__; … … 309 343 /** 310 344 * @ticket 6966 345 * 346 * @covers ::wp_schedule_single_event 311 347 */ 312 348 public function test_duplicate_event() { … … 332 368 /** 333 369 * @ticket 6966 370 * 371 * @covers ::wp_schedule_single_event 334 372 */ 335 373 public function test_not_duplicate_event() { … … 352 390 } 353 391 392 /** 393 * @covers ::wp_schedule_single_event 394 */ 354 395 public function test_not_duplicate_event_reversed() { 355 396 // Duplicate events far apart should work normally regardless of order. … … 376 417 * 377 418 * @ticket 32656 419 * 420 * @covers ::wp_schedule_single_event 421 * @covers ::wp_schedule_event 378 422 */ 379 423 public function test_pre_schedule_event_filter() { … … 428 472 * 429 473 * @ticket 32656 474 * 475 * @covers ::wp_reschedule_event 430 476 */ 431 477 public function test_pre_reschedule_event_filter() { … … 452 498 * 453 499 * @ticket 32656 500 * 501 * @covers ::wp_unschedule_event 454 502 */ 455 503 public function test_pre_unschedule_event_filter() { … … 476 524 * 477 525 * @ticket 32656 526 * 527 * @covers ::wp_clear_scheduled_hook 528 * @covers ::wp_unschedule_hook 478 529 */ 479 530 public function test_pre_clear_scheduled_hook_filters() { … … 507 558 * 508 559 * @ticket 32656 560 * 561 * @covers ::wp_get_scheduled_event 562 * @covers ::wp_next_scheduled 509 563 */ 510 564 public function test_pre_scheduled_event_hooks() { … … 541 595 * 542 596 * @ticket 45976. 597 * 598 * @covers ::wp_get_scheduled_event 543 599 */ 544 600 public function test_get_scheduled_event_singles() { … … 584 640 * 585 641 * @ticket 45976. 642 * 643 * @covers ::wp_get_scheduled_event 586 644 */ 587 645 public function test_get_scheduled_event_recurring() { … … 628 686 * 629 687 * @ticket 45976. 688 * 689 * @covers ::wp_get_scheduled_event 630 690 */ 631 691 public function test_get_scheduled_event_false() { … … 653 713 * 654 714 * @ticket 44818 715 * 716 * @covers ::wp_schedule_single_event 655 717 */ 656 718 public function test_duplicate_past_event() { … … 680 742 * 681 743 * @ticket 44818 744 * 745 * @covers ::wp_schedule_single_event 682 746 */ 683 747 public function test_duplicate_near_future_event() { … … 708 772 * 709 773 * @ticket 44818 774 * 775 * @covers ::wp_schedule_single_event 710 776 */ 711 777 public function test_duplicate_future_event() { … … 732 798 * 733 799 * @ticket 44818 800 * 801 * @covers ::wp_schedule_single_event 734 802 */ 735 803 public function test_not_duplicate_future_event() { … … 750 818 /** 751 819 * @ticket 49961 820 * 821 * @covers ::wp_schedule_single_event 822 * @covers ::wp_schedule_event 823 * @covers ::wp_reschedule_event 824 * @covers ::wp_unschedule_event 752 825 */ 753 826 public function test_invalid_timestamp_for_event_returns_error() { … … 772 845 /** 773 846 * @ticket 49961 847 * 848 * @covers ::wp_schedule_event 849 * @covers ::wp_reschedule_event 774 850 */ 775 851 public function test_invalid_recurrence_for_event_returns_error() { … … 786 862 /** 787 863 * @ticket 49961 864 * 865 * @covers ::wp_schedule_single_event 866 * @covers ::wp_schedule_event 867 * @covers ::wp_reschedule_event 788 868 */ 789 869 public function test_disallowed_event_returns_false_when_wp_error_is_set_to_false() { … … 801 881 /** 802 882 * @ticket 49961 883 * 884 * @covers ::wp_schedule_single_event 885 * @covers ::wp_schedule_event 886 * @covers ::wp_reschedule_event 803 887 */ 804 888 public function test_disallowed_event_returns_error_when_wp_error_is_set_to_true() { … … 821 905 /** 822 906 * @ticket 49961 907 * 908 * @covers ::wp_schedule_single_event 909 * @covers ::wp_schedule_event 910 * @covers ::wp_reschedule_event 823 911 */ 824 912 public function test_schedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() { … … 849 937 /** 850 938 * @ticket 49961 939 * 940 * @covers ::wp_schedule_single_event 941 * @covers ::wp_schedule_event 942 * @covers ::wp_reschedule_event 851 943 */ 852 944 public function test_schedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() { … … 882 974 /** 883 975 * @ticket 49961 976 * 977 * @covers ::wp_schedule_single_event 978 * @covers ::wp_schedule_event 979 * @covers ::wp_reschedule_event 884 980 */ 885 981 public function test_schedule_short_circuit_with_false_returns_false_when_wp_error_is_set_to_false() { … … 901 997 /** 902 998 * @ticket 49961 999 * 1000 * @covers ::wp_schedule_single_event 1001 * @covers ::wp_schedule_event 1002 * @covers ::wp_reschedule_event 903 1003 */ 904 1004 public function test_schedule_short_circuit_with_false_returns_error_when_wp_error_is_set_to_true() { … … 926 1026 * @ticket 49961 927 1027 * @expectedDeprecated wp_clear_scheduled_hook 1028 * 1029 * @covers ::wp_clear_scheduled_hook 928 1030 */ 929 1031 public function test_deprecated_argument_usage_of_wp_clear_scheduled_hook() { … … 944 1046 /** 945 1047 * @ticket 49961 1048 * 1049 * @covers ::wp_clear_scheduled_hook 946 1050 */ 947 1051 public function test_clear_scheduled_hook_returns_default_pre_filter_error_when_wp_error_is_set_to_true() { … … 965 1069 /** 966 1070 * @ticket 49961 1071 * 1072 * @covers ::wp_clear_scheduled_hook 967 1073 */ 968 1074 public function test_clear_scheduled_hook_returns_custom_pre_filter_error_when_wp_error_is_set_to_true() { … … 998 1104 /** 999 1105 * @ticket 49961 1106 * 1107 * @covers ::wp_unschedule_hook 1000 1108 */ 1001 1109 public function test_unschedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() { … … 1021 1129 /** 1022 1130 * @ticket 49961 1131 * 1132 * @covers ::wp_unschedule_hook 1023 1133 */ 1024 1134 public function test_unschedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() { … … 1045 1155 /** 1046 1156 * @ticket 49961 1157 * 1158 * @covers ::wp_unschedule_hook 1047 1159 */ 1048 1160 public function test_unschedule_short_circuit_with_false_returns_false_when_wp_error_is_set_to_false() { … … 1059 1171 /** 1060 1172 * @ticket 49961 1173 * 1174 * @covers ::wp_unschedule_hook 1061 1175 */ 1062 1176 public function test_unschedule_short_circuit_with_false_returns_error_when_wp_error_is_set_to_true() { … … 1074 1188 /** 1075 1189 * @ticket 49961 1190 * 1191 * @covers ::wp_schedule_single_event 1076 1192 */ 1077 1193 public function test_cron_array_error_is_returned_when_scheduling_single_event() { … … 1094 1210 /** 1095 1211 * @ticket 49961 1212 * 1213 * @covers ::wp_schedule_event 1096 1214 */ 1097 1215 public function test_cron_array_error_is_returned_when_scheduling_event() { … … 1114 1232 /** 1115 1233 * @ticket 49961 1234 * 1235 * @covers ::wp_unschedule_hook 1116 1236 */ 1117 1237 public function test_cron_array_error_is_returned_when_unscheduling_hook() { … … 1138 1258 /** 1139 1259 * @ticket 49961 1260 * 1261 * @covers ::wp_unschedule_event 1140 1262 */ 1141 1263 public function test_cron_array_error_is_returned_when_unscheduling_event() { -
trunk/tests/phpunit/tests/cron/setCronArray.php
r53492 r53564 25 25 * 26 26 * Includes verifying that invalid input - typically `false` - does not result in a PHP 27 * deprecation noticeon PHP 8.1 or higher.27 * deprecation warning on PHP 8.1 or higher. 28 28 * 29 * The noticethat we should not see:29 * The warning that we should not see: 30 30 * `Deprecated: Automatic conversion of false to array is deprecated`. 31 31 *
Note: See TracChangeset
for help on using the changeset viewer.