Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

(no description)

File Size: 373 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: version_test  - X-Ref

Question version unit tests.

setUp()   X-Ref
Called before every test.


tearDown()   X-Ref
No description

test_make_question_create_version_and_bank_entry()   X-Ref
Test if creating a question a new version and bank entry records are created.


test_delete_question_delete_versions()   X-Ref
Test if deleting a question the related version and bank entry records are deleted.


test_delete_question_in_use()   X-Ref
Test if deleting a question will not break a quiz.


test_move_category_with_questions()   X-Ref
Test if moving a category will not break a quiz.


test_id_number_in_bank_entry()   X-Ref
Test that all versions will have the same bank entry idnumber value.


test_get_all_versions_of_question()   X-Ref
Test that all the versions are available from the method.


test_get_all_versions_of_questions()   X-Ref
Test that all the versions of questions are available from the method.


test_populate_definition_latestversions()   X-Ref
Test population of latestversion field in question_definition objects

When an instance of question_definition is created, it is added to an array of pending definitions which
do not yet have the latestversion field populated. When one definition has its latestversion property accessed,
all pending definitions have their latestversion field populated at once.

return: void