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

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.