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.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Tests for class core_course_category

Copyright: 2013 Marina Glancy
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1105 lines (59 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_course_category_testcase  - X-Ref

Functional test 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.