Search moodle.org's
Developer Documentation

  • Bug fixes for general core bugs in 3.7.x will end 11 May 2020 (12 months).
  • Bug fixes for security issues in 3.7.x will end 9 November 2020 (18 months) - Support has ended.
  • minimum PHP 7.1.0 Note: minimum PHP version has increased since Moodle 3.6. PHP 7.2.x and 7.3.x are supported too. PHP 7.x could have some engine limitations.
  • Differences Between: [Versions 35 and 37] [Versions 37 and 310] [Versions 37 and 311] [Versions 37 and 38] [Versions 37 and 39]

    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: 452 lines (13 kb)
    Included or required:0 times
    Referenced: 0 times
    Includes or requires: 0 files

    Defines 6 classes

    core_calendar_event_mapper_testcase:: (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:: (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_action()

    event_mapper_test_event:: (15 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()

    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: core_calendar_event_mapper_testcase  - X-Ref

    Event mapper testcase.

    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.

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

    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

    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

    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