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.

Class: category_test  - X-Ref

Tests for class core_course_category

setUp()   X-Ref
No description

get_roleid($context = null)   X-Ref
No description

assign_capability($capability, $permission = CAP_ALLOW, $contextid = null)   X-Ref
No description

test_create_coursecat()   X-Ref
No description

test_name_idnumber_exceptions()   X-Ref
No description

test_visibility()   X-Ref
No description

test_hierarchy()   X-Ref
No description

test_update()   X-Ref
No description

test_delete()   X-Ref
No description

test_get_children()   X-Ref
No description

test_get_all_children_ids()   X-Ref
Test the get_all_children_ids function.


test_count_all()   X-Ref
Test the countall function


test_is_simple_site()   X-Ref
Test the is_simple_site function


test_resort_courses()   X-Ref
Test a categories ability to resort courses.


test_get_search_courses()   X-Ref
No description

test_course_contacts()   X-Ref
No description

test_course_contacts_with_duplicates()   X-Ref
No description

test_overview_files()   X-Ref
No description

test_get_nested_name()   X-Ref
No description

test_coursecat_is_uservisible()   X-Ref
No description

test_current_user_coursecat_get()   X-Ref
No description

test_another_user_coursecat_get()   X-Ref
No description

fill_draft_area(array $files)   X-Ref
Creates a draft area for current user and fills it with fake files

param: array $files array of files that need to be added to filearea, filename => filecontents
return: int draftid for the filearea

test_get_courses_during_delete()   X-Ref
This test ensures that is the list of courses in a category can be retrieved while a course is being deleted.