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] [Versions 401 and 403]

(no description)

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

Defines 1 class


Class: send_schedule_test  - X-Ref

Unit tests for ad-hoc task for sending report schedule

execute_report_viewas_user_provider()   X-Ref
Data provider for {@see test_execute_viewas_user}

return: array[]

test_execute_report_viewas_user(?int $viewasuser,?string $viewasusername,string $useronesees,string $usertwosees)   X-Ref
Test executing task for a schedule with differing "View as user" configuration

param: int|null $viewasuser
param: string|null $viewasusername
param: string $useronesees
param: string $usertwosees

test_execute_report_viewas_user_invalid()   X-Ref
Test executing task where the schedule "View as user" is an inactive account


test_execute_report_empty()   X-Ref
Test executing task for a schedule that is configured to not send empty reports


test_execute_schedule_no_recipients()   X-Ref
Test executing task for a schedule that contains no recipients


test_execute_schedule_creator_invalid()   X-Ref
Test executing task where the schedule creator is an inactive account


test_execute_schedule_invalid()   X-Ref
Test executing task given invalid schedule data


extract_message_attachment(string $messagebody)   X-Ref
Given a multi-part message in MIME format, return the base64 encoded attachment contained within

param: string $messagebody
return: string