Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

Tests for class core_course_category methods invoking hooks.

Copyright: 2020 Ruslan Kabalin
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 216 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: category_hooks_test  - X-Ref

Functional test for class core_course_category methods invoking hooks.

setUp()   X-Ref
No description

get_mock_category(\core_course_category $category, string $callback = '')   X-Ref
Provides mocked category configured for named callback function.

get_plugins_callback_function will return callable prefixed with `tool_unittest_`,
the actual callbacks are defined in mock_hooks.php fixture file.

param: core_course_category $category Category to mock
param: string $callback Callback function used in method we test.
return: MockObject

test_can_course_category_delete_hook()   X-Ref
No description

test_can_course_category_delete_move_hook()   X-Ref
No description

test_pre_course_category_delete_hook()   X-Ref
No description

test_pre_course_category_delete_move_hook()   X-Ref
No description

test_get_course_category_contents_hook()   X-Ref
No description