2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Fixtures for Inbound Message tests.
20 * @package core_message
21 * @copyright 2014 Andrew Nicols
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') ||
die();
29 * A base handler for unit testing.
31 * @copyright 2014 Andrew Nicols
32 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34 class handler_base
extends \core\message\inbound\handler
{
36 * Get the description for unit tests.
38 public function get_description() {
42 * Get the name for unit tests.
44 public function get_name() {
48 * Process a message for unit tests.
50 * @param stdClass $record The record to process
51 * @param stdClass $messagedata The message data
53 public function process_message(\stdClass
$record, \stdClass
$messagedata) {
58 * A handler for unit testing.
60 * @copyright 2014 Andrew Nicols
61 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
63 class handler_one
extends handler_base
{
67 * A handler for unit testing.
69 * @copyright 2014 Andrew Nicols
70 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
72 class handler_two
extends handler_base
{
76 * A handler for unit testing.
78 * @copyright 2014 Andrew Nicols
79 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
81 class handler_three
extends handler_base
{
85 * A handler for unit testing.
87 * @copyright 2014 Andrew Nicols
88 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
90 class handler_four
extends handler_base
{