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]

Events tests.

Copyright: 2019 the Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 242 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_question_category_class_testcase  - X-Ref

setUp()   X-Ref


test_add_category_no_idnumber()   X-Ref
Test creating a category.


test_add_category_set_idnumber_0()   X-Ref
Test creating a category with a tricky idnumber.


test_add_category_try_to_set_duplicate_idnumber()   X-Ref
Trying to add a category with duplicate idnumber blanks it.
(In reality, this would probably get caught by form validation.)


test_update_category()   X-Ref
Test updating a category.


test_update_category_removing_idnumber()   X-Ref
Test updating a category to remove the idnumber.


test_update_category_dont_change_idnumber()   X-Ref
Test updating a category without changing the idnumber.


test_update_category_try_to_set_duplicate_idnumber()   X-Ref
Trying to update a category so its idnumber duplicates idnumber blanks it.
(In reality, this would probably get caught by form validation.)


test_get_real_question_ids_in_category_shortanswer()   X-Ref
Test that get_real_question_ids_in_category() returns question id
of a shortanswer question in a category.


test_get_real_question_ids_in_category_multianswer()   X-Ref
Test that get_real_question_ids_in_category() returns question id
of a multianswer question in a category.


test_get_real_question_ids_in_category_multianswer_bad_data()   X-Ref
Test that get_real_question_ids_in_category() returns question id
of a multianswer question in a category even if their child questions are
linked to a category that doesn't exist.