moodle/lib/tests
Andrew Nicols 70cc41eec8 MDL-72246 core_completion: Only fetch other completion data on requested
Prior to this patch, the code was fetching all completion data for all
activities in a course, even when the activity was not requested. This
leads to recursion issues as the data has not been added to the cache
before this operation occurs.

To handle this situation, only the requested CM is fetched in full, and
a boolean flag is used to store whether the full data has been fetched.

When returning a partially fetched value from the cache, the flag is
used to determine whether more data must be fetched, and the cache
updated.

The flag is filtered out before the value is returned.

Note: Many of the tests were updated as these were inspecting private
features of the API which should not really be tested.
2022-02-08 11:35:23 +08:00
..
behat MDL-73310 course: Add course index to all non-site course pages 2022-02-02 09:22:42 +01:00
content/export MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
event MDL-73476 phpunit: events, external and search tescase names 2022-01-14 16:18:39 +01:00
external MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
fixtures MDL-71943 core: Dynamic (AJAX) tabs in Moodle LMS 2021-09-27 17:53:37 +02:00
navigation MDL-73366 navigation: Changed the first tab of site administration. 2022-01-17 11:52:13 +08:00
other
output MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
performance
plugininfo MDL-73278 phpunit: Rename already namespaced classes to match file name 2021-12-07 23:54:29 +01:00
accesslib_has_capability_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
accesslib_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
adhoc_task_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
adminlib_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
admintree_test.php MDL-71036 phpunit: Renamed various regexp-related assertions 2021-03-11 19:22:24 +01:00
ajaxlib_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
analysers_test.php MDL-65284 analytics: Final deprecation get_analysables() 2020-12-16 12:47:52 +01:00
antivirus_test.php MDL-71627 check: Add AV status, notification levels and more logging 2021-08-11 11:46:15 +10:00
authlib_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
behat_lib_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
blocklib_test.php MDL-73347 blocks: New unaddableblocks theme setting 2022-01-14 13:08:48 +01:00
calendar_cron_task_test.php MDL-71953 calendar: Accessibility improvement for manage subscription 2021-10-21 11:02:34 +07:00
check_test.php
client_test.php MDL-65637 core_oauth2: Create new oauth2 mapping function 2021-06-02 08:11:38 +08:00
collator_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
completion_daily_task_test.php MDL-73278 phpunit: Rename already namespaced classes to match file name 2021-12-07 23:54:29 +01:00
completionlib_test.php MDL-72246 core_completion: Only fetch other completion data on requested 2022-02-08 11:35:23 +08:00
component_test.php MDL-73397 adminpresets: Create new core_adminpresets component 2022-01-03 11:51:33 +01:00
componentlib_test.php
configonlylib_test.php
content_test.php MDL-69559 course: Add capability and access checks for course download 2020-10-26 10:00:47 +08:00
core_media_player_native_test.php MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
core_renderer_template_exploit_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
coverage.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
cronlib_test.php
csslib_test.php
csvclass_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
curl_security_helper_test.php MDL-71036 phpunit: Coding style changes, 99% whitespace only 2021-03-11 23:04:32 +01:00
customcontext_test.php MDL-70159 tool_capability: order capabilities by their name. 2021-01-14 07:32:56 +00:00
dataformat_test.php MDL-73278 phpunit: Rename already namespaced classes to match file name 2021-12-07 23:54:29 +01:00
datalib_test.php MDL-72096 core: Add safe ORDER BY helpers for db sorting from user input 2021-11-15 12:42:43 +08:00
datalib_update_with_unique_index_test.php
date_legacy_test.php
date_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
editorlib_test.php
encryption_test.php MDL-73278 phpunit: Rename already namespaced classes to match file name 2021-12-07 23:54:29 +01:00
environment_test.php
event_context_locked_test.php
event_course_module_instance_list_viewed.php
event_course_module_viewed.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
event_deprecated_test.php
event_grade_deleted_test.php
event_profile_field_test.php MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
event_test.php MDL-71389 various: changes to unittests due to php8 changes: 2021-04-21 12:38:46 +02:00
event_unknown_logged_test.php
event_user_graded_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
event_user_password_updated_test.php
exporter_test.php MDL-69700 tests: clarify expected exceptions in unit tests. 2022-01-05 08:45:39 +00:00
externallib_test.php MDL-73485 phpunit: externallib, generator and filter tescase names 2022-01-21 19:48:23 +01:00
filelib_test.php MDL-73588 curl: Fix expected CURLOPT_FILE behavior 2022-01-24 17:08:25 +01:00
filestorage_zip_archive_test.php
filetypes_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
filter_manager_test.php MDL-71036 phpunit: Coding style changes, 99% whitespace only 2021-03-11 23:04:32 +01:00
filterlib_test.php MDL-71036 phpunit: Coding style changes, 99% whitespace only 2021-03-11 23:04:32 +01:00
formslib_test.php
gdlib_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
googlelib_test.php MDL-71395 core: fix bug in google lib wrapper 2021-05-06 15:39:11 +02:00
gradelib_test.php
grades_externallib_test.php MDL-72433 core: Final deprecation get_grades 2021-10-15 10:53:45 +08:00
grading_externallib_test.php
grouplib_test.php MDL-69908 user: include groups with exported course participants. 2021-06-14 09:31:30 +01:00
h5p_clean_orphaned_records_task_test.php MDL-66769 core_h5p: Clean up orphaned h5p records task. 2021-02-03 10:10:30 +02:00
h5p_get_content_types_task_test.php MDL-71036 phpunit: Mock->setMethods() silently deprecated 2021-03-11 23:04:31 +01:00
html2text_test.php MDL-72871 cleanup: Remove incorrect whitespace from codebase 2021-10-26 17:19:11 +02:00
html_writer_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
htmlpurifier_test.php
indicators_test.php
ip_utils_test.php
jquery_test.php MDL-67673 phpunit: Remove deprecated assertInternalType() 2020-10-21 12:45:59 +02:00
ldaplib_test.php
licenselib_test.php
lock_config_test.php
lock_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
markdown_test.php
mathslib_test.php MDL-67673 phpunit: Remove deprecated assertEquals() params 2020-10-21 12:46:00 +02:00
medialib_test.php MDL-72042 media: Remove SWF media player 2021-09-17 10:39:17 +02:00
message_test.php MDL-67853 message: Adapt tests removing online/offline settings 2022-01-27 15:22:15 +01:00
messageinbound_test.php
messagelib_test.php MDL-67853 message: Adapt tests removing online/offline settings 2022-01-27 15:22:15 +01:00
minify_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
modinfolib_test.php MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
moodle_page_test.php MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:00 +02:00
moodle_url_test.php MDL-71036 phpunit: Renamed various regexp-related assertions 2021-03-11 19:22:24 +01:00
moodlelib_test.php MDL-70823 core: safer alternative for unserializing objects. 2021-11-03 16:57:06 +01:00
mustache_template_finder_test.php MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:00 +02:00
mustache_template_source_loader_test.php MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:08:54 +01:00
myprofilelib_test.php MDL-28452 core_user: migrate social profile fields 2021-04-21 11:22:25 +02:00
navigationlib_test.php MDL-71680 navigation: Add unit tests for set_force_into_more_menu() 2021-08-23 17:46:39 +08:00
notification_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
oauth2_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
output_mustache_helper_collection_test.php MDL-69050 lang: Stop using the term blacklist in mustache output engine 2020-09-24 19:41:58 +02:00
outputcomponents_test.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
outputfactories_test.php
outputrequirementslib_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
pdflib_test.php MDL-70735 tcpdf: Reduce information disclosure from TCPDF 2021-02-12 15:41:38 +11:00
persistent_test.php Merge branch 'MDL-72779' of https://github.com/paulholden/moodle 2021-10-29 10:16:56 +08:00
plugin_manager_test.php MDL-71036 phpunit: Coding style changes, 99% whitespace only 2021-03-11 23:04:32 +01:00
portfoliolib_test.php MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file 2021-03-30 19:17:54 +02:00
progress_display_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
progress_test.php
qrcode_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
questionlib_test.php MDL-71696 core_question: Implement question status change 2022-02-03 22:22:50 +11:00
regex_test.php
report_helper_test.php MDL-72094 core_report: Deprecate report_helper::save_selected_report() 2021-09-14 11:44:18 +08:00
requirejs_test.php MDL-67673 phpunit: Remove deprecated assertContains() uses on strings 2020-10-21 12:46:00 +02:00
rsslib_test.php MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
rtlcss_test.php
sample_questions.ser
sample_questions.xml
sample_questions_with_old_image_tag.ser
sample_questions_with_old_image_tag.xml
sample_questions_wrong.xml
scheduled_task_test.php MDL-73207 cron: Fixed cronspec field order bug 2021-12-06 17:52:40 +11:00
scss_test.php
session_manager_test.php MDL-67673 phpunit: Remove deprecated assertEquals() params 2020-10-21 12:46:00 +02:00
session_redis_test.php Merge branch 'MDL-69121-redis-session-store-compression' of git://github.com/jamie-catalyst/moodle into master 2020-11-24 22:58:48 +01:00
sessionlib_test.php
setuplib_test.php MDL-73427 core: Remove $SESSION->fromurl 2022-01-05 19:39:21 +08:00
statslib_test.php MDL-67673 phpunit: Move tests to use new phpunit_dataset 2020-10-21 12:46:00 +02:00
string_manager_standard_test.php MDL-65801 lang: final removal of deprecated 37/38 strings. 2022-01-13 09:50:50 +00:00
tablelib_test.php MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:18:52 +02:00
task_database_logger_test.php MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:57 +01:00
task_logging_test.php MDL-70427 admin: remove plugin adhoc tasks during uninstall. 2021-07-12 20:43:14 +01:00
task_manager_test.php
task_running_test.php MDL-73278 phpunit: Rename already namespaced classes to match file name 2021-12-07 23:54:29 +01:00
text_test.php MDL-53544 lib: Update unit tests and thirdpartylibs 2021-05-26 16:46:30 +08:00
theme_config_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
time_splittings_test.php MDL-67673 phpunit: Remove deprecated assertEquals() params 2020-10-21 12:46:00 +02:00
update_api_test.php
update_checker_test.php MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:00 +02:00
update_code_manager_test.php MDL-67673 phpunit: Remove expectedException annotations 2020-10-21 12:46:00 +02:00
update_validator_test.php MDL-67673 phpunit: Remove deprecated assertInternalType() 2020-10-21 12:45:59 +02:00
upgrade_util_test.php
upgradelib_test.php MDL-73270 admin: Warn about xmlrpc webservice protocol enabled 2022-01-28 09:32:08 +07:00
user_menu_test.php MDL-72867 Navigations: User menu improvements 2021-12-15 13:54:45 +07:00
user_test.php MDL-72325 user: Introduce new core_user::awaiting_action() method 2021-08-12 13:05:38 +02:00
useragent_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
weblib_format_text_test.php MDL-71036 phpunit: Renamed various regexp-related assertions 2021-03-11 19:22:24 +01:00
weblib_test.php MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
xhprof_test.php
xhtml_container_stack_test.php
xmlize_test.php