[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/ -> management_helper_test.php (summary)

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: 1298 lines (66 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_course_management_helper_test:: (14 methods):
  get_user_objects()
  test_action_category_hide_and_show()
  test_action_category_hide_and_show_by_id()
  test_action_category_move_courses_into()
  test_action_category_movedown_and_moveup()
  test_action_category_resort_courses()
  test_action_category_resort_subcategories()
  test_action_course_hide_show()
  test_action_course_hide_show_by_record()
  test_action_course_movedown_and_moveup()
  test_get_category_listitem_actions()
  test_get_course_detail_actions()
  test_get_course_detail_array()
  test_move_courses_into_category()


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



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1