See Release Notes
Long Term Support Release
Differences Between: [Versions 311 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
(no description)
File Size: | 987 lines (40 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/tests/fixtures/task_fixtures.php |
scheduled_task_test:: (25 methods):
eval_cron_provider()
test_eval_cron_field()
test_get_next_scheduled_time()
get_next_scheduled_time_detail_provider()
test_get_next_scheduled_time_detail()
test_get_next_scheduled_time_dst_continuity()
test_timezones()
test_reset_scheduled_tasks_for_component_customised()
test_reset_scheduled_tasks_for_component_deleted()
test_reset_scheduled_tasks_for_component_changed_in_source()
test_reset_scheduled_tasks_for_component_delete()
test_get_next_scheduled_task()
test_get_broken_scheduled_task()
test_random_time_specification()
test_file_temp_cleanup_task()
test_clear_fail_delay()
provider_schedule_overrides()
test_scheduled_task_override_values()
test_scheduled_task_overridden_task_can_run()
assertTaskEquals()
assertTaskNotEquals()
test_reset_scheduled_tasks_for_component_keeps_original_lastruntime()
is_component_enabled_provider()
test_is_component_enabled()
test_is_component_enabled_core()
Class: scheduled_task_test - X-Ref
Test class for scheduled task.eval_cron_provider() X-Ref |
Data provider for {@see test_eval_cron_field} return: array |
test_eval_cron_field(string $field, int $min, int $max, array $expected) X-Ref |
Test the cron scheduling method param: string $field param: int $min param: int $max param: int[] $expected |
test_get_next_scheduled_time() X-Ref |
No description |
get_next_scheduled_time_detail_provider() X-Ref |
Data provider for get_next_scheduled_time_detail. Note all times in here are in default Australia/Perth time zone. return: array[] Function parameters for each run |
test_get_next_scheduled_time_detail(string $now, string $minute, string $hour,string $day, string $dayofweek, string $month, $expected) X-Ref |
Tests get_next_scheduled_time using a large number of example scenarios. param: string $now Current time (strtotime format) param: string $minute Minute restriction list for task param: string $hour Hour restriction list for task param: string $day Day restriction list for task param: string $dayofweek Day of week restriction list for task param: string $month Month restriction list for task param: string|int $expected Expected run time (strtotime format or time int) |
test_get_next_scheduled_time_dst_continuity() X-Ref |
Tests get_next_scheduled_time around DST changes, with regard to the continuity of frequent tasks. We want frequent tasks to keep progressing as normal and not randomly stop for an hour, or suddenly decide they need to happen in the past. |
test_timezones() X-Ref |
No description |
test_reset_scheduled_tasks_for_component_customised() X-Ref |
No description |
test_reset_scheduled_tasks_for_component_deleted() X-Ref |
No description |
test_reset_scheduled_tasks_for_component_changed_in_source() X-Ref |
No description |
test_reset_scheduled_tasks_for_component_delete() X-Ref |
Tests that the reset function deletes old tasks. |
test_get_next_scheduled_task() X-Ref |
No description |
test_get_broken_scheduled_task() X-Ref |
No description |
test_random_time_specification() X-Ref |
Tests the use of 'R' syntax in time fields of tasks to get tasks be configured with a non-uniform time. |
test_file_temp_cleanup_task() X-Ref |
Test that the file_temp_cleanup_task removes directories and files as expected. |
test_clear_fail_delay() X-Ref |
Test that the function to clear the fail delay from a task works correctly. |
provider_schedule_overrides() X-Ref |
Data provider for test_scheduled_task_override_values. |
test_scheduled_task_override_values(array $overrides, array $tasks, array $expected) X-Ref |
Test to ensure scheduled tasks are updated by values set in config. param: array $overrides param: array $tasks param: array $expected |
test_scheduled_task_overridden_task_can_run() X-Ref |
Check that an overridden task is sent to be processed. |
assertTaskEquals(task_base $task, task_base $comparisontask) X-Ref |
Assert that the specified tasks are equal. param: \core\task\task_base $task param: \core\task\task_base $comparisontask |
assertTaskNotEquals(task_base $task, task_base $comparisontask) X-Ref |
Assert that the specified tasks are not equal. param: \core\task\task_base $task param: \core\task\task_base $comparisontask |
test_reset_scheduled_tasks_for_component_keeps_original_lastruntime() X-Ref |
Assert that the lastruntime column holds an original value after a scheduled task is reset. |
is_component_enabled_provider() X-Ref |
Data provider for {@see test_is_component_enabled} return: array[] |
test_is_component_enabled(string $component, bool $expected) X-Ref |
Tests whether tasks belonging to components consider the component to be enabled param: string $component param: bool $expected |
test_is_component_enabled_core() X-Ref |
Test whether tasks belonging to core components considers the component to be enabled |