Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 402 and 403]
(no description)
File Size: | 1258 lines (60 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
modinfolib_test:: (19 methods):
test_section_info_properties()
test_cm_info_properties()
test_matching_cacherev()
test_course_modinfo_properties()
test_is_user_access_restricted_by_capability()
test_cm_info_get_course_module_record()
test_availability_property()
test_get_groups()
test_create()
test_get_course_and_cm_from_cmid()
test_get_course_and_cm_from_instance()
test_get_section_info_by_id()
get_section_info_by_id_provider()
test_purge_section_cache_by_id()
test_section_cache_by_number()
test_purge_course_module()
test_purge_multiple_course_modules()
test_invalid_course_module_id()
test_get_modinfo_with_newer_version()
Class: modinfolib_test - X-Ref
Unit tests for lib/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. |
test_get_section_info_by_id(int $sectionnum,int $strictness = IGNORE_MISSING,bool $expectnull = false,bool $expectexception = false) X-Ref |
Test test_get_section_info_by_id method param: int $sectionnum the section number param: int $strictness the search strict mode param: bool $expectnull if the function will return a null param: bool $expectexception if the function will throw an exception |
get_section_info_by_id_provider() X-Ref |
Data provider for test_get_section_info_by_id(). return: array |
test_purge_section_cache_by_id() X-Ref |
Test purge_section_cache_by_id method return: void |
test_section_cache_by_number() X-Ref |
Test purge_section_cache_by_number method return: void |
test_purge_course_module() X-Ref |
Purge a single course module from the cache. return: void |
test_purge_multiple_course_modules() X-Ref |
Purge a multiple course modules from the cache. return: void |
test_invalid_course_module_id() X-Ref |
Test get_cm() method to output course module id in the exception text. return: void |
test_get_modinfo_with_newer_version() X-Ref |
Tests that if the modinfo cache returns a newer-than-expected version, Moodle won't rebuild it. This is important to avoid wasted time/effort and poor performance, for example in cases where multiple requests are accessing the course. Certain cases could be particularly bad if this test fails. For example, if using clustered databases where there is a 100ms delay between updates to the course table being available to all users (but no such delay on the cache infrastructure), then during that 100ms, every request that calls get_fast_modinfo and uses the read-only database will rebuild the course cache. Since these will then create a still-newer version, future requests for the next 100ms will also rebuild it again... etc. |