Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: mock_hooks  - X-Ref

Class mock_hooks

set_calling_arguments($callingarguments)   X-Ref
Set calling arguments.

This is supposed to be used in the callbacks to store arguments passed to callback.

param: array $callingarguments

get_calling_arguments()   X-Ref
Get calling arguments.

This is supposed to be used in the test to verify arguments passed to callback.
This method also reset stored calling arguments.

return: array $callingarguments

get_can_course_category_delete_return()   X-Ref
Get can_course_category_delete callback return.

return: bool

set_can_course_category_delete_return(bool $return)   X-Ref
Sets can_course_category_delete callback return.

param: bool $return

get_can_course_category_delete_move_return()   X-Ref
Get can_course_category_delete_move callback return.

return: bool

set_can_course_category_delete_move_return(bool $return)   X-Ref
Sets can_course_category_delete_move callback return.

param: bool $return

get_get_course_category_contents_return()   X-Ref
Get get_course_category_contents callback return.

return: string

set_get_course_category_contents_return(string $return)   X-Ref
Sets get_course_category_contents callback return.

param: string $return

tool_unittest_pre_course_category_delete(object $category)   X-Ref
Test pre_course_category_delete callback.

param: object $category

tool_unittest_pre_course_category_delete_move(core_course_category $category, core_course_category $newcategory)   X-Ref
Test pre_course_category_delete_move callback.

param: core_course_category $category
param: core_course_category $newcategory

tool_unittest_can_course_category_delete(core_course_category $category)   X-Ref
Test can_course_category_delete callback.

param: core_course_category $category
return: bool

tool_unittest_can_course_category_delete_move(core_course_category $category, core_course_category $newcategory)   X-Ref
Test can_course_category_delete_move callback.

param: core_course_category $category
param: core_course_category $newcategory
return: bool

tool_unittest_get_course_category_contents(core_course_category $category)   X-Ref
Test get_course_category_contents callback.

param: core_course_category $category
return: string