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]

Course and category management helper class tests.

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

Defines 1 class


Class: core_course_management_helper_test  - X-Ref

Class core_course_management_helper_test

This class tests \core_course\management\helper
get_user_objects(testing_data_generator $generator, $contextid)   X-Ref
Returns a user object and its assigned new role.

param: testing_data_generator $generator
param: $contextid
return: array The user object and the role ID

test_action_category_hide_and_show()   X-Ref
Tests:
- action_category_hide
- action_category_show

In order to show/hide the user must have moodle/category:manage on the parent context.
In order to view hidden categories the user must have moodle/category:viewhiddencategories

test_action_category_hide_and_show_by_id()   X-Ref
Tests hiding and showing of a category by its ID.

This mimics the logic of {@link test_action_category_hide_and_show()}

test_action_category_move_courses_into()   X-Ref
Test moving courses between categories.


test_action_category_movedown_and_moveup()   X-Ref
Test moving a categories up and down.


test_action_category_resort_courses()   X-Ref
Test resorting of courses within a category.

\core_course\management\helper::action_category_resort_courses

test_action_category_resort_subcategories()   X-Ref
Tests resorting sub categories of a course.

\core_course\management\helper::action_category_resort_courses

test_action_course_hide_show()   X-Ref
Test hiding and showing of a course.


test_action_course_hide_show_by_record()   X-Ref
Test hiding and showing of a course.


test_action_course_movedown_and_moveup()   X-Ref
Tests moving a course up and down by one.


test_get_category_listitem_actions()   X-Ref
Tests the fetching of actions for a category.


test_get_course_detail_actions()   X-Ref
Tests fetching the course actions.


test_get_course_detail_array()   X-Ref
Test fetching course details.


test_move_courses_into_category()   X-Ref
No description