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 39 and 401]

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