Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

(no description)

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

Defines 1 class


Class: tool_monitor_task_check_subscriptions_testcase  - X-Ref

Unit tests for the tool_monitor clean events task.

setUp()   X-Ref
Test set up.


reload_subscription()   X-Ref
Reloads the subscription object from the DB.

return: void.

test_task_name()   X-Ref
Test to confirm the task is named correctly.


test_site_level_subscription()   X-Ref
Test to confirm that site level subscriptions are activated and deactivated according to system capabilities.


test_module_disabled()   X-Ref
Test to confirm that if the module is disabled, no changes are made to active subscriptions.


test_active_unaffected()   X-Ref
Test to confirm an active, valid subscription stays active once the scheduled task is run.


test_course_enrolment()   X-Ref
Test to confirm that a subscription for a user without an enrolment to the course is made inactive.


test_enrolled_user_with_no_capability()   X-Ref
Test to confirm that subscriptions for enrolled users without the required capability are made inactive.


test_can_access_course()   X-Ref
Test to confirm that subscriptions for users who fail can_access_course(), are deactivated.


test_cm_access()   X-Ref
Test to confirm that subscriptions for enrolled users who don't have CM access, are deactivated.


test_stale_subscription_removal()   X-Ref
Test to confirm that long term inactive subscriptions are removed entirely.


test_user_not_fully_set_up()   X-Ref
Test to confirm that subscriptions for a partially set up user are deactivated.


test_suspended_user()   X-Ref
Test to confirm that a suspended user's subscriptions are deactivated properly.