Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: core_adhoc_task_testcase  - X-Ref

Test class for adhoc tasks.

test_get_next_adhoc_task_now()   X-Ref
Test basic adhoc task execution.


test_get_next_adhoc_task_fail_retry()   X-Ref
Test adhoc task failure retry backoff.


test_get_next_adhoc_task_future()   X-Ref
Test future adhoc task execution.


test_get_adhoc_tasks_empty_set()   X-Ref
Test empty set of adhoc tasks


test_get_adhoc_tasks_result_set()   X-Ref
Test correct set of adhoc tasks is returned for class.


test_reschedule_or_queue_adhoc_task_no_existing()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if no tasks exist.


test_reschedule_or_queue_adhoc_task_different_user()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if a task for the same user does
not exist.


test_reschedule_or_queue_adhoc_task_different_data()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if a task with different custom
data exists.


test_reschedule_or_queue_adhoc_task_match_no_change()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will not make any change for matching data if no time was
specified.


test_reschedule_or_queue_adhoc_task_match_update_runtime()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will update the run time if there are planned changes.


test_queue_adhoc_task_if_not_scheduled()   X-Ref
Test queue_adhoc_task "if not scheduled".


test_adhoc_task_user_empty()   X-Ref
Test that when no userid is specified, it returns empty from the DB
too.


test_adhoc_task_user_set()   X-Ref
Test that when a userid is specified, that userid is subsequently
returned.


test_get_concurrency_limit()   X-Ref
Test get_concurrency_limit() method to return 0 by default.


test_get_concurrency_limit_default()   X-Ref
Test get_concurrency_limit() method to return a default value set in config.


test_get_concurrency_limit_for_task()   X-Ref
Test get_concurrency_limit() method to return a value for specific task class.


test_get_next_adhoc_task_sorting()   X-Ref
Test adhoc task sorting.