Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 421 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


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