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 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

Event mapper test.

Copyright: 2017 Cameron Ball <cameron@cameron1729.xyz>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 472 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 classes

event_mapper_test:: (6 methods):
  test_from_legacy_event_to_event()
  test_from_event_to_legacy_event()
  test_from_event_to_stdclass()
  test_from_event_to_assoc_array()
  test_from_action_event_to_legacy_event()
  create_event()

event_mapper_test_event_factory:: (1 method):
  create_instance()

event_mapper_test_action_event:: (17 methods):
  __construct()
  get_id()
  get_name()
  get_description()
  get_location()
  get_category()
  get_course()
  get_course_module()
  get_group()
  get_user()
  get_type()
  get_times()
  get_repeats()
  get_subscription()
  is_visible()
  get_action()
  get_component()

event_mapper_test_event:: (16 methods):
  __construct()
  get_id()
  get_name()
  get_description()
  get_location()
  get_category()
  get_course()
  get_course_module()
  get_group()
  get_user()
  get_type()
  get_times()
  get_repeats()
  get_subscription()
  is_visible()
  get_component()

event_mapper_test_proxy:: (3 methods):
  __construct()
  get()
  get_proxied_instance()

core_calendar_event_mapper_test_event_collection:: (4 methods):
  __construct()
  get_id()
  get_num()
  getIterator()


Class: event_mapper_test  - X-Ref

Event mapper test.

test_from_legacy_event_to_event()   X-Ref
Test legacy event -> event.


test_from_event_to_legacy_event()   X-Ref
Test event -> legacy event.


test_from_event_to_stdclass()   X-Ref
Test event -> stdClass.


test_from_event_to_assoc_array()   X-Ref
Test event -> array.


test_from_action_event_to_legacy_event()   X-Ref
Test for action event -> legacy event.


create_event($properties = [])   X-Ref
Helper function to create calendar events using the old code.

param: array $properties A list of calendar event properties to set
return: calendar_event

Class: event_mapper_test_event_factory  - X-Ref

A test event factory.

create_instance(\stdClass $dbrow)   X-Ref
No description

Class: event_mapper_test_action_event  - X-Ref

A test action event

__construct(event_interface $event)   X-Ref
event_mapper_test_action_event constructor.

param: event_interface $event

get_id()   X-Ref
No description

get_name()   X-Ref
No description

get_description()   X-Ref
No description

get_location()   X-Ref
No description

get_category()   X-Ref
No description

get_course()   X-Ref
No description

get_course_module()   X-Ref
No description

get_group()   X-Ref
No description

get_user()   X-Ref
No description

get_type()   X-Ref
No description

get_times()   X-Ref
No description

get_repeats()   X-Ref
No description

get_subscription()   X-Ref
No description

is_visible()   X-Ref
No description

get_action()   X-Ref
No description

get_component()   X-Ref
Component

return: string|null

Class: event_mapper_test_event  - X-Ref

A test event.

__construct($legacyevent = null)   X-Ref
Constructor.

param: calendar_event $legacyevent Legacy event to extract IDs etc from.

get_id()   X-Ref
No description

get_name()   X-Ref
No description

get_description()   X-Ref
No description

get_location()   X-Ref
No description

get_category()   X-Ref
No description

get_course()   X-Ref
No description

get_course_module()   X-Ref
No description

get_group()   X-Ref
No description

get_user()   X-Ref
No description

get_type()   X-Ref
No description

get_times()   X-Ref
No description

get_repeats()   X-Ref
No description

get_subscription()   X-Ref
No description

is_visible()   X-Ref
No description

get_component()   X-Ref
Component

return: string|null

Class: event_mapper_test_proxy  - X-Ref

A test proxy.

__construct($id, $params = [])   X-Ref
Constructor.

param: int   $id Proxied ID.
param: array $params Params to proxy.

get($member)   X-Ref
No description

get_proxied_instance()   X-Ref
No description

Class: core_calendar_event_mapper_test_event_collection  - X-Ref

A test event.

__construct()   X-Ref
Constructor.


get_id()   X-Ref
No description

get_num()   X-Ref
No description

getIterator()   X-Ref
No description