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]

    This file contains helper classes and functions for testing.

    Copyright: 2017 Ryan Wyllie <ryan@moodle.com>
    License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
    File Size: 158 lines (5 kb)
    Included or required: 5 times
    Referenced: 1 time
    Includes or requires: 0 files

    Defines 1 class

    action_event_test_factory:: (2 methods):
      __construct()
      create_instance()

    Defines 2 functions

      create_event()

    Class: action_event_test_factory  - X-Ref

    A test factory that will create action events.

    __construct($callback = null)   X-Ref
    A test factory that will create action events. The factory accepts a callback
    that will be used to determine if the event should be returned or not.

    The callback will be given the event and should return true if the event
    should be returned and false otherwise.

    param: callable $callback The callback.

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

    Functions that are not part of a class:

    create_event($properties)   X-Ref
    Create a calendar event with the given properties.

    return: \calendar_event
    param: array $properties The properties to set on the event