moodle/lib/tests
Eloy Lafuente (stronk7) 0f3775088f
MDL-69688 phpunit: Improve test_context_not_used
This adds a few changes to the old test_context_not_used test:

- Move it to become an advanced_test, because its mission
  is to verify that the assertEventContextNotUsed() assertion
  works as expected.
- For consistency, also move the fixtures to own phpunit fixtures.
- Add proper coverage tags, to verify that the assertion is being
  covered.
- Add a data provider to provide all the current cases and ease
  any future case that may be needed in the future. One by one
  because previously there was code never executed with the
  warning expectation causing the test to stop.
- Run them in isolation, while this is not strictly required, it's
  including external fixtures and, we'll need that isolation soon
  (for changes coming when moving the test to PHPUnit 9.6 in MDL-81266).
2024-03-21 08:31:08 +01:00
..
analytics MDL-73785 phpunit: Move more tests to use correct names and namespaces 2022-03-03 12:19:30 +01:00
aws Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
behat Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
content/export MDL-75880 phpunit: fix all @coversDefaultClass missing @covers 2022-11-04 16:51:20 +01:00
context MDL-74936 core: tidy up context API 2023-03-31 23:09:39 +02:00
db MDL-74506 block: Correct parentcontextid for blocks in dashboard 2022-04-16 17:49:18 +08:00
event MDL-69688 phpunit: Improve test_context_not_used 2024-03-21 08:31:08 +01:00
external MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
fixtures MDL-69688 phpunit: Improve test_context_not_used 2024-03-21 08:31:08 +01:00
hook MDL-81180 core: Fix coding violations in hook manager tests 2024-03-11 16:49:54 +08:00
hub MDL-78048 Site Registration: Course Dates 2023-05-17 09:01:10 +10:00
lock MDL-74960 core\lock: Performance info - display lock performance 2022-09-26 11:24:10 +01:00
moodlenet MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
navigation MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
oauth2/discovery MDL-75650 core: add oauth2 auth server config reader 2023-03-08 08:48:20 +08:00
other MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
output MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
performance MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
plugininfo MDL-80866 phpunit: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
privacy MDL-77296 core: Record MoodleNet share progress 2023-08-29 11:26:23 +10:00
task Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
accesslib_has_capability_test.php MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
accesslib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
adminlib_test.php MDL-78543 admin: refactor admin_apply_default_settings() 2023-07-14 08:47:20 +02:00
admintree_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
ajaxlib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
analysers_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
antivirus_test.php MDL-78165 lib: Added class properties that are not declared in classes 2023-06-14 20:17:55 +07:00
attribute_helper_test.php MDL-81011 core: Add attribute alternative to hooks interfaces 2024-03-07 18:56:05 +08:00
authlib_test.php MDL-53368 core_auth: Implement reCaptcha on login page 2023-08-24 15:18:31 +07: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-75716 phpunit: Move tests to use correct names and ns (take#5) 2022-09-12 19:29:34 +02:00
check_test.php MDL-67898 check: Get component if not set by manager 2023-11-21 11:47:26 +10:00
client_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
collator_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
completionlib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
component_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
componentlib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
configonlylib_test.php MDL-80229 core: Add tolerance to min_get_minimum_revision 2023-11-24 15:49:16 +11:00
content_test.php
context_block_test.php MDL-74271 context: Improve performance of block context creation 2022-04-06 23:40:15 +08:00
context_helper_test.php MDL-74936 core: tidy up context API 2023-03-31 23:09:39 +02:00
context_test.php MDL-74936 core: tidy up context API 2023-03-31 23:09:39 +02:00
core_media_player_native_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
core_renderer_template_exploit_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
coverage.php MDL-80409 dataformat: final removal of deprecated download method. 2023-12-21 15:31:00 +00:00
cron_test.php MDL-77186 core: Move cron_setup_user to namespaced class 2023-03-14 11:19:03 +08:00
csslib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
csvclass_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
curl_security_helper_test.php MDL-78215 core: Added support unit test 2023-06-08 09:36:00 +08:00
customcontext_test.php MDL-74936 core: tidy up context API 2023-03-31 23:09:39 +02: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-78312 core_user: add an 'exact match only' option 2023-09-13 20:22:22 +07:00
datalib_update_with_unique_index_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
date_legacy_test.php MDL-75100 core: replace function strftime deprecated in PHP 8.1 2022-11-21 11:41:12 +01:00
date_test.php MDL-76675 date: Only test all TZ names with PHPUNIT_LONGTEST enabled 2023-01-26 14:18:29 +01:00
deprecation_test.php MDL-80677 core: Deprecation attribute can apply to interfaces and traits 2024-03-12 09:49:02 +08:00
di_test.php MDL-80072 core: Add \core\di wrapper to php-di 2024-02-12 11:11:16 +08:00
editorlib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
encryption_test.php MDL-71421 core: deprecate openssl fallbacks in encryption library. 2023-08-01 12:10:36 +01:00
environment_test.php MDL-80167 core: Skip Oracle for Oracle environment in unit tests 2024-03-15 08:45:42 +07:00
event_course_module_instance_list_viewed.php MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
event_course_module_viewed.php MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
exporter_test.php Merge branch 'MDL-76723-main' of https://github.com/junpataleta/moodle 2024-01-24 13:12:15 +01:00
externallib_test.php MDL-76583 external: Add unit test for deprecated test helper 2023-01-19 11:02:31 +08:00
filelib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
filestorage_zip_archive_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
filetypes_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
filter_manager_test.php MDL-78993 theme: Remove $CFG->svgicons 2023-09-12 15:28:03 +02:00
filterlib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
formatting_test.php MDL-80072 core: Promote all formatting options to parameters 2024-02-12 11:11:18 +08:00
formslib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
gdlib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
googlelib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
gradelib_test.php MDL-72451 core: Stop keep regrading when there is an error 2022-11-17 08:54:47 +00:00
grades_external_test.php MDL-71325 grade: final removal of deprecated category external method. 2023-05-26 13:48:57 +01:00
grading_external_test.php MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
graphlib_test.php MDL-75945 core: Convert a floating value to an integer. 2023-01-24 16:49:10 +07:00
grouplib_test.php MDL-79611 group: early exit getting members of non-existing group. 2023-10-09 15:00:14 +01:00
h5p_clean_orphaned_records_task_test.php Merge branch 'MDL-76859-master' of https://github.com/sarjona/moodle 2023-04-13 16:24:20 +02:00
html2text_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
html_writer_test.php MDL-78159 lib: Added missing properties for core libraries 2023-06-21 15:39:53 +07:00
htmlpurifier_test.php MDL-80072 core: Mark nocache option to format_text as deprecated 2024-02-12 11:11:19 +08:00
http_client_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
ip_utils_test.php MDL-75889 core: compare domain names in a case-insensitive manner. 2022-11-07 22:37:15 +00:00
jquery_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
ldaplib_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
licenselib_test.php MDL-43195 license: upgrading cc core licenses to version 4.0 2023-08-14 22:53:57 +02:00
lock_config_test.php MDL-74960 core\lock: Performance info - display lock performance 2022-09-26 11:24:10 +01:00
lock_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
markdown_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
mathslib_test.php MDL-75464 libraries: upgrade EvalMath to 1.0.1 2023-03-16 17:27:30 +07:00
medialib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
message_test.php MDL-80713 Unit Tests: Message sink improvement 2024-02-05 09:23:41 +07:00
messagelib_test.php MDL-73785 phpunit: Move more tests to use correct names and namespaces 2022-03-03 12:19:30 +01:00
minify_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
modinfolib_test.php MDL-80190 core_courseformat: do not render delegated sections in course 2024-02-07 12:06:03 +01:00
moodle_page_test.php MDL-78850 course: allow to show/hide the course index drawer 2024-02-29 12:48:48 +07:00
moodle_url_test.php Merge branch 'MDL-80896-main' of https://github.com/andrewnicols/moodle 2024-03-12 11:38:26 +08:00
moodlelib_current_language_test.php MDL-74608 activities: a new option to force the activity language 2022-08-15 22:15:52 +01:00
moodlelib_test.php MDL-78311 core: fix host parameter type cleaning by IPv4 address. 2024-01-25 23:36:06 +00:00
myprofilelib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
navigationlib_test.php MDL-78167 lib: Added missing class properties in tests 2023-05-27 09:24:59 +07:00
notification_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
oauth2_test.php MDL-61789 auth_oauth2: Update profile fields based on data mapping. 2023-01-07 20:59:26 +07:00
outputcomponents_test.php MDL-78993 theme: Remove $CFG->svgicons 2023-09-12 15:28:03 +02:00
outputfactories_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
outputrenderers_test.php MDL-73708 course: Return geo pattern generated course images via WS 2023-03-22 17:39:07 -03:00
outputrequirementslib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
param_test.php MDL-80005 core: Emit deprecation notices for params 2024-01-17 12:19:45 +08:00
pdflib_test.php MDL-45301 assign: Add font options for EditPDF 2023-02-17 15:30:25 +11:00
persistent_test.php MDL-65292 style: Fix all function declarations white space 2024-02-28 23:33:26 +01:00
phpxmlrpc_test.php MDL-76055 libraries: Autoload phpxmlrpc and verify it works 2022-11-02 15:56:38 +01:00
plugin_manager_test.php MDL-77308 core: Remove editor_tiny from core 2023-03-09 15:28:35 +08:00
portfoliolib_test.php
progress_display_test.php
progress_test.php MDL-73785 phpunit: Move more tests to use correct names and namespaces 2022-03-03 12:19:30 +01:00
qrcode_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
questionlib_test.php MDL-79527 questions: category tree loading handling bad data 2024-02-02 11:26:57 +00:00
regex_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
report_helper_test.php MDL-65292 style: Fix all function declarations white space 2024-02-28 23:33:26 +01:00
requirejs_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
rsslib_test.php MDL-74586 rss: Make rss_get_userid_from_token() use table index 2023-02-28 13:21:35 +01: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
scss_test.php MDL-73785 phpunit: Move more tests to use correct names and namespaces 2022-03-03 12:19:30 +01:00
session_manager_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
session_redis_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
sessionlib_test.php MDL-77186 core: Move cron_setup_user to namespaced class 2023-03-14 11:19:03 +08:00
setuplib_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
statslib_test.php MDL-77186 core: Move all uses of cronlib to new class 2023-03-13 21:21:13 +08:00
string_manager_standard_test.php MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
tablelib_test.php MDL-78556 tablelib: flexible_table should support caption tag 2023-07-11 13:40:33 +07:00
text_test.php MDL-74853 various: add second parameter to htmlentities functions 2022-11-28 16:12:20 +01:00
theme_config_test.php MDL-78993 theme: Remove $CFG->svgicons 2023-09-12 15:28:03 +02:00
update_api_test.php MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
update_checker_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
update_code_manager_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
update_validator_test.php MDL-75111 phpunit: Move tests to use correct names and ns (take#4) 2022-08-26 16:34:20 +02:00
upgrade_util_test.php MDL-77714 general: Remove mentions to Travis CI in a few places 2023-03-22 19:17:14 +01:00
upgradelib_test.php MDL-80167 admin: Add environment check for Oracle database 2024-03-14 17:41:56 +07:00
user_menu_test.php MDL-79577 user: better parsing of user menu lang string identifiers. 2024-01-19 09:49:13 +00:00
user_test.php MDL-80279 core: Set new attributes for user profile initials 2024-03-15 07:31:56 -03:00
useragent_test.php MDL-78993 theme: Remove $CFG->svgicons 2023-09-12 15:28:03 +02:00
weblib_format_text_test.php MDL-80079 core: Correct incorrect arg to format_text::$options 2023-11-14 22:28:55 +08:00
weblib_test.php MDL-80072 core: Move format_string to core\formatting 2024-02-12 11:11:16 +08:00
xhprof_test.php MDL-75952 general: Since php81, refection->setAccessible() is no-op 2024-03-10 21:15:00 +01:00
xhtml_container_stack_test.php MDL-75716 phpunit: Move tests to use correct names and ns (take#5) 2022-09-12 19:29:34 +02:00
xmlize_test.php MDL-75716 phpunit: Move tests to use correct names and ns (take#5) 2022-09-12 19:29:34 +02:00