Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Class: schedule_test  - X-Ref

Unit tests for the schedule helper class

test_create_schedule()   X-Ref
Test create schedule


test_update_schedule()   X-Ref
Test update schedule


test_update_schedule_invalid()   X-Ref
Test update invalid schedule


test_toggle_schedule()   X-Ref
Test toggle schedule


test_toggle_schedule_invalid()   X-Ref
Test toggle invalid schedule


test_delete_schedule()   X-Ref
Test delete schedule


test_delete_schedule_invalid()   X-Ref
Test delete invalid schedule


test_get_schedule_report_users()   X-Ref
Test getting schedule report users (those in matching audience)


test_get_schedule_report_count()   X-Ref
Test getting schedule report row count


get_schedule_report_file_format()   X-Ref
Data provider for {@see test_get_schedule_report_file}

return: string[]

test_get_schedule_report_file(string $format)   X-Ref
Test getting schedule report exported file, in each supported format

param: string $format

should_send_schedule_provider()   X-Ref
Data provider for {@see test_should_send_schedule}

return: array[]

test_should_send_schedule(array $properties, bool $expected)   X-Ref
Test for whether a schedule should be sent

param: array $properties
param: bool $expected

calculate_next_send_time_provider()   X-Ref
Data provider for {@see test_calculate_next_send_time}

return: array[]

test_calculate_next_send_time(int $recurrence, int $timescheduled, int $timenow, int $expected)   X-Ref
Test for calculating next schedule send time

param: int $recurrence
param: int $timescheduled
param: int $timenow
param: int $expected