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

Fixtures for new event testing.

Copyright: 2013 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 350 lines (10 kb)
Included or required: 5 times
Referenced: 8 times
Includes or requires: 0 files

Defines 24 classes

unittest_executed:: (7 methods):
  get_name()
  get_description()
  init()
  get_url()
  get_legacy_eventname()
  get_legacy_eventdata()
  get_legacy_logdata()

unittest_observer:: (7 methods):
  reset()
  observe_one()
  external_observer()
  broken_observer()
  observe_all()
  observe_all_alt()
  legacy_handler()

bad_event1:: (1 method):
  init()

bad_event2:: (1 method):
  init()

bad_event2b:: (1 method):
  init()

bad_event3:: (1 method):
  init()

bad_event4:: (1 method):
  init()

bad_event5:: (1 method):
  init()

bad_event6:: (1 method):
  init()

bad_event7:: (1 method):
  init()

bad_event8:: (1 method):
  init()

problematic_event1:: (1 method):
  init()

problematic_event2:: (1 method):
  init()

problematic_event3:: (2 methods):
  init()
  validate_data()

deprecated_event1:: (1 method):
  init()

noname_event:: (1 method):
  init()

course_module_viewed:: (1 method):
  init()

course_module_viewed_noinit:: (0 methods):

grade_report_viewed:: (0 methods):

context_used_in_event:: (5 methods):
  get_description()
  init()
  get_url()
  get_legacy_eventdata()
  get_legacy_logdata()

full_docblock:: (1 method):
  init()

docblock_test2:: (1 method):
  init()

docblock_test3:: (1 method):
  init()

static_info_viewing:: (1 method):
  init()


Class: unittest_executed  - X-Ref

get_name()   X-Ref
No description

get_description()   X-Ref
No description

init()   X-Ref
No description

get_url()   X-Ref
No description

get_legacy_eventname()   X-Ref
No description

get_legacy_eventdata()   X-Ref
No description

get_legacy_logdata()   X-Ref
No description

Class: unittest_observer  - X-Ref

reset()   X-Ref
No description

observe_one(unittest_executed $event)   X-Ref
No description

external_observer(unittest_executed $event)   X-Ref
No description

broken_observer(unittest_executed $event)   X-Ref
No description

observe_all(\core\event\base $event)   X-Ref
No description

observe_all_alt(\core\event\base $event)   X-Ref
No description

legacy_handler($data)   X-Ref
No description

Class: bad_event1  - X-Ref

init()   X-Ref
No description

Class: bad_event2  - X-Ref

init()   X-Ref
No description

Class: bad_event2b  - X-Ref

init()   X-Ref
No description

Class: bad_event3  - X-Ref

init()   X-Ref
No description

Class: bad_event4  - X-Ref

init()   X-Ref
No description

Class: bad_event5  - X-Ref

init()   X-Ref
No description

Class: bad_event6  - X-Ref

init()   X-Ref
No description

Class: bad_event7  - X-Ref

init()   X-Ref
No description

Class: bad_event8  - X-Ref

init()   X-Ref
No description

Class: problematic_event1  - X-Ref

init()   X-Ref
No description

Class: problematic_event2  - X-Ref

init()   X-Ref
No description

Class: problematic_event3  - X-Ref

init()   X-Ref
No description

validate_data()   X-Ref
No description

Class: deprecated_event1  - X-Ref

init()   X-Ref
No description

Class: noname_event  - X-Ref

init()   X-Ref
No description

Class: course_module_viewed  - X-Ref

Class course_module_viewed.

Wrapper for testing \core\event\course_module_viewed.
init()   X-Ref
No description

Class: course_module_viewed_noinit  - X-Ref

Class course_module_viewed_noinit.

Wrapper for testing \core\event\course_module_viewed.

Class: grade_report_viewed  - X-Ref

Event for testing core\event\grade_report_viewed.

Class: context_used_in_event  - X-Ref

Event to test context used in event functions

get_description()   X-Ref
No description

init()   X-Ref
No description

get_url()   X-Ref
No description

get_legacy_eventdata()   X-Ref
No description

get_legacy_logdata()   X-Ref
No description

Class: full_docblock  - X-Ref

This is an explanation of the event.
- I'm making a point here.
- I have a second {@link something}  point here.
- whitespace is intentional to test it's removal.

I have something else *Yeah* that.



init()   X-Ref
No description

Class: docblock_test2  - X-Ref

We have only the description in the docblock
and nothing else.

init()   X-Ref
No description

Class: docblock_test3  - X-Ref

Calendar event created event.

init()   X-Ref
No description

Class: static_info_viewing  - X-Ref

init()   X-Ref
No description