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 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Unit tests for lib/modinfolib.php.

Copyright: 2012 Andrew Davis
File Size: 922 lines (45 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_modinfolib_testcase  - X-Ref

Unit tests for modinfolib.php

test_section_info_properties()   X-Ref
No description

test_cm_info_properties()   X-Ref
No description

test_matching_cacherev()   X-Ref
No description

test_course_modinfo_properties()   X-Ref
No description

test_is_user_access_restricted_by_capability()   X-Ref
No description

test_cm_info_get_course_module_record()   X-Ref
Tests for function cm_info::get_course_module_record()


test_availability_property()   X-Ref
Tests the availability property that has been added to course modules
and sections (just to see that it is correctly saved and accessed).


test_get_groups()   X-Ref
Tests for get_groups() method.


test_create()   X-Ref
Tests the function for constructing a cm_info from mixed data.


test_get_course_and_cm_from_cmid()   X-Ref
Tests function for getting $course and $cm at once quickly from modinfo
based on cmid or cm record.


test_get_course_and_cm_from_instance()   X-Ref
Tests function for getting $course and $cm at once quickly from modinfo
based on instance id or record.