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]

Fixture for mocking callbacks used in \core_course_category

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

Defines 1 class


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