Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

Events tests.

Copyright: 2014 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 399 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/tests/fixtures/event_fixtures.php

Defines 1 class


Class: events_test  - X-Ref

setUp()   X-Ref
Test set up.

This is executed before running any test in this file.

test_course_category_created()   X-Ref
Test the course category created event.


test_course_category_updated()   X-Ref
Test the course category updated event.


test_email_failed()   X-Ref
Test the email failed event.

It's not possible to use the moodle API to simulate the failure of sending
an email, so here we simply create the event and trigger it.

test_course_user_report_viewed()   X-Ref
There is no api involved so the best we can do is test legacy data by triggering event manually.


test_course_viewed()   X-Ref
There is no api involved so the best we can do is test legacy data by triggering event manually.


test_recent_capability_viewed()   X-Ref
No description

test_user_profile_viewed()   X-Ref
No description

test_grade_viewed()   X-Ref
There is no API associated with this event, so we will just test standard features.


test_database_text_field_content_replaced()   X-Ref
Test the database text field content replaced event.