Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

(no description)

File Size: 281 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