From 5be481d1d014e6f1fcec60f1b0bee1e7baaccf5e Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 15 Oct 2024 07:45:57 +0800 Subject: [PATCH] MDL-81520 core: Fix test finality --- admin/presets/tests/generator_test.php | 2 +- admin/presets/tests/helper_test.php | 2 +- ...inpresets_admin_setting_bloglevel_test.php | 2 +- ...presets_admin_setting_sitesettext_test.php | 2 +- .../setting/adminpresets_setting_test.php | 2 +- admin/presets/tests/manager_test.php | 2 +- .../tests/privacy/privacy_provider_test.php | 2 +- admin/roles/tests/preset_test.php | 4 +- admin/roles/tests/privacy/provider_test.php | 2 +- .../datasource/task_logs_test.php | 2 +- .../tests/event/preset_deleted_test.php | 2 +- .../tests/event/preset_downloaded_test.php | 2 +- .../tests/event/preset_exported_test.php | 2 +- .../tests/event/preset_imported_test.php | 2 +- .../tests/event/preset_loaded_test.php | 2 +- .../tests/event/preset_previewed_test.php | 2 +- .../tests/event/preset_reverted_test.php | 2 +- .../tests/event/presets_listed_test.php | 2 +- .../tests/local/action/base_test.php | 2 +- .../tests/local/action/delete_test.php | 2 +- .../tests/local/action/export_test.php | 2 +- .../tests/local/action/import_test.php | 2 +- .../tests/local/action/load_test.php | 2 +- .../tests/local/action/rollback_test.php | 2 +- .../tests/external/external_test.php | 2 +- .../tool/behat/tests/behat_form_text_test.php | 2 +- .../external/get_entity_generator_test.php | 2 +- admin/tool/behat/tests/manager_util_test.php | 6 +- .../brickfield/tests/accessibility_test.php | 2 +- admin/tool/brickfield/tests/area_test.php | 2 +- admin/tool/brickfield/tests/filters_test.php | 4 +- .../core_question/questionanswers_test.php | 2 +- .../areas/core_question/questiontext_test.php | 2 +- .../a_links_dont_open_new_window_test.php | 2 +- .../checks/a_must_contain_text_test.php | 2 +- .../checks/a_suspicious_link_text_test.php | 2 +- .../checks/area_dont_open_new_window_test.php | 2 +- .../common/checks/area_has_alt_value_test.php | 2 +- .../checks/basefont_is_not_used_test.php | 2 +- .../common/checks/blink_is_not_used_test.php | 2 +- .../common/checks/bold_is_not_used_test.php | 2 +- .../common/checks/content_too_long_test.php | 2 +- .../embed_has_associated_no_embed_test.php | 2 +- .../common/checks/header_h3_test.php | 2 +- .../common/checks/headers_have_text_test.php | 2 +- .../common/checks/i_is_not_used_test.php | 2 +- .../checks/img_alt_is_different_test.php | 2 +- .../checks/img_alt_is_too_long_test.php | 2 +- .../img_alt_not_empty_in_anchor_test.php | 2 +- .../checks/img_alt_not_place_holder_test.php | 2 +- .../common/checks/img_has_alt_test.php | 2 +- .../checks/img_with_map_has_use_map_test.php | 2 +- .../checks/legend_text_not_empty_test.php | 2 +- .../common/checks/no_headings_test.php | 2 +- .../checks/object_must_have_embed_test.php | 2 +- .../checks/object_must_have_title_test.php | 2 +- .../object_must_have_valid_title_test.php | 2 +- .../common/checks/strike_is_not_used_test.php | 2 +- .../checks/table_data_should_have_th_test.php | 2 +- ...ummary_does_not_duplicate_caption_test.php | 2 +- .../checks/table_td_should_not_merge_test.php | 2 +- .../table_th_should_have_scope_test.php | 2 +- .../tests/local/tool/activityresults_test.php | 2 +- .../local/tool/checktyperesults_test.php | 2 +- .../tests/local/tool/errors_test.php | 2 +- .../tests/local/tool/printable_test.php | 2 +- admin/tool/brickfield/tests/manager_test.php | 2 +- .../brickfield/tests/registration_test.php | 2 +- .../tool/brickfield/tests/scheduler_test.php | 2 +- admin/tool/brickfield/tests/tool_test.php | 2 +- .../capability/tests/event/events_test.php | 2 +- admin/tool/capability/tests/locallib_test.php | 2 +- admin/tool/cohortroles/tests/api_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tests/local/mlang/langstring_test.php | 2 +- .../tests/local/mlang/phpparser_test.php | 2 +- admin/tool/dataprivacy/tests/api_test.php | 2 +- .../dataprivacy/tests/data_registry_test.php | 2 +- .../dataprivacy/tests/data_request_test.php | 2 +- .../tests/expired_contexts_test.php | 2 +- .../tests/external/external_test.php | 2 +- .../tests/filtered_userlist_test.php | 2 +- .../tests/manager_observer_test.php | 2 +- .../tests/metadata_registry_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tool/dataprivacy/tests/task/task_test.php | 2 +- .../tests/user_deleted_observer_test.php | 2 +- .../filetypes/tests/tool_filetypes_test.php | 2 +- .../generator/tests/maketestcourse_test.php | 2 +- .../generator/tests/maketestsite_test.php | 2 +- .../httpsreplace/tests/httpsreplace_test.php | 2 +- .../installaddon/tests/installer_test.php | 2 +- .../tool/langimport/tests/controller_test.php | 2 +- .../langimport/tests/event/events_test.php | 2 +- .../tool/licensemanager/tests/helper_test.php | 2 +- .../licensemanager/tests/manager_test.php | 2 +- .../database/tests/privacy/provider_test.php | 2 +- .../log/store/database/tests/store_test.php | 2 +- .../standard/tests/privacy/provider_test.php | 2 +- .../log/store/standard/tests/store_test.php | 2 +- admin/tool/log/tests/manager_test.php | 4 +- .../tool/log/tests/privacy/provider_test.php | 2 +- admin/tool/lp/tests/externallib_test.php | 2 +- admin/tool/lpimportcsv/tests/import_test.php | 2 +- admin/tool/lpmigrate/tests/processor_test.php | 2 +- .../messageinbound/tests/manager_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- admin/tool/mobile/tests/api_test.php | 2 +- admin/tool/mobile/tests/externallib_test.php | 2 +- .../mobile/tests/privacy/provider_test.php | 2 +- .../tool/monitor/tests/event/events_test.php | 2 +- .../monitor/tests/eventobservers_test.php | 2 +- admin/tool/monitor/tests/generator_test.php | 2 +- .../monitor/tests/privacy/provider_test.php | 2 +- .../tool/monitor/tests/rule_manager_test.php | 2 +- .../tests/subscription_manager_test.php | 2 +- .../tool/monitor/tests/subscription_test.php | 2 +- .../tests/task_check_subscriptions_test.php | 2 +- .../monitor/tests/task_clean_events_test.php | 2 +- .../tests/import_backup_helper_test.php | 2 +- admin/tool/moodlenet/tests/lib_test.php | 2 +- .../tests/local/import_handler_info_test.php | 2 +- .../local/import_handler_registry_test.php | 2 +- .../tests/local/import_info_test.php | 2 +- .../tests/local/import_processor_test.php | 2 +- .../tests/local/remote_resource_test.php | 2 +- admin/tool/moodlenet/tests/local/url_test.php | 2 +- .../moodlenet/tests/profile_manager_test.php | 2 +- admin/tool/policy/tests/api_test.php | 2 +- admin/tool/policy/tests/externallib_test.php | 2 +- .../policy/tests/privacy/provider_test.php | 2 +- .../policy/tests/sitepolicy_handler_test.php | 2 +- .../recyclebin/tests/category_bin_test.php | 2 +- .../tool/recyclebin/tests/course_bin_test.php | 2 +- .../recyclebin/tests/event/events_test.php | 2 +- admin/tool/task/tests/form_test.php | 2 +- .../tests/externallib_test.php | 2 +- admin/tool/uploadcourse/tests/course_test.php | 2 +- admin/tool/uploadcourse/tests/helper_test.php | 2 +- .../uploadcourse/tests/processor_test.php | 2 +- admin/tool/uploaduser/tests/cli_test.php | 2 +- .../tests/field_value_validators_test.php | 2 +- .../uploaduser/tests/upload_users_test.php | 2 +- .../tests/accessdate_filter_test.php | 3 +- admin/tool/usertours/tests/cache_test.php | 2 +- admin/tool/usertours/tests/manager_test.php | 2 +- .../usertours/tests/privacy/provider_test.php | 3 +- .../tool/usertours/tests/role_filter_test.php | 3 +- admin/tool/usertours/tests/step_test.php | 3 +- .../usertours/tests/theme_filter_test.php | 3 +- admin/tool/usertours/tests/tour_test.php | 3 +- analytics/tests/analysis_test.php | 2 +- analytics/tests/course_test.php | 2 +- analytics/tests/dataset_manager_test.php | 2 +- analytics/tests/model_test.php | 2 +- analytics/tests/prediction_actions_test.php | 2 +- analytics/tests/prediction_test.php | 2 +- analytics/tests/privacy/provider_test.php | 2 +- analytics/tests/stats_test.php | 2 +- analytics/tests/time_splittings_test.php | 2 +- auth/db/tests/db_test.php | 2 +- auth/email/tests/external/external_test.php | 2 +- auth/ldap/tests/plugin_test.php | 3 +- auth/lti/tests/auth_test.php | 2 +- auth/lti/tests/privacy/provider_test.php | 2 +- auth/manual/tests/manual_test.php | 2 +- auth/manual/tests/privacy/provider_test.php | 2 +- auth/mnet/tests/privacy/provider_test.php | 2 +- auth/oauth2/tests/api_test.php | 2 +- auth/oauth2/tests/auth_test.php | 2 +- auth/oauth2/tests/privacy/provider_test.php | 2 +- auth/tests/digital_consent_test.php | 2 +- auth/tests/external/external_test.php | 2 +- auth/tests/privacy/provider_test.php | 2 +- .../completion/tests/condition_test.php | 2 +- .../condition/date/tests/condition_test.php | 2 +- .../condition/grade/tests/condition_test.php | 2 +- .../condition/group/tests/condition_test.php | 2 +- .../grouping/tests/condition_test.php | 2 +- .../profile/tests/condition_test.php | 2 +- .../tests/capability_checker_test.php | 2 +- availability/tests/component_test.php | 2 +- availability/tests/info_test.php | 2 +- availability/tests/tree_test.php | 2 +- backup/controller/tests/controller_test.php | 2 +- .../moodle1/tests/moodle1_converter_test.php | 2 +- .../tests/backup_encrypted_content_test.php | 2 +- .../tests/backup_xml_transformer_test.php | 2 +- .../tests/moodle2_course_format_test.php | 2 +- .../restore_gradebook_structure_step_test.php | 2 +- .../tests/restore_stepslib_date_test.php | 2 +- backup/tests/async_backup_test.php | 2 +- backup/tests/async_restore_test.php | 2 +- backup/tests/automated_backup_test.php | 2 +- backup/tests/backup_cleanup_task_test.php | 2 +- .../tests/backup_restore_permission_test.php | 2 +- backup/tests/externallib_test.php | 2 +- backup/tests/privacy/provider_test.php | 2 +- .../tests/quiz_restore_decode_links_test.php | 2 +- backup/tests/roles_backup_restore_test.php | 2 +- backup/util/checks/tests/checks_test.php | 2 +- backup/util/dbops/tests/backup_dbops_test.php | 2 +- .../tests/backup_structure_dbops_test.php | 2 +- .../util/dbops/tests/restore_dbops_test.php | 2 +- .../destinations/tests/destinations_test.php | 2 +- .../util/factories/tests/factories_test.php | 2 +- .../util/helper/tests/async_helper_test.php | 2 +- .../tests/backup_encode_content_test.php | 2 +- .../helper/tests/converterhelper_test.php | 2 +- backup/util/helper/tests/copy_helper_test.php | 2 +- backup/util/helper/tests/cronhelper_test.php | 2 +- backup/util/helper/tests/decode_test.php | 2 +- backup/util/helper/tests/helper_test.php | 2 +- .../helper/tests/restore_log_rule_test.php | 2 +- ...estore_structure_parser_processor_test.php | 2 +- backup/util/loggers/tests/logger_test.php | 2 +- backup/util/plan/tests/plan_test.php | 2 +- backup/util/plan/tests/step_test.php | 2 +- backup/util/plan/tests/task_test.php | 2 +- backup/util/settings/tests/settings_test.php | 2 +- backup/util/structure/tests/baseatom_test.php | 2 +- .../structure/tests/baseattribute_test.php | 2 +- .../structure/tests/basefinalelement_test.php | 2 +- .../tests/basenestedelement_test.php | 2 +- .../structure/tests/baseoptigroup_test.php | 2 +- .../util/structure/tests/structure_test.php | 2 +- backup/util/ui/tests/base_setting_ui_test.php | 2 +- backup/util/ui/tests/ui_test.php | 2 +- backup/util/xml/output/tests/output_test.php | 2 +- backup/util/xml/parser/tests/parser_test.php | 2 +- backup/util/xml/tests/writer_test.php | 2 +- badges/tests/badgeslib_test.php | 24 +-- badges/tests/classes/badges_testcase.php | 184 ++++++++++++++++++ badges/tests/events_test.php | 48 +---- badges/tests/external/external_test.php | 2 +- .../output/manage_badge_action_bar_test.php | 2 +- badges/tests/privacy/provider_test.php | 2 +- .../tests/accessibility_review_test.php | 2 +- blocks/badges/tests/badges_test.php | 2 +- blocks/blog_menu/tests/blog_menu_test.php | 2 +- blocks/blog_recent/tests/blog_recent_test.php | 2 +- blocks/blog_tags/tests/blog_tags_test.php | 2 +- blocks/comments/tests/comments_test.php | 2 +- blocks/comments/tests/event/events_test.php | 2 +- .../comments/tests/privacy/provider_test.php | 2 +- .../tests/completionstatus_test.php | 2 +- .../globalsearch/tests/globalsearch_test.php | 2 +- .../tests/glossary_random_test.php | 2 +- blocks/html/tests/block_html_test.php | 2 +- blocks/html/tests/privacy/provider_test.php | 2 +- blocks/html/tests/search_content_test.php | 2 +- blocks/lp/tests/lp_test.php | 2 +- blocks/mnet_hosts/tests/mnet_hosts_test.php | 2 +- blocks/myoverview/tests/myoverview_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- blocks/online_users/tests/generator_test.php | 4 +- .../online_users/tests/online_users_test.php | 2 +- .../tests/externallib_test.php | 2 +- .../tests/helper_test.php | 2 +- .../tests/observer_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- blocks/rss_client/tests/cron_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tests/block_tag_youtube_test.php | 2 +- blocks/tags/tests/tags_test.php | 2 +- blocks/tests/externallib_test.php | 2 +- blocks/tests/privacy/provider_test.php | 2 +- .../timeline/tests/privacy/provider_test.php | 2 +- blog/tests/event/events_test.php | 2 +- blog/tests/external/external_test.php | 3 +- blog/tests/lib_test.php | 2 +- blog/tests/privacy/provider_test.php | 2 +- .../reportbuilder/datasource/blogs_test.php | 2 +- cache/stores/apcu/tests/store_test.php | 2 +- cache/stores/file/tests/asyncpurge_test.php | 2 +- cache/stores/file/tests/store_test.php | 2 +- cache/stores/redis/tests/compressor_test.php | 2 +- cache/stores/redis/tests/store_test.php | 2 +- cache/stores/session/tests/store_test.php | 2 +- cache/stores/static/tests/store_test.php | 2 +- calendar/tests/action_event_test.php | 2 +- calendar/tests/action_factory_test.php | 2 +- calendar/tests/action_test.php | 2 +- .../tests/calendar_event_exporter_test.php | 2 +- calendar/tests/calendar_information_test.php | 2 +- calendar/tests/calendartype_test.php | 2 +- calendar/tests/cm_info_proxy_test.php | 2 +- calendar/tests/container_test.php | 2 +- calendar/tests/coursecat_proxy_test.php | 2 +- calendar/tests/event/events_test.php | 2 +- calendar/tests/event_description_test.php | 2 +- calendar/tests/event_factory_test.php | 2 +- calendar/tests/event_mapper_test.php | 2 +- calendar/tests/event_test.php | 2 +- calendar/tests/event_times_test.php | 2 +- calendar/tests/event_vault_test.php | 2 +- .../events_related_objects_cache_test.php | 2 +- calendar/tests/externallib_test.php | 2 +- calendar/tests/lib_test.php | 2 +- calendar/tests/local_api_test.php | 2 +- calendar/tests/privacy/provider_test.php | 2 +- .../raw_event_retrieval_strategy_test.php | 2 +- .../tests/repeat_event_collection_test.php | 2 +- calendar/tests/rrule_manager_test.php | 2 +- calendar/tests/std_proxy_test.php | 2 +- cohort/tests/externallib_test.php | 2 +- cohort/tests/lib_test.php | 2 +- cohort/tests/privacy/provider_test.php | 2 +- .../audience/cohortmember_test.php | 2 +- .../reportbuilder/datasource/cohorts_test.php | 2 +- comment/tests/context_freeze_test.php | 2 +- comment/tests/externallib_test.php | 2 +- comment/tests/privacy/provider_test.php | 2 +- .../datasource/comments_test.php | 2 +- competency/tests/api_test.php | 2 +- competency/tests/competency_override_test.php | 2 +- competency/tests/competency_rule_test.php | 2 +- competency/tests/competency_test.php | 2 +- .../tests/course_competency_settings_test.php | 2 +- competency/tests/course_competency_test.php | 2 +- .../tests/course_module_competency_test.php | 2 +- competency/tests/event/events_test.php | 2 +- competency/tests/external/external_test.php | 2 +- competency/tests/generator_test.php | 2 +- competency/tests/hooks_test.php | 2 +- competency/tests/lib_test.php | 2 +- competency/tests/performance_helper_test.php | 2 +- competency/tests/plan_test.php | 2 +- competency/tests/privacy/provider_test.php | 2 +- competency/tests/task/task_test.php | 2 +- competency/tests/template_test.php | 2 +- .../tests/user_evidence_competency_test.php | 2 +- .../tests/activity_custom_completion_test.php | 2 +- completion/tests/api_test.php | 2 +- completion/tests/bulk_update_test.php | 2 +- completion/tests/capabilities_test.php | 2 +- .../tests/cm_completion_details_test.php | 2 +- completion/tests/completion_criteria_test.php | 2 +- completion/tests/externallib_test.php | 2 +- completion/tests/privacy/provider_test.php | 2 +- completion/tests/progress_test.php | 2 +- .../h5p/tests/content_h5p_test.php | 2 +- .../h5p/tests/contenttype_h5p_test.php | 2 +- contentbank/tests/content_test.php | 2 +- contentbank/tests/contentbank_test.php | 2 +- contentbank/tests/contenttype_test.php | 2 +- .../tests/external/delete_content_test.php | 2 +- .../tests/external/rename_content_test.php | 2 +- contentbank/tests/privacy/provider_test.php | 2 +- course/format/tests/base_test.php | 2 +- .../format/tests/external/get_state_test.php | 2 +- .../tests/external/update_course_test.php | 2 +- .../tests/output/local/state/cm_test.php | 2 +- .../tests/output/local/state/section_test.php | 2 +- .../tests/output/local/state/state_test.php | 2 +- course/format/tests/privacy/provider_test.php | 2 +- course/format/tests/stateupdates_test.php | 2 +- .../topics/tests/format_topics_test.php | 2 +- .../format/weeks/tests/format_weeks_test.php | 2 +- course/format/weeks/tests/observer_test.php | 2 +- course/tests/analytics/indicators_test.php | 2 +- course/tests/backup/restore_test.php | 2 +- course/tests/backup_restore_activity_test.php | 12 +- ..._content_item_readonly_repository_test.php | 2 +- course/tests/category_hooks_test.php | 2 +- course/tests/category_test.php | 2 +- .../content_item_readonly_repository_test.php | 2 +- course/tests/content_item_test.php | 2 +- course/tests/course_delete_modules_test.php | 2 +- course/tests/course_format_function_test.php | 2 +- course/tests/course_image_cache_test.php | 2 +- course/tests/course_summary_exporter_test.php | 2 +- course/tests/courselib_test.php | 2 +- course/tests/courserequest_test.php | 2 +- course/tests/customfield_test.php | 2 +- course/tests/event/events_test.php | 2 +- course/tests/exporters_content_item_test.php | 2 +- course/tests/exporters_content_items_test.php | 2 +- course/tests/management_helper_test.php | 2 +- course/tests/modlib_test.php | 17 +- course/tests/privacy/provider_test.php | 2 +- .../reportbuilder/datasource/courses_test.php | 2 +- course/tests/search/search_test.php | 2 +- .../services_content_item_service_test.php | 2 +- course/tests/targets_test.php | 2 +- .../task/content_notification_task_test.php | 2 +- .../field/checkbox/tests/plugin_test.php | 2 +- customfield/field/date/tests/plugin_test.php | 2 +- customfield/field/text/tests/plugin_test.php | 2 +- .../field/textarea/tests/plugin_test.php | 2 +- customfield/tests/api_test.php | 2 +- customfield/tests/generator_test.php | 2 +- customfield/tests/handler_test.php | 2 +- customfield/tests/privacy/provider_test.php | 2 +- dataformat/excel/tests/writer_test.php | 2 +- dataformat/ods/tests/writer_test.php | 2 +- dataformat/pdf/tests/writer_test.php | 2 +- enrol/category/tests/plugin_test.php | 2 +- enrol/cohort/tests/lib_test.php | 2 +- enrol/cohort/tests/privacy/provider_test.php | 2 +- enrol/cohort/tests/sync_test.php | 2 +- enrol/database/tests/lib_test.php | 2 +- enrol/database/tests/sync_test.php | 2 +- .../tests/payment/service_provider_test.php | 2 +- enrol/flatfile/tests/flatfile_test.php | 2 +- .../flatfile/tests/privacy/provider_test.php | 2 +- enrol/guest/tests/external/external_test.php | 2 +- .../tests/imsenterprise_test.php | 2 +- .../tests/imsenterprise_unenrol_test.php | 2 +- enrol/ldap/tests/ldap_test.php | 2 +- enrol/lti/tests/data_connector_test.php | 2 +- enrol/lti/tests/helper_test.php | 2 +- enrol/lti/tests/lib_test.php | 2 +- .../ltiadvantage/entity/ags_info_test.php | 2 +- .../entity/application_registration_test.php | 2 +- .../ltiadvantage/entity/context_test.php | 2 +- .../ltiadvantage/entity/deployment_test.php | 2 +- .../entity/migration_claim_test.php | 2 +- .../ltiadvantage/entity/nrps_info_test.php | 2 +- .../entity/resource_link_test.php | 2 +- .../ltiadvantage/lib/issuer_database_test.php | 2 +- .../lib/launch_cache_session_test.php | 2 +- ...plication_registration_repository_test.php | 2 +- .../repository/context_repository_test.php | 2 +- .../repository/deployment_repository_test.php | 2 +- .../legacy_consumer_repository_test.php | 2 +- .../published_resource_repository_test.php | 2 +- .../resource_link_repository_test.php | 2 +- .../repository/user_repository_test.php | 2 +- .../application_registration_service_test.php | 2 +- .../service/tool_deployment_service_test.php | 2 +- .../service/tool_launch_service_test.php | 2 +- .../ltiadvantage/task/sync_grades_test.php | 2 +- .../ltiadvantage/task/sync_members_test.php | 2 +- .../utility/message_helper_test.php | 2 +- .../viewobject/published_resource_test.php | 2 +- enrol/lti/tests/privacy/provider_test.php | 2 +- enrol/lti/tests/sync_members_test.php | 2 +- enrol/lti/tests/tool_provider_test.php | 2 +- enrol/manual/tests/externallib_test.php | 2 +- enrol/manual/tests/lib_test.php | 2 +- .../tests/external/add_instances_test.php | 2 +- .../tests/external/delete_instances_test.php | 2 +- enrol/meta/tests/plugin_test.php | 2 +- enrol/meta/tests/privacy/provider_test.php | 2 +- enrol/paypal/tests/paypal_test.php | 2 +- enrol/paypal/tests/privacy/provider_test.php | 2 +- enrol/self/tests/externallib_test.php | 2 +- enrol/self/tests/self_test.php | 2 +- enrol/tests/course_enrolment_manager_test.php | 2 +- enrol/tests/enrollib_test.php | 2 +- enrol/tests/privacy/provider_test.php | 2 +- enrol/tests/role_external_test.php | 2 +- .../component_favourite_service_test.php | 2 +- favourites/tests/privacy/provider_test.php | 2 +- favourites/tests/repository_test.php | 2 +- .../tests/user_favourite_service_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../unoconv/tests/converter_test.php | 2 +- files/tests/archive_writer_test.php | 2 +- files/tests/conversion_test.php | 2 +- files/tests/converter_test.php | 2 +- files/tests/externallib_test.php | 2 +- .../local/archive_writer/zip_writer_test.php | 2 +- files/tests/privacy/provider_test.php | 2 +- filter/displayh5p/tests/upgradelib_test.php | 2 +- filter/tex/tests/lib_test.php | 2 +- grade/export/ods/tests/event/events_test.php | 2 +- grade/export/txt/tests/event/events_test.php | 2 +- grade/export/xls/tests/event/events_test.php | 2 +- grade/export/xml/tests/event/events_test.php | 2 +- .../form/guide/tests/generator_test.php | 2 +- .../gradingpanel/external/fetch_test.php | 5 +- .../gradingpanel/external/store_test.php | 5 +- grade/grading/form/guide/tests/guide_test.php | 2 +- .../guide/tests/privacy/provider_test.php | 2 +- .../form/rubric/tests/generator_test.php | 2 +- .../gradingpanel/external/fetch_test.php | 5 +- .../gradingpanel/external/store_test.php | 5 +- .../rubric/tests/privacy/provider_test.php | 2 +- grade/grading/tests/generator_test.php | 2 +- grade/grading/tests/grading_manager_test.php | 4 +- .../tests/privacy/legacy_polyfill_test.php | 2 +- grade/grading/tests/privacy/provider_test.php | 2 +- grade/import/csv/tests/load_data_test.php | 2 +- .../grader/tests/privacy/provider_test.php | 2 +- .../overview/tests/externallib_test.php | 2 +- grade/report/singleview/tests/screen_test.php | 2 +- grade/report/user/tests/externallib_test.php | 2 +- grade/report/user/tests/lib_test.php | 2 +- .../user/tests/privacy/provider_test.php | 2 +- grade/tests/component_gradeitem_test.php | 2 +- grade/tests/component_gradeitems_test.php | 2 +- grade/tests/edittreelib_test.php | 6 +- grade/tests/event/events_test.php | 2 +- grade/tests/export_test.php | 2 +- .../external/create_gradecategories_test.php | 2 +- .../external/get_gradable_users_test.php | 2 +- .../point/external/fetch_test.php | 2 +- .../point/external/store_test.php | 2 +- .../scale/external/fetch_test.php | 2 +- .../scale/external/store_test.php | 2 +- grade/tests/importlib_test.php | 2 +- grade/tests/lib_test.php | 2 +- .../tests/output/general_action_bar_test.php | 2 +- grade/tests/privacy/provider_test.php | 2 +- grade/tests/querylib_test.php | 2 +- grade/tests/report_graderlib_test.php | 2 +- grade/tests/reportlib_test.php | 2 +- grade/tests/reportuserlib_test.php | 2 +- group/tests/externallib_test.php | 2 +- group/tests/lib_test.php | 2 +- group/tests/privacy/provider_test.php | 2 +- .../reportbuilder/datasource/groups_test.php | 2 +- h5p/tests/api_test.php | 2 +- h5p/tests/editor_ajax_test.php | 2 +- h5p/tests/editor_framework_test.php | 2 +- h5p/tests/editor_test.php | 2 +- h5p/tests/event/deleted_test.php | 2 +- h5p/tests/event/moved_test.php | 2 +- h5p/tests/external/external_test.php | 2 +- h5p/tests/file_storage_test.php | 2 +- h5p/tests/framework_test.php | 2 +- h5p/tests/generator_test.php | 2 +- h5p/tests/h5p_core_test.php | 2 +- h5p/tests/helper_test.php | 2 +- h5p/tests/local/library/handler_test.php | 2 +- iplookup/tests/geoplugin_test.php | 2 +- lib/antivirus/clamav/tests/scanner_test.php | 2 +- lib/ddl/tests/ddl_test.php | 2 +- lib/dml/tests/dml_pgsql_read_slave_test.php | 2 +- lib/dml/tests/dml_table_test.php | 2 +- lib/dml/tests/dml_test.php | 2 +- .../pgsql_native_moodle_database_test.php | 3 +- lib/dml/tests/pgsql_native_recordset_test.php | 2 +- lib/dml/tests/recordset_walk_test.php | 2 +- .../atto/tests/privacy/provider_test.php | 2 +- lib/editor/tests/privacy/provider_test.php | 2 +- .../tests/external_externallib_test.php | 2 +- lib/filebrowser/tests/file_browser_test.php | 2 +- lib/filestorage/tests/file_storage_test.php | 2 +- .../tests/file_system_filedir_test.php | 2 +- lib/filestorage/tests/file_system_test.php | 2 +- lib/filestorage/tests/mbz_packer_test.php | 2 +- lib/filestorage/tests/stored_file_test.php | 2 +- lib/filestorage/tests/tgz_packer_test.php | 2 +- lib/filestorage/tests/zip_packer_test.php | 2 +- lib/form/tests/autocomplete_test.php | 2 +- lib/form/tests/course_test.php | 2 +- lib/form/tests/dateselector_test.php | 4 +- lib/form/tests/datetimeselector_test.php | 4 +- lib/form/tests/duration_test.php | 2 +- lib/form/tests/external_test.php | 2 +- lib/form/tests/float_test.php | 2 +- lib/grade/tests/grade_category_test.php | 2 +- lib/grade/tests/grade_grade_test.php | 2 +- lib/grade/tests/grade_item_test.php | 4 +- lib/grade/tests/grade_object_test.php | 2 +- lib/grade/tests/grade_outcome_test.php | 2 +- lib/grade/tests/grade_scale_test.php | 2 +- lib/phpunit/tests/advanced_test.php | 2 +- lib/phpunit/tests/basic_test.php | 2 +- lib/phpunit/tests/phpunit_dataset_test.php | 2 +- lib/phpunit/tests/util_test.php | 2 +- lib/table/tests/external/dynamic/get_test.php | 5 +- lib/table/tests/local/filter/filter_test.php | 2 +- .../tests/local/filter/filterset_test.php | 2 +- .../local/filter/integer_filter_test.php | 2 +- .../filter/numeric_comparison_filter_test.php | 2 +- .../tests/local/filter/string_filter_test.php | 2 +- lib/testing/tests/testing_generator_test.php | 4 +- lib/testing/tests/util_test.php | 2 +- lib/tests/accesslib_has_capability_test.php | 2 +- lib/tests/accesslib_test.php | 13 +- lib/tests/adminlib_test.php | 2 +- lib/tests/admintree_test.php | 2 +- lib/tests/ajaxlib_test.php | 2 +- lib/tests/analysers_test.php | 2 +- lib/tests/analytics/indicators_test.php | 2 +- lib/tests/antivirus_test.php | 2 +- lib/tests/authlib_test.php | 4 +- lib/tests/behat_lib_test.php | 2 +- lib/tests/blocklib_test.php | 2 +- lib/tests/check_test.php | 2 +- lib/tests/classes/courses_tasks_testcase.php | 79 ++++++++ lib/tests/client_test.php | 2 +- lib/tests/collator_test.php | 2 +- lib/tests/completionlib_test.php | 2 +- lib/tests/componentlib_test.php | 2 +- lib/tests/configonlylib_test.php | 2 +- .../exportable_filearea_test.php | 2 +- .../exportable_stored_file_test.php | 2 +- .../exportable_textarea_test.php | 2 +- .../export/exporters/course_exporter_test.php | 2 +- lib/tests/content/export/zipwriter_test.php | 2 +- lib/tests/content_test.php | 2 +- lib/tests/context_block_test.php | 2 +- lib/tests/core_media_player_native_test.php | 2 +- .../core_renderer_template_exploit_test.php | 2 +- lib/tests/csvclass_test.php | 2 +- lib/tests/curl_security_helper_test.php | 2 +- lib/tests/customcontext_test.php | 2 +- lib/tests/datalib_test.php | 2 +- .../datalib_update_with_unique_index_test.php | 2 +- lib/tests/date_legacy_test.php | 4 +- lib/tests/date_test.php | 2 +- lib/tests/db/upgradelib_test.php | 2 +- lib/tests/editorlib_test.php | 2 +- lib/tests/encryption_test.php | 3 +- lib/tests/event/base_test.php | 2 +- .../contentbank_content_created_test.php | 2 +- .../contentbank_content_deleted_test.php | 2 +- .../contentbank_content_updated_test.php | 2 +- .../contentbank_content_uploaded_test.php | 2 +- .../event/contentbank_content_viewed_test.php | 2 +- lib/tests/event/context_locked_test.php | 2 +- lib/tests/event/deprecated_test.php | 2 +- lib/tests/event/events_test.php | 2 +- lib/tests/event/grade_deleted_test.php | 2 +- lib/tests/event/grade_item_deleted_test.php | 2 +- lib/tests/event/profile_field_test.php | 2 +- lib/tests/event/unknown_logged_test.php | 2 +- lib/tests/event/user_graded_test.php | 2 +- .../event/user_password_updated_test.php | 2 +- lib/tests/exporter_test.php | 2 +- .../dynamic_tabs_get_content_test.php | 2 +- .../icon_system/load_fontawesome_map_test.php | 3 +- .../record_userfeedback_action_test.php | 2 +- lib/tests/externallib_test.php | 3 +- lib/tests/filelib_test.php | 4 +- lib/tests/filestorage_zip_archive_test.php | 2 +- lib/tests/filetypes_test.php | 2 +- lib/tests/filter_manager_test.php | 2 +- lib/tests/filterlib_test.php | 2 +- lib/tests/formslib_test.php | 2 +- lib/tests/gdlib_test.php | 2 +- lib/tests/googlelib_test.php | 2 +- lib/tests/gradelib_test.php | 2 +- lib/tests/grades_external_test.php | 2 +- lib/tests/grading_external_test.php | 2 +- lib/tests/graphlib_test.php | 2 +- lib/tests/grouplib_test.php | 2 +- .../h5p_clean_orphaned_records_task_test.php | 2 +- lib/tests/htmlpurifier_test.php | 2 +- lib/tests/ip_utils_test.php | 2 +- lib/tests/jquery_test.php | 2 +- lib/tests/ldaplib_test.php | 2 +- lib/tests/licenselib_test.php | 2 +- .../lock/timing_wrapper_lock_factory_test.php | 2 +- lib/tests/lock_config_test.php | 2 +- lib/tests/lock_test.php | 2 +- lib/tests/markdown_test.php | 2 +- lib/tests/mathslib_test.php | 2 +- lib/tests/medialib_test.php | 2 +- lib/tests/message_test.php | 2 +- lib/tests/messagelib_test.php | 2 +- lib/tests/minify_test.php | 4 +- lib/tests/modinfolib_test.php | 4 +- lib/tests/moodle_page_test.php | 2 +- lib/tests/moodlelib_current_language_test.php | 2 +- lib/tests/myprofilelib_test.php | 2 +- lib/tests/navigation/output/primary_test.php | 2 +- lib/tests/navigation/views/primary_test.php | 2 +- lib/tests/navigation/views/secondary_test.php | 2 +- lib/tests/navigationlib_test.php | 2 +- lib/tests/notification_test.php | 2 +- lib/tests/oauth2_test.php | 2 +- lib/tests/output/activity_header_test.php | 2 +- lib/tests/output/icon_system_test.php | 2 +- lib/tests/output/language_menu_test.php | 2 +- .../mustache_clean_string_helper_test.php | 2 +- .../mustache_helper_collection_test.php | 2 +- .../output/mustache_quote_helper_test.php | 2 +- .../output/mustache_template_finder_test.php | 2 +- .../mustache_template_source_loader_test.php | 2 +- .../output/participants_action_bar_test.php | 2 +- lib/tests/pdflib_test.php | 2 +- lib/tests/persistent_test.php | 2 +- lib/tests/phpxmlrpc_test.php | 2 +- lib/tests/plugininfo/base_test.php | 2 +- lib/tests/plugininfo/dataformat_test.php | 2 +- lib/tests/plugininfo/repository_test.php | 2 +- lib/tests/portfoliolib_test.php | 2 +- lib/tests/progress_display_test.php | 2 +- lib/tests/progress_test.php | 2 +- lib/tests/qrcode_test.php | 2 +- lib/tests/questionlib_test.php | 2 +- lib/tests/regex_test.php | 6 +- lib/tests/report_helper_test.php | 2 +- lib/tests/requirejs_test.php | 2 +- lib/tests/rsslib_test.php | 2 +- lib/tests/rtlcss_test.php | 2 +- lib/tests/scss_test.php | 2 +- .../session/utility/cookie_helper_test.php | 2 +- lib/tests/sessionlib_test.php | 5 +- lib/tests/setuplib_test.php | 2 +- lib/tests/statslib_test.php | 2 +- lib/tests/string_manager_standard_test.php | 2 +- lib/tests/tablelib_test.php | 2 +- lib/tests/task/calendar_cron_task_test.php | 2 +- lib/tests/task/completion_daily_task_test.php | 2 +- lib/tests/task/database_logger_test.php | 2 +- .../task/h5p_get_content_types_task_test.php | 2 +- lib/tests/task/logging_test.php | 2 +- lib/tests/task/scheduled_task_test.php | 2 +- .../task/send_login_notifications_test.php | 2 +- lib/tests/text_test.php | 2 +- lib/tests/theme_config_test.php | 2 +- lib/tests/update_api_test.php | 2 +- lib/tests/update_checker_test.php | 2 +- lib/tests/update_code_manager_test.php | 2 +- lib/tests/update_validator_test.php | 2 +- lib/tests/upgrade_util_test.php | 2 +- lib/tests/upgradelib_test.php | 2 +- lib/tests/user_menu_test.php | 2 +- lib/tests/user_test.php | 2 +- lib/tests/useragent_test.php | 2 +- lib/tests/weblib_format_text_test.php | 2 +- lib/tests/weblib_test.php | 2 +- lib/tests/xhprof_test.php | 2 +- lib/tests/xmlize_test.php | 2 +- lib/userkey/tests/privacy/provider_test.php | 2 +- .../tests/external/post_statement_test.php | 2 +- lib/xapi/tests/handler_test.php | 2 +- lib/xapi/tests/iri_test.php | 2 +- .../local/statement/item_activity_test.php | 2 +- .../tests/local/statement/item_actor_test.php | 2 +- .../tests/local/statement/item_agent_test.php | 2 +- .../local/statement/item_attachment_test.php | 2 +- .../local/statement/item_context_test.php | 2 +- .../local/statement/item_definition_test.php | 2 +- .../tests/local/statement/item_group_test.php | 2 +- .../local/statement/item_object_test.php | 2 +- .../local/statement/item_result_test.php | 2 +- .../tests/local/statement/item_score_test.php | 2 +- lib/xapi/tests/local/statement/item_test.php | 2 +- .../tests/local/statement/item_verb_test.php | 2 +- lib/xapi/tests/local/statement_test.php | 2 +- login/tests/login_lib_test.php | 2 +- media/player/html5audio/tests/player_test.php | 2 +- media/player/html5video/tests/player_test.php | 2 +- media/player/videojs/tests/player_test.php | 2 +- media/player/vimeo/tests/player_test.php | 2 +- media/player/youtube/tests/player_test.php | 2 +- .../airnotifier/tests/externallib_test.php | 2 +- .../output/airnotifier/tests/manager_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../email/tests/event_observers_test.php | 2 +- .../email/tests/privacy/provider_test.php | 2 +- .../email/tests/task/send_email_test.php | 2 +- message/output/popup/tests/api_test.php | 2 +- .../output/popup/tests/externallib_test.php | 2 +- .../popup/tests/messaging_cleanup_test.php | 2 +- .../get_unread_notification_count_test.php | 2 +- message/tests/externallib_test.php | 2 +- message/tests/helper_test.php | 2 +- message/tests/inbound_test.php | 2 +- message/tests/privacy/provider_test.php | 2 +- message/tests/search_received_test.php | 2 +- message/tests/search_sent_test.php | 2 +- .../tests/task/migrate_message_data_test.php | 2 +- .../enrol/tests/privacy/provider_test.php | 2 +- mnet/tests/event/events_test.php | 2 +- .../feedback/comments/tests/feedback_test.php | 2 +- .../comments/tests/privacy/provider_test.php | 16 +- .../feedback/editpdf/tests/feedback_test.php | 2 +- .../editpdf/tests/privacy/provider_test.php | 2 +- .../feedback/file/tests/feedback_test.php | 2 +- .../feedback/file/tests/importziplib_test.php | 2 +- .../file/tests/privacy/provider_test.php | 2 +- .../comments/tests/event/events_test.php | 2 +- .../comments/tests/privacy/provider_test.php | 2 +- .../file/tests/event/events_test.php | 2 +- .../file/tests/privacy/provider_test.php | 2 +- .../onlinetext/tests/event/events_test.php | 2 +- .../onlinetext/tests/locallib_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- mod/assign/tests/backup/restore_date_test.php | 2 +- mod/assign/tests/base_test.php | 2 +- .../tests/classes/provider_testcase.php | 69 +++++++ mod/assign/tests/custom_completion_test.php | 2 +- mod/assign/tests/dates_test.php | 2 +- mod/assign/tests/downloader_test.php | 2 +- mod/assign/tests/event/events_test.php | 2 +- .../tests/external/start_submission_test.php | 2 +- mod/assign/tests/externallib_test.php | 2 +- mod/assign/tests/feedback_test.php | 2 +- mod/assign/tests/lib_test.php | 2 +- .../tests/locallib_participants_test.php | 2 +- mod/assign/tests/markerallocation_test.php | 2 +- mod/assign/tests/portfolio_caller_test.php | 2 +- .../privacy/feedback_legacy_polyfill_test.php | 2 +- mod/assign/tests/privacy/provider_test.php | 42 +--- .../submission_legacy_polyfill_test.php | 2 +- mod/assign/tests/search/search_test.php | 2 +- .../tests/backup_restore_test.php | 2 +- .../tests/completion/completion_test.php | 2 +- .../tests/external/can_join_test.php | 2 +- .../external/completion_validate_test.php | 2 +- .../tests/external/end_meeting_test.php | 2 +- .../get_bigbluebuttons_by_courses_test.php | 2 +- .../tests/external/get_join_url_test.php | 2 +- .../tests/external/get_recordings_test.php | 2 +- .../external/view_bigbluebuttonbn_test.php | 2 +- mod/bigbluebuttonbn/tests/instance_test.php | 2 +- mod/bigbluebuttonbn/tests/lib_test.php | 2 +- .../recordings/recording_data_test.php | 2 +- .../tests/local/helpers/files_test.php | 2 +- .../local/helpers/mod_helper_trait_test.php | 2 +- .../tests/local/helpers/reset_test.php | 2 +- .../tests/local/helpers/roles_test.php | 2 +- .../tests/local/helpers/user_info_test.php | 2 +- .../local/proxy/bigbluebutton_proxy_test.php | 2 +- .../local/proxy/recording_proxy_test.php | 2 +- mod/bigbluebuttonbn/tests/logger_test.php | 2 +- mod/bigbluebuttonbn/tests/meeting_test.php | 2 +- .../output/recording_row_playback_test.php | 2 +- mod/bigbluebuttonbn/tests/plugin_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- mod/bigbluebuttonbn/tests/recording_test.php | 2 +- mod/bigbluebuttonbn/tests/search_test.php | 2 +- .../task/base_send_notification_test.php | 2 +- .../tests/task/check_recordings_task_test.php | 2 +- .../tests/task/send_guest_emails_test.php | 2 +- ...send_recording_ready_notification_test.php | 2 +- .../task/upgrade_recordings_task_test.php | 2 +- mod/book/tests/event/events_test.php | 2 +- mod/book/tests/externallib_test.php | 2 +- mod/book/tests/generator_test.php | 2 +- mod/book/tests/helper_test.php | 2 +- mod/book/tests/lib_test.php | 2 +- mod/book/tests/search/search_test.php | 2 +- .../exportimscp/tests/event/events_test.php | 2 +- .../tool/importhtml/tests/locallib_test.php | 2 +- .../tool/print/tests/event/events_test.php | 2 +- mod/chat/tests/backup/restore_date_test.php | 2 +- mod/chat/tests/event/events_test.php | 2 +- mod/chat/tests/externallib_test.php | 2 +- mod/chat/tests/format_message_test.php | 2 +- mod/chat/tests/generator_test.php | 2 +- mod/chat/tests/lib_test.php | 2 +- mod/chat/tests/privacy/provider_test.php | 2 +- mod/choice/tests/backup/restore_date_test.php | 2 +- mod/choice/tests/custom_completion_test.php | 2 +- mod/choice/tests/dates_test.php | 2 +- mod/choice/tests/event/events_test.php | 2 +- mod/choice/tests/externallib_test.php | 2 +- mod/choice/tests/generator_test.php | 2 +- mod/choice/tests/lib_test.php | 2 +- mod/choice/tests/privacy/provider_test.php | 2 +- mod/data/tests/backup/restore_date_test.php | 2 +- mod/data/tests/backup/restore_type_test.php | 2 +- mod/data/tests/custom_completion_test.php | 2 +- mod/data/tests/dates_test.php | 2 +- mod/data/tests/event/events_test.php | 2 +- .../external/delete_saved_preset_test.php | 2 +- .../external/get_mapping_information_test.php | 2 +- mod/data/tests/externallib_test.php | 2 +- mod/data/tests/generator_test.php | 2 +- mod/data/tests/lib_test.php | 2 +- mod/data/tests/locallib_test.php | 2 +- mod/data/tests/manager_test.php | 2 +- mod/data/tests/preset_test.php | 2 +- mod/data/tests/privacy/provider_test.php | 2 +- mod/data/tests/search/search_test.php | 2 +- mod/data/tests/template_test.php | 2 +- .../tests/backup/restore_date_test.php | 2 +- mod/feedback/tests/completion_test.php | 2 +- mod/feedback/tests/custom_completion_test.php | 2 +- mod/feedback/tests/dates_test.php | 2 +- mod/feedback/tests/event/events_test.php | 2 +- .../tests/form/create_template_form_test.php | 2 +- .../tests/form/use_template_form_test.php | 2 +- mod/feedback/tests/generator_test.php | 2 +- mod/feedback/tests/lib_test.php | 2 +- mod/feedback/tests/privacy/provider_test.php | 2 +- mod/folder/tests/backup/restore_date_test.php | 2 +- mod/folder/tests/event/events_test.php | 2 +- mod/folder/tests/externallib_test.php | 2 +- mod/folder/tests/generator_test.php | 2 +- mod/folder/tests/lib_test.php | 2 +- mod/folder/tests/search/search_test.php | 2 +- .../summary/tests/event/events_test.php | 2 +- mod/forum/tests/backup/restore_date_test.php | 2 +- .../tests/backup_forum_activity_task_test.php | 2 +- .../tests/builders_exported_posts_test.php | 2 +- mod/forum/tests/custom_completion_test.php | 2 +- mod/forum/tests/dates_test.php | 2 +- mod/forum/tests/entities_author_test.php | 2 +- .../entities_discussion_summary_test.php | 2 +- mod/forum/tests/entities_discussion_test.php | 2 +- mod/forum/tests/entities_forum_test.php | 2 +- ...ties_post_read_receipt_collection_test.php | 2 +- mod/forum/tests/entities_post_test.php | 2 +- mod/forum/tests/entities_sorter_test.php | 2 +- mod/forum/tests/event/events_test.php | 2 +- mod/forum/tests/exporters_author_test.php | 2 +- mod/forum/tests/exporters_discussion_test.php | 5 +- mod/forum/tests/exporters_forum_test.php | 2 +- mod/forum/tests/exporters_post_test.php | 2 +- .../tests/grade/forum_gradeitem_test.php | 2 +- mod/forum/tests/grade/gradeitems_test.php | 2 +- mod/forum/tests/h5p/canedit_test.php | 2 +- mod/forum/tests/lib_test.php | 2 +- mod/forum/tests/local_container_test.php | 2 +- mod/forum/tests/locallib_test.php | 4 +- mod/forum/tests/mail_group_test.php | 2 +- mod/forum/tests/mail_test.php | 2 +- mod/forum/tests/maildigest_test.php | 2 +- mod/forum/tests/managers_capability_test.php | 2 +- mod/forum/tests/output_email_test.php | 2 +- mod/forum/tests/portfolio_caller_test.php | 2 +- mod/forum/tests/privacy/provider_test.php | 2 +- mod/forum/tests/private_replies_test.php | 2 +- mod/forum/tests/qanda_test.php | 2 +- mod/forum/tests/rsslib_test.php | 2 +- mod/forum/tests/search/search_test.php | 2 +- mod/forum/tests/subscriptions_test.php | 2 +- mod/forum/tests/vaults_author_test.php | 2 +- .../tests/vaults_discussion_list_test.php | 2 +- mod/forum/tests/vaults_discussion_test.php | 2 +- mod/forum/tests/vaults_forum_test.php | 2 +- .../tests/vaults_post_attachment_test.php | 2 +- ...ults_post_read_receipt_collection_test.php | 2 +- mod/forum/tests/vaults_post_test.php | 2 +- .../tests/backup/restore_date_test.php | 2 +- mod/glossary/tests/concept_cache_test.php | 2 +- mod/glossary/tests/custom_completion_test.php | 2 +- mod/glossary/tests/event/events_test.php | 2 +- mod/glossary/tests/external/external_test.php | 2 +- mod/glossary/tests/generator_test.php | 2 +- mod/glossary/tests/lib_test.php | 2 +- mod/glossary/tests/privacy/provider_test.php | 2 +- mod/glossary/tests/search/search_test.php | 2 +- ...ourse_module_instance_list_viewed_test.php | 2 +- .../tests/event/course_module_viewed_test.php | 2 +- .../tests/event/report_viewed_test.php | 2 +- .../tests/event/statement_received_test.php | 2 +- .../tests/external/get_attempts_test.php | 2 +- .../get_h5pactivities_by_courses_test.php | 2 +- ...et_h5pactivity_access_information_test.php | 2 +- .../tests/external/get_results_test.php | 2 +- .../tests/external/get_user_attempts_test.php | 2 +- .../tests/external/view_h5pactivity_test.php | 2 +- mod/h5pactivity/tests/local/attempt_test.php | 2 +- mod/h5pactivity/tests/local/grader_test.php | 2 +- mod/h5pactivity/tests/local/manager_test.php | 2 +- .../tests/output/result/result_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- mod/h5pactivity/tests/restore_test.php | 2 +- mod/imscp/tests/backup/restore_date_test.php | 2 +- mod/imscp/tests/externallib_test.php | 2 +- mod/imscp/tests/generator_test.php | 2 +- mod/imscp/tests/lib_test.php | 2 +- mod/label/tests/externallib_test.php | 2 +- mod/label/tests/generator_test.php | 4 +- mod/label/tests/lib_test.php | 2 +- mod/lesson/tests/backup/restore_date_test.php | 2 +- .../tests/backup/restore_override_test.php | 2 +- mod/lesson/tests/dates_test.php | 2 +- mod/lesson/tests/event/events_test.php | 2 +- mod/lesson/tests/external/external_test.php | 2 +- mod/lesson/tests/generator_test.php | 2 +- mod/lesson/tests/lib_test.php | 2 +- mod/lesson/tests/locallib_test.php | 2 +- mod/lesson/tests/numeric_helper_test.php | 2 +- mod/lesson/tests/pagetypes_test.php | 4 +- mod/lesson/tests/privacy/provider_test.php | 2 +- .../tests/gradebookservices_test.php | 9 +- .../gradebookservices/tests/lineitem_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tests/task/cleanup_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../event/unknown_service_api_called_test.php | 2 +- .../get_tool_types_and_proxies_count_test.php | 2 +- .../get_tool_types_and_proxies_test.php | 2 +- mod/lti/tests/externallib_test.php | 2 +- mod/lti/tests/generator_test.php | 4 +- mod/lti/tests/lib_test.php | 2 +- .../local/ltiopenid/jwks_helper_test.php | 2 +- .../local/ltiopenid/registration_test.php | 2 +- mod/lti/tests/locallib_test.php | 2 +- mod/lti/tests/privacy/provider_test.php | 2 +- .../tests/service_exception_handler_test.php | 2 +- mod/lti/tests/servicelib_test.php | 2 +- .../tests/task/clean_access_tokens_test.php | 2 +- mod/page/tests/externallib_test.php | 2 +- mod/page/tests/generator_test.php | 4 +- mod/page/tests/lib_test.php | 2 +- .../delaybetweenattempts/tests/rule_test.php | 4 +- .../accessrule/ipaddress/tests/rule_test.php | 4 +- .../numattempts/tests/rule_test.php | 4 +- .../offlineattempts/tests/rule_test.php | 4 +- .../openclosedate/tests/rule_test.php | 4 +- .../accessrule/password/tests/rule_test.php | 4 +- .../seb/tests/access_manager_test.php | 2 +- .../seb/tests/backup_restore_test.php | 2 +- .../accessrule/seb/tests/config_key_test.php | 2 +- .../seb/tests/event/events_test.php | 2 +- .../external/validate_quiz_access_test.php | 2 +- mod/quiz/accessrule/seb/tests/helper_test.php | 2 +- .../accessrule/seb/tests/hideif_rule_test.php | 2 +- .../seb/tests/link_generator_test.php | 2 +- .../seb/tests/privacy/provider_test.php | 2 +- .../seb/tests/property_list_test.php | 2 +- .../seb/tests/quiz_settings_test.php | 2 +- mod/quiz/accessrule/seb/tests/rule_test.php | 2 +- .../seb/tests/settings_provider_test.php | 2 +- .../accessrule/seb/tests/template_test.php | 3 +- .../securewindow/tests/rule_test.php | 2 +- .../accessrule/timelimit/tests/rule_test.php | 4 +- .../grading/tests/privacy/provider_test.php | 2 +- .../overview/tests/privacy/provider_test.php | 2 +- .../report/overview/tests/report_test.php | 2 +- .../responses/tests/privacy/provider_test.php | 2 +- .../event/observer/attempt_submitted_test.php | 2 +- .../tests/quiz_attempt_deleted_test.php | 2 +- .../tests/quiz_statistics_report_test.php | 2 +- .../tests/quiz_structure_modified_test.php | 2 +- .../tests/statistics_table_test.php | 2 +- .../statistics/tests/statistics_test.php | 2 +- mod/quiz/tests/attempt_test.php | 2 +- mod/quiz/tests/attempts_test.php | 2 +- mod/quiz/tests/backup/restore_date_test.php | 2 +- .../tests/calendar_event_modified_test.php | 2 +- mod/quiz/tests/custom_completion_test.php | 2 +- mod/quiz/tests/dates_test.php | 2 +- mod/quiz/tests/event/events_test.php | 2 +- mod/quiz/tests/external/external_test.php | 2 +- mod/quiz/tests/generator_test.php | 4 +- mod/quiz/tests/lib_test.php | 2 +- .../local_structure_slot_random_test.php | 2 +- mod/quiz/tests/locallib_test.php | 2 +- mod/quiz/tests/privacy/provider_test.php | 2 +- ...rivacy_legacy_quizaccess_polyfill_test.php | 2 +- mod/quiz/tests/qbank_helper_test.php | 2 +- ..._attempt_manual_grading_completed_test.php | 2 +- .../tests/quiz_question_bank_view_test.php | 2 +- mod/quiz/tests/quiz_question_restore_test.php | 2 +- mod/quiz/tests/quiz_question_version_test.php | 2 +- mod/quiz/tests/quizobj_test.php | 2 +- mod/quiz/tests/repaginate_test.php | 2 +- mod/quiz/tests/reportlib_test.php | 6 +- mod/quiz/tests/restore_attempt_test.php | 2 +- mod/quiz/tests/restore_override_test.php | 2 +- mod/quiz/tests/structure_test.php | 2 +- mod/quiz/tests/tags_test.php | 4 +- .../tests/backup/restore_date_test.php | 2 +- mod/resource/tests/event/events_test.php | 2 +- mod/resource/tests/externallib_test.php | 2 +- mod/resource/tests/generator_test.php | 2 +- mod/resource/tests/lib_test.php | 2 +- mod/resource/tests/search/search_test.php | 2 +- .../basic/tests/privacy/provider_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- mod/scorm/tests/backup/restore_date_test.php | 2 +- mod/scorm/tests/custom_completion_test.php | 2 +- mod/scorm/tests/dates_test.php | 2 +- mod/scorm/tests/event/events_test.php | 2 +- mod/scorm/tests/externallib_test.php | 2 +- mod/scorm/tests/formatduration_test.php | 4 +- mod/scorm/tests/generator_test.php | 2 +- mod/scorm/tests/lib_test.php | 2 +- mod/scorm/tests/locallib_test.php | 2 +- mod/scorm/tests/privacy/provider_test.php | 2 +- mod/scorm/tests/validatepackage_test.php | 2 +- mod/survey/tests/backup/restore_date_test.php | 2 +- mod/survey/tests/custom_completion_test.php | 2 +- mod/survey/tests/event/events_test.php | 2 +- mod/survey/tests/externallib_test.php | 2 +- mod/survey/tests/generator_test.php | 2 +- mod/survey/tests/lib_test.php | 2 +- mod/survey/tests/privacy/provider_test.php | 2 +- mod/survey/tests/search/search_test.php | 2 +- mod/url/tests/externallib_test.php | 2 +- mod/url/tests/generator_test.php | 2 +- mod/url/tests/lib_test.php | 2 +- mod/wiki/tests/backup/restore_date_test.php | 2 +- mod/wiki/tests/backup/restore_format_test.php | 2 +- mod/wiki/tests/event/events_test.php | 2 +- mod/wiki/tests/externallib_test.php | 2 +- mod/wiki/tests/generator_test.php | 2 +- mod/wiki/tests/lib_test.php | 2 +- mod/wiki/tests/privacy/provider_test.php | 2 +- mod/wiki/tests/search/search_test.php | 2 +- mod/wiki/tests/wikiparser_test.php | 2 +- .../manual/tests/privacy/provider_test.php | 2 +- .../random/tests/allocator_test.php | 2 +- .../tests/scheduled_allocator_test.php | 2 +- mod/workshop/eval/best/tests/lib_test.php | 2 +- .../form/accumulative/tests/lib_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../comments/tests/privacy/provider_test.php | 2 +- .../form/numerrors/tests/lib_test.php | 2 +- .../numerrors/tests/privacy/provider_test.php | 2 +- mod/workshop/form/rubric/tests/lib_test.php | 2 +- .../rubric/tests/privacy/provider_test.php | 2 +- .../tests/backup/restore_date_test.php | 2 +- mod/workshop/tests/dates_test.php | 2 +- mod/workshop/tests/event/events_test.php | 2 +- mod/workshop/tests/external/external_test.php | 2 +- mod/workshop/tests/generator_test.php | 2 +- mod/workshop/tests/lib_test.php | 2 +- mod/workshop/tests/locallib_test.php | 2 +- mod/workshop/tests/portfolio_caller_test.php | 2 +- mod/workshop/tests/privacy/provider_test.php | 2 +- mod/workshop/tests/task/cron_task_test.php | 2 +- my/tests/event/events_test.php | 2 +- my/tests/privacy/provider_test.php | 2 +- notes/tests/event/events_test.php | 2 +- notes/tests/externallib_test.php | 2 +- notes/tests/generator_test.php | 2 +- notes/tests/lib_test.php | 2 +- notes/tests/privacy/provider_test.php | 2 +- .../reportbuilder/datasource/notes_test.php | 2 +- payment/tests/generator_test.php | 2 +- payment/tests/helper_test.php | 2 +- .../tests/privacy/legacy_polyfill_test.php | 2 +- .../flickr/tests/privacy/provider_test.php | 2 +- portfolio/googledocs/tests/plugin_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../mahara/tests/privacy/provider_test.php | 2 +- .../tests/privacy/legacy_polyfill_test.php | 2 +- portfolio/tests/privacy/provider_test.php | 2 +- privacy/tests/approved_contextlist_test.php | 2 +- privacy/tests/approved_userlist_test.php | 2 +- privacy/tests/collection_test.php | 2 +- privacy/tests/contextlist_base_test.php | 2 +- privacy/tests/contextlist_collection_test.php | 2 +- privacy/tests/contextlist_test.php | 2 +- privacy/tests/legacy_polyfill_test.php | 2 +- privacy/tests/manager_test.php | 2 +- privacy/tests/moodle_content_writer_test.php | 2 +- privacy/tests/privacy/provider_test.php | 2 +- privacy/tests/request_helper_test.php | 2 +- privacy/tests/request_transform_test.php | 2 +- privacy/tests/sitepolicy_test.php | 2 +- privacy/tests/tests_content_writer_test.php | 2 +- privacy/tests/types_database_table_test.php | 2 +- .../tests/types_external_location_test.php | 2 +- privacy/tests/types_plugintype_link_test.php | 2 +- privacy/tests/types_subsystem_link_test.php | 2 +- privacy/tests/types_user_preference_test.php | 2 +- privacy/tests/userlist_base_test.php | 2 +- privacy/tests/userlist_test.php | 2 +- privacy/tests/writer_test.php | 2 +- question/bank/bulkmove/tests/helper_test.php | 2 +- .../tests/column_manager_test.php | 2 +- .../columnsortorder_external_test.php | 3 +- question/bank/comment/tests/backup_test.php | 2 +- .../event/comment_created_deleted_test.php | 2 +- question/bank/comment/tests/lib_test.php | 2 +- .../comment/tests/privacy/provider_test.php | 2 +- .../customfields/tests/customfield_test.php | 2 +- .../tests/question_handler_test.php | 2 +- .../bank/deletequestion/tests/helper_test.php | 2 +- .../update_question_version_status_test.php | 2 +- .../bank/exporttoxml/tests/helper_test.php | 2 +- question/bank/history/tests/helper_test.php | 2 +- .../tests/question_history_view_test.php | 2 +- .../tests/question_category_object_test.php | 2 +- .../tests/qbank_preview_helper_test.php | 2 +- .../bank/statistics/tests/helper_test.php | 2 +- .../tests/external/submit_tags_test.php | 2 +- question/bank/usage/tests/helper_test.php | 2 +- .../bank/usage/tests/question_usage_test.php | 2 +- .../adaptive/tests/behaviour_type_test.php | 2 +- .../adaptive/tests/mark_display_test.php | 2 +- .../adaptive/tests/walkthrough_test.php | 2 +- .../tests/walkthrough_test.php | 2 +- .../deferredcbm/tests/behaviour_type_test.php | 2 +- .../deferredcbm/tests/question_cbm_test.php | 2 +- .../deferredcbm/tests/walkthrough_test.php | 4 +- .../tests/behaviour_type_test.php | 2 +- .../tests/walkthrough_test.php | 4 +- .../tests/behaviour_type_test.php | 2 +- .../immediatecbm/tests/walkthrough_test.php | 4 +- .../tests/behaviour_type_test.php | 2 +- .../tests/walkthrough_test.php | 4 +- .../tests/behaviour_type_test.php | 2 +- .../tests/walkthrough_test.php | 4 +- .../interactive/tests/behaviour_type_test.php | 2 +- .../interactive/tests/walkthrough_test.php | 2 +- .../tests/behaviour_type_test.php | 2 +- .../tests/walkthrough_test.php | 4 +- .../tests/behaviour_type_test.php | 2 +- .../manualgraded/tests/walkthrough_test.php | 4 +- .../missing/tests/behaviour_type_test.php | 2 +- .../missing/tests/missingbehaviour_test.php | 2 +- .../tests/datalib_reporting_queries_test.php | 2 +- question/engine/tests/datalib_test.php | 2 +- .../engine/tests/qubaid_condition_test.php | 2 +- .../tests/question_display_options_test.php | 2 +- .../engine/tests/question_engine_test.php | 2 +- .../tests/question_reference_manager_test.php | 2 +- .../engine/tests/questionattempt_db_test.php | 4 +- .../engine/tests/questionattempt_test.php | 2 +- .../tests/questionattempt_with_steps_test.php | 2 +- .../tests/questionattemptiterator_test.php | 2 +- .../tests/questionattemptstep_db_test.php | 4 +- .../engine/tests/questionattemptstep_test.php | 4 +- .../questionattemptstepiterator_test.php | 2 +- question/engine/tests/questionbank_test.php | 2 +- question/engine/tests/questionstate_test.php | 4 +- .../tests/questionusage_autosave_test.php | 2 +- .../questionusagebyactivity_data_test.php | 4 +- .../tests/questionusagebyactivity_test.php | 2 +- question/engine/tests/questionutils_test.php | 4 +- question/engine/tests/unitofwork_test.php | 2 +- question/engine/tests/walkthrough_test.php | 2 +- .../format/aiken/tests/aikenformat_test.php | 4 +- .../aiken/tests/qformat_aiken_export_test.php | 2 +- .../tests/blackboardformatpool_test.php | 2 +- .../tests/blackboardsixformatqti_test.php | 2 +- .../format/gift/tests/giftformat_test.php | 2 +- .../tests/multianswerformat_test.php | 2 +- .../tests/qformat_xml_import_export_test.php | 2 +- question/format/xml/tests/xmlformat_test.php | 2 +- question/tests/backup_test.php | 2 +- .../calculated_question_summary_test.php | 2 +- question/tests/event/events_test.php | 2 +- question/tests/externallib_test.php | 2 +- question/tests/generator_test.php | 4 +- question/tests/importexport_test.php | 4 +- .../least_used_variant_strategy_test.php | 2 +- .../context_to_string_translator_test.php | 2 +- question/tests/privacy/provider_test.php | 2 +- question/tests/question_bank_column_test.php | 2 +- question/tests/version_test.php | 2 +- .../tests/formula_validation_test.php | 2 +- .../type/calculated/tests/question_test.php | 9 +- .../calculated/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 4 +- .../tests/variablesubstituter_test.php | 4 +- .../calculated/tests/walkthrough_test.php | 4 +- .../calculatedmulti/tests/question_test.php | 4 +- .../tests/upgrade_old_attempt_data_test.php | 4 +- .../tests/walkthrough_test.php | 2 +- .../calculatedsimple/tests/question_test.php | 4 +- .../tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 4 +- .../tests/walkthrough_test.php | 4 +- .../tests/form/edit_form_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../tests/question_type_test.php | 2 +- .../ddimageortext/tests/walkthrough_test.php | 2 +- .../ddmarker/tests/form/edit_form_test.php | 2 +- .../ddmarker/tests/privacy/provider_test.php | 2 +- .../ddmarker/tests/question_type_test.php | 2 +- question/type/ddmarker/tests/shapes_test.php | 2 +- .../type/ddmarker/tests/walkthrough_test.php | 2 +- .../type/ddwtos/tests/form/edit_form_test.php | 2 +- .../ddwtos/tests/privacy/provider_test.php | 2 +- question/type/ddwtos/tests/question_test.php | 2 +- .../type/ddwtos/tests/question_type_test.php | 2 +- .../type/ddwtos/tests/walkthrough_test.php | 2 +- .../description/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../description/tests/walkthrough_test.php | 2 +- .../type/essay/tests/form/edit_form_test.php | 2 +- .../essay/tests/privacy/provider_test.php | 2 +- question/type/essay/tests/question_test.php | 4 +- .../type/essay/tests/question_type_test.php | 2 +- question/type/essay/tests/restore_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../type/essay/tests/walkthrough_test.php | 2 +- .../gapselect/tests/form/edit_form_test.php | 2 +- .../gapselect/tests/privacy/provider_test.php | 2 +- .../type/gapselect/tests/question_test.php | 2 +- .../gapselect/tests/question_type_test.php | 2 +- .../type/gapselect/tests/walkthrough_test.php | 4 +- question/type/match/tests/backup_test.php | 2 +- .../match/tests/privacy/provider_test.php | 2 +- question/type/match/tests/question_test.php | 2 +- .../type/match/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../type/match/tests/walkthrough_test.php | 2 +- .../missingtype/tests/missingtype_test.php | 2 +- .../type/multianswer/tests/question_test.php | 4 +- .../multianswer/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 4 +- .../multianswer/tests/walkthrough_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../multichoice/tests/question_multi_test.php | 2 +- .../tests/question_single_test.php | 2 +- .../multichoice/tests/question_type_test.php | 2 +- .../multichoice/tests/walkthrough_test.php | 4 +- question/type/numerical/tests/answer_test.php | 4 +- .../numerical/tests/answerprocessor_test.php | 2 +- .../type/numerical/tests/question_test.php | 4 +- .../numerical/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../type/numerical/tests/walkthrough_test.php | 4 +- .../type/random/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../randomsamatch/tests/question_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 4 +- .../randomsamatch/tests/walkthrough_test.php | 2 +- .../tests/privacy/provider_test.php | 2 +- .../type/shortanswer/tests/question_test.php | 4 +- .../shortanswer/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../type/tests/question_definition_test.php | 4 +- ..._matching_answer_grading_strategy_test.php | 2 +- question/type/tests/question_hint_test.php | 4 +- question/type/tests/question_type_test.php | 4 +- .../type/truefalse/tests/question_test.php | 4 +- .../truefalse/tests/question_type_test.php | 2 +- .../tests/upgrade_old_attempt_data_test.php | 2 +- .../type/truefalse/tests/walkthrough_test.php | 4 +- rating/tests/externallib_test.php | 2 +- rating/tests/privacy/provider_test.php | 2 +- rating/tests/rating_test.php | 2 +- report/completion/tests/event/events_test.php | 2 +- report/insights/tests/externallib_test.php | 2 +- report/log/tests/event/events_test.php | 2 +- report/log/tests/lib_test.php | 2 +- report/log/tests/renderable_test.php | 51 ++++- report/loglive/tests/event/events_test.php | 2 +- report/loglive/tests/lib_test.php | 2 +- report/outline/tests/lib_test.php | 2 +- report/participation/tests/lib_test.php | 2 +- .../tests/event/events_test.php | 2 +- report/stats/tests/event/events_test.php | 2 +- report/stats/tests/lib_test.php | 2 +- report/stats/tests/privacy/provider_test.php | 2 +- report/usersessions/tests/lib_test.php | 2 +- .../tests/external/audiences/delete_test.php | 2 +- .../tests/external/columns/reorder_test.php | 2 +- .../tests/external/columns/sort/get_test.php | 2 +- .../tests/external/conditions/add_test.php | 2 +- .../tests/external/conditions/delete_test.php | 2 +- .../external/conditions/reorder_test.php | 2 +- .../tests/external/conditions/reset_test.php | 2 +- ...om_report_audience_cards_exporter_test.php | 2 +- .../custom_report_card_view_exporter_test.php | 2 +- ...stom_report_column_cards_exporter_test.php | 2 +- ...custom_report_conditions_exporter_test.php | 2 +- .../custom_report_data_exporter_test.php | 2 +- .../external/custom_report_exporter_test.php | 2 +- .../custom_report_filters_exporter_test.php | 2 +- .../tests/external/filters/add_test.php | 2 +- .../tests/external/filters/delete_test.php | 2 +- .../tests/external/filters/reorder_test.php | 2 +- .../tests/external/filters/reset_test.php | 2 +- .../tests/external/filters/set_test.php | 2 +- .../tests/external/reports/delete_test.php | 2 +- .../tests/external/reports/get_test.php | 2 +- .../tests/external/reports/view_test.php | 2 +- .../tests/external/schedules/delete_test.php | 2 +- .../tests/external/schedules/send_test.php | 2 +- .../tests/external/schedules/toggle_test.php | 2 +- .../external/system_report_exporter_test.php | 2 +- reportbuilder/tests/generator_test.php | 2 +- .../tests/local/aggregation/avg_test.php | 2 +- .../tests/local/aggregation/count_test.php | 2 +- .../local/aggregation/countdistinct_test.php | 2 +- .../local/aggregation/groupconcat_test.php | 2 +- .../aggregation/groupconcatdistinct_test.php | 2 +- .../tests/local/aggregation/max_test.php | 2 +- .../tests/local/aggregation/min_test.php | 2 +- .../tests/local/aggregation/percent_test.php | 2 +- .../tests/local/aggregation/sum_test.php | 2 +- .../tests/local/entities/user_test.php | 2 +- .../tests/local/filters/autocomplete_test.php | 2 +- .../local/filters/boolean_select_test.php | 2 +- .../tests/local/filters/category_test.php | 2 +- .../local/filters/course_selector_test.php | 2 +- .../tests/local/filters/select_test.php | 2 +- .../tests/local/filters/tags_test.php | 2 +- .../tests/local/filters/text_test.php | 2 +- .../tests/local/filters/user_test.php | 2 +- .../helpers/user_filter_manager_test.php | 2 +- .../tests/local/models/audience_test.php | 2 +- .../tests/local/models/report_test.php | 2 +- .../tests/local/models/schedule_test.php | 2 +- .../tests/local/report/action_test.php | 2 +- .../tests/local/report/base_test.php | 2 +- reportbuilder/tests/manager_test.php | 2 +- .../output/audience_heading_editable_test.php | 2 +- .../column_aggregation_editable_test.php | 2 +- .../output/column_heading_editable_test.php | 2 +- .../output/filter_heading_editable_test.php | 2 +- .../output/report_name_editable_test.php | 2 +- .../output/schedule_name_editable_test.php | 2 +- reportbuilder/tests/privacy/provider_test.php | 2 +- .../reportbuilder/audience/admins_test.php | 2 +- .../reportbuilder/audience/allusers_test.php | 2 +- .../reportbuilder/audience/manual_test.php | 2 +- .../audience/systemrole_test.php | 2 +- .../tests/system_report_factory_test.php | 2 +- reportbuilder/tests/system_report_test.php | 2 +- .../tests/task/send_schedule_test.php | 2 +- repository/contentbank/tests/browser_test.php | 2 +- .../contentbank/tests/search/search_test.php | 2 +- repository/dropbox/tests/api_test.php | 2 +- .../flickr/tests/privacy/provider_test.php | 2 +- .../tests/googledocs_search_content_test.php | 2 +- repository/googledocs/tests/helper_test.php | 2 +- .../browser/googledocs_drive_content_test.php | 2 +- .../tests/local/node/folder_node_test.php | 2 +- .../access_controlled_link_manager_test.php | 2 +- repository/nextcloud/tests/lib_test.php | 2 +- repository/nextcloud/tests/ocs_test.php | 2 +- .../onedrive/tests/privacy/provider_test.php | 2 +- repository/recent/tests/lib_test.php | 2 +- repository/tests/generator_test.php | 2 +- repository/tests/privacy/provider_test.php | 2 +- repository/tests/repositorylib_test.php | 2 +- repository/url/tests/lib_test.php | 2 +- rss/tests/privacy/provider_test.php | 2 +- search/engine/simpledb/tests/engine_test.php | 2 +- .../simpledb/tests/privacy/provider_test.php | 2 +- .../solr/tests/privacy/provider_test.php | 2 +- search/tests/area_category_test.php | 2 +- search/tests/base_activity_test.php | 2 +- search/tests/base_block_test.php | 2 +- search/tests/base_test.php | 2 +- search/tests/document_icon_test.php | 2 +- search/tests/document_test.php | 2 +- search/tests/engine_test.php | 2 +- search/tests/event/events_test.php | 2 +- search/tests/external_test.php | 2 +- search/tests/manager_test.php | 2 +- .../skip_future_documents_iterator_test.php | 2 +- search/tests/top_result_test.php | 2 +- tag/tests/event/events_test.php | 2 +- tag/tests/external/external_test.php | 2 +- tag/tests/privacy/provider_test.php | 2 +- .../reportbuilder/datasource/tags_test.php | 2 +- tag/tests/taglib_test.php | 2 +- theme/boost/tests/boostnavbar_test.php | 2 +- theme/boost/tests/privacy/provider_test.php | 2 +- theme/boost/tests/scss_test.php | 2 +- theme/classic/tests/scss_test.php | 2 +- .../checkbox/tests/privacy/provider_test.php | 2 +- .../datetime/tests/privacy/provider_test.php | 2 +- .../menu/tests/privacy/provider_test.php | 2 +- .../social/tests/privacy/provider_test.php | 2 +- .../field/text/tests/field_class_test.php | 2 +- .../text/tests/privacy/provider_test.php | 2 +- .../textarea/tests/privacy/provider_test.php | 2 +- user/tests/devicekey_test.php | 3 +- user/tests/editlib_test.php | 2 +- .../update_user_device_public_key_test.php | 2 +- user/tests/fields_test.php | 2 +- .../tests/group_non_members_selector_test.php | 2 +- user/tests/myprofile_test.php | 2 +- user/tests/profilelib_test.php | 2 +- user/tests/search/search_test.php | 2 +- user/tests/userlib_test.php | 2 +- user/tests/userroleseditable_test.php | 2 +- user/tests/userselector_test.php | 2 +- webservice/soap/tests/wsdl_test.php | 2 +- webservice/tests/event/events_test.php | 2 +- webservice/tests/lib_test.php | 2 +- webservice/tests/privacy/provider_test.php | 3 +- 1458 files changed, 1986 insertions(+), 1666 deletions(-) create mode 100644 badges/tests/classes/badges_testcase.php create mode 100644 lib/tests/classes/courses_tasks_testcase.php create mode 100644 mod/assign/tests/classes/provider_testcase.php diff --git a/admin/presets/tests/generator_test.php b/admin/presets/tests/generator_test.php index a8bef76ceed..8c5d6b9d92e 100644 --- a/admin/presets/tests/generator_test.php +++ b/admin/presets/tests/generator_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass core_adminpresets_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Test the behaviour of create_preset() method. diff --git a/admin/presets/tests/helper_test.php b/admin/presets/tests/helper_test.php index eea7ddc2595..4acb34cb839 100644 --- a/admin/presets/tests/helper_test.php +++ b/admin/presets/tests/helper_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test the behaviour of create_preset() method. diff --git a/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php b/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php index 4f6a59a5a65..a040691bb44 100644 --- a/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php +++ b/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_bloglevel */ -class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase { +final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php b/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php index de2f2159800..ba0c9f8b460 100644 --- a/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php +++ b/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext */ -class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase { +final class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/local/setting/adminpresets_setting_test.php b/admin/presets/tests/local/setting/adminpresets_setting_test.php index e57dbb9ed0e..b44e7f4f3e0 100644 --- a/admin/presets/tests/local/setting/adminpresets_setting_test.php +++ b/admin/presets/tests/local/setting/adminpresets_setting_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_setting */ -class adminpresets_setting_test extends \advanced_testcase { +final class adminpresets_setting_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/manager_test.php b/admin/presets/tests/manager_test.php index 193997b3153..92066aa68eb 100644 --- a/admin/presets/tests/manager_test.php +++ b/admin/presets/tests/manager_test.php @@ -27,7 +27,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\manager */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test the behaviour of protected get_site_settings method. * diff --git a/admin/presets/tests/privacy/privacy_provider_test.php b/admin/presets/tests/privacy/privacy_provider_test.php index fb2bfbdc9c0..dc9020aeb78 100644 --- a/admin/presets/tests/privacy/privacy_provider_test.php +++ b/admin/presets/tests/privacy/privacy_provider_test.php @@ -30,7 +30,7 @@ use core_privacy\tests\provider_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\privacy\provider */ -class privacy_provider_test extends provider_testcase { +final class privacy_provider_test extends provider_testcase { /** * Test for provider::get_metadata(). diff --git a/admin/roles/tests/preset_test.php b/admin/roles/tests/preset_test.php index 915565a6fc5..63ef69c0296 100644 --- a/admin/roles/tests/preset_test.php +++ b/admin/roles/tests/preset_test.php @@ -26,8 +26,8 @@ use core_role_preset; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class preset_test extends \advanced_testcase { - public function test_xml() { +final class preset_test extends \advanced_testcase { + public function test_xml(): void { global $DB; $roles = $DB->get_records('role'); diff --git a/admin/roles/tests/privacy/provider_test.php b/admin/roles/tests/privacy/provider_test.php index 2504be7f822..37f2a4dd47a 100644 --- a/admin/roles/tests/privacy/provider_test.php +++ b/admin/roles/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test to check export_user_preferences. * returns user preferences data. diff --git a/admin/tests/reportbuilder/datasource/task_logs_test.php b/admin/tests/reportbuilder/datasource/task_logs_test.php index b1ea340e797..5395fe9f09c 100644 --- a/admin/tests/reportbuilder/datasource/task_logs_test.php +++ b/admin/tests/reportbuilder/datasource/task_logs_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_logs_test extends core_reportbuilder_testcase { +final class task_logs_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/admin/tool/admin_presets/tests/event/preset_deleted_test.php b/admin/tool/admin_presets/tests/event/preset_deleted_test.php index 1c98d22d0df..ca1271b8574 100644 --- a/admin/tool/admin_presets/tests/event/preset_deleted_test.php +++ b/admin/tool/admin_presets/tests/event/preset_deleted_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_deleted */ -class preset_deleted_test extends \advanced_testcase { +final class preset_deleted_test extends \advanced_testcase { /** * Test preset_deleted event. diff --git a/admin/tool/admin_presets/tests/event/preset_downloaded_test.php b/admin/tool/admin_presets/tests/event/preset_downloaded_test.php index dba509b7897..395862f84ed 100644 --- a/admin/tool/admin_presets/tests/event/preset_downloaded_test.php +++ b/admin/tool/admin_presets/tests/event/preset_downloaded_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_downloaded */ -class preset_downloaded_test extends \advanced_testcase { +final class preset_downloaded_test extends \advanced_testcase { /** * Test preset_downloaded event. diff --git a/admin/tool/admin_presets/tests/event/preset_exported_test.php b/admin/tool/admin_presets/tests/event/preset_exported_test.php index 6e0314f32cf..734c0642c0f 100644 --- a/admin/tool/admin_presets/tests/event/preset_exported_test.php +++ b/admin/tool/admin_presets/tests/event/preset_exported_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_exported */ -class preset_exported_test extends \advanced_testcase { +final class preset_exported_test extends \advanced_testcase { /** * Test preset_exported event. diff --git a/admin/tool/admin_presets/tests/event/preset_imported_test.php b/admin/tool/admin_presets/tests/event/preset_imported_test.php index 0298d209e41..098bad9a1fb 100644 --- a/admin/tool/admin_presets/tests/event/preset_imported_test.php +++ b/admin/tool/admin_presets/tests/event/preset_imported_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_imported */ -class preset_imported_test extends \advanced_testcase { +final class preset_imported_test extends \advanced_testcase { /** * Test preset_imported event. diff --git a/admin/tool/admin_presets/tests/event/preset_loaded_test.php b/admin/tool/admin_presets/tests/event/preset_loaded_test.php index 32405f4eff3..775ad0c8d8c 100644 --- a/admin/tool/admin_presets/tests/event/preset_loaded_test.php +++ b/admin/tool/admin_presets/tests/event/preset_loaded_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_loaded */ -class preset_loaded_test extends \advanced_testcase { +final class preset_loaded_test extends \advanced_testcase { /** * Test preset_loaded event. diff --git a/admin/tool/admin_presets/tests/event/preset_previewed_test.php b/admin/tool/admin_presets/tests/event/preset_previewed_test.php index 2a27ca117eb..473e1843ba1 100644 --- a/admin/tool/admin_presets/tests/event/preset_previewed_test.php +++ b/admin/tool/admin_presets/tests/event/preset_previewed_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_previewed */ -class preset_previewed_test extends \advanced_testcase { +final class preset_previewed_test extends \advanced_testcase { /** * Test preset_previewed event. diff --git a/admin/tool/admin_presets/tests/event/preset_reverted_test.php b/admin/tool/admin_presets/tests/event/preset_reverted_test.php index 61210220e03..522d74070f3 100644 --- a/admin/tool/admin_presets/tests/event/preset_reverted_test.php +++ b/admin/tool/admin_presets/tests/event/preset_reverted_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_reverted */ -class preset_reverted_test extends \advanced_testcase { +final class preset_reverted_test extends \advanced_testcase { /** * Test preset_reverted event. diff --git a/admin/tool/admin_presets/tests/event/presets_listed_test.php b/admin/tool/admin_presets/tests/event/presets_listed_test.php index 84765486f7e..54adbe8bc5d 100644 --- a/admin/tool/admin_presets/tests/event/presets_listed_test.php +++ b/admin/tool/admin_presets/tests/event/presets_listed_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\presets_listed */ -class presets_listed_test extends \advanced_testcase { +final class presets_listed_test extends \advanced_testcase { /** * Test presets_listed event. diff --git a/admin/tool/admin_presets/tests/local/action/base_test.php b/admin/tool/admin_presets/tests/local/action/base_test.php index de2b8354057..50d437f895d 100644 --- a/admin/tool/admin_presets/tests/local/action/base_test.php +++ b/admin/tool/admin_presets/tests/local/action/base_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\base */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** * Test the behaviour of log() method. diff --git a/admin/tool/admin_presets/tests/local/action/delete_test.php b/admin/tool/admin_presets/tests/local/action/delete_test.php index 4b808394102..95b47007d15 100644 --- a/admin/tool/admin_presets/tests/local/action/delete_test.php +++ b/admin/tool/admin_presets/tests/local/action/delete_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\delete */ -class delete_test extends \advanced_testcase { +final class delete_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/export_test.php b/admin/tool/admin_presets/tests/local/action/export_test.php index 0a7660b7939..0a1ae11dc73 100644 --- a/admin/tool/admin_presets/tests/local/action/export_test.php +++ b/admin/tool/admin_presets/tests/local/action/export_test.php @@ -27,7 +27,7 @@ use core_adminpresets\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\export */ -class export_test extends \advanced_testcase { +final class export_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/import_test.php b/admin/tool/admin_presets/tests/local/action/import_test.php index 9369100a93b..09f10a43314 100644 --- a/admin/tool/admin_presets/tests/local/action/import_test.php +++ b/admin/tool/admin_presets/tests/local/action/import_test.php @@ -27,7 +27,7 @@ use core_adminpresets\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\import */ -class import_test extends \advanced_testcase { +final class import_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/load_test.php b/admin/tool/admin_presets/tests/local/action/load_test.php index 459203899ed..937c61eb354 100644 --- a/admin/tool/admin_presets/tests/local/action/load_test.php +++ b/admin/tool/admin_presets/tests/local/action/load_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\load */ -class load_test extends \advanced_testcase { +final class load_test extends \advanced_testcase { /** * Test the behaviour of show() method when the preset id doesn't exist. diff --git a/admin/tool/admin_presets/tests/local/action/rollback_test.php b/admin/tool/admin_presets/tests/local/action/rollback_test.php index 52cb6e49f97..d0742b3932c 100644 --- a/admin/tool/admin_presets/tests/local/action/rollback_test.php +++ b/admin/tool/admin_presets/tests/local/action/rollback_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\rollback */ -class rollback_test extends \advanced_testcase { +final class rollback_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/analytics/tests/external/external_test.php b/admin/tool/analytics/tests/external/external_test.php index fd1fc45e0dc..3e880d9a173 100644 --- a/admin/tool/analytics/tests/external/external_test.php +++ b/admin/tool/analytics/tests/external/external_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/analytics/tests/fixtures/test_target_course_level * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * test_potential_contexts description diff --git a/admin/tool/behat/tests/behat_form_text_test.php b/admin/tool/behat/tests/behat_form_text_test.php index 2ec6720aa38..80148deb7cf 100644 --- a/admin/tool/behat/tests/behat_form_text_test.php +++ b/admin/tool/behat/tests/behat_form_text_test.php @@ -46,7 +46,7 @@ require_once($CFG->libdir . '/behat/form_field/behat_form_text.php'); * @covers \behat_form_text * @covers \behat_form_field */ -class behat_form_text_test extends \basic_testcase { +final class behat_form_text_test extends \basic_testcase { /** * Data provider for the test_set_get_value() method. diff --git a/admin/tool/behat/tests/external/get_entity_generator_test.php b/admin/tool/behat/tests/external/get_entity_generator_test.php index 5ab04fd041e..829ab904f9e 100644 --- a/admin/tool/behat/tests/external/get_entity_generator_test.php +++ b/admin/tool/behat/tests/external/get_entity_generator_test.php @@ -30,7 +30,7 @@ namespace tool_behat\external; * * @covers \tool_behat\external\get_entity_generator */ -class get_entity_generator_test extends \advanced_testcase { +final class get_entity_generator_test extends \advanced_testcase { /** * Log in as admin diff --git a/admin/tool/behat/tests/manager_util_test.php b/admin/tool/behat/tests/manager_util_test.php index 39fc8e09de2..d6ac662388b 100644 --- a/admin/tool/behat/tests/manager_util_test.php +++ b/admin/tool/behat/tests/manager_util_test.php @@ -1,7 +1,4 @@ libdir . '/behat/classes/behat_config_manager.php'); * @copyright 2016 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_behat_manager_util_testcase extends advanced_testcase { - +final class manager_util_test extends \advanced_testcase { /** @var array Fixtures features which are available. */ private $featurepaths = array( 'default' => array( diff --git a/admin/tool/brickfield/tests/accessibility_test.php b/admin/tool/brickfield/tests/accessibility_test.php index 21cb64d8f5e..c9c1c1de3b2 100644 --- a/admin/tool/brickfield/tests/accessibility_test.php +++ b/admin/tool/brickfield/tests/accessibility_test.php @@ -26,7 +26,7 @@ use tool_brickfield\local\tool\filter; * @author Jay Churchward (jay@brickfieldlabs.ie) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class accessibility_test extends \advanced_testcase { +final class accessibility_test extends \advanced_testcase { /** * Test get_title(). diff --git a/admin/tool/brickfield/tests/area_test.php b/admin/tool/brickfield/tests/area_test.php index 6e88895c10a..14643f5adae 100644 --- a/admin/tool/brickfield/tests/area_test.php +++ b/admin/tool/brickfield/tests/area_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/admin/tool/brickfield/tests/area_test_base.php'); * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class area_test extends area_test_base { +final class area_test extends area_test_base { /** * Test for the area assign intro */ diff --git a/admin/tool/brickfield/tests/filters_test.php b/admin/tool/brickfield/tests/filters_test.php index edb5cde5b33..2fe78a5f2d6 100644 --- a/admin/tool/brickfield/tests/filters_test.php +++ b/admin/tool/brickfield/tests/filters_test.php @@ -26,8 +26,8 @@ use tool_brickfield\local\tool\filter; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filters_test extends \advanced_testcase { - public function test_constructor() { +final class filters_test extends \advanced_testcase { + public function test_constructor(): void { $this->resetAfterTest(); // Variables. diff --git a/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php b/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php index 30d7c842384..26b27b5ba3f 100644 --- a/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php +++ b/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php @@ -23,7 +23,7 @@ namespace tool_brickfield\local\areas\core_question; * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionanswers_test extends \advanced_testcase { +final class questionanswers_test extends \advanced_testcase { /** * Set up before class. diff --git a/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php b/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php index 4e90f2f932d..99e8ba98ad6 100644 --- a/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php +++ b/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php @@ -30,7 +30,7 @@ use tool_brickfield\area_test_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_brickfield\local\areas\core_question\base */ -class questiontext_test extends area_test_base { +final class questiontext_test extends area_test_base { /** * Set up before class. */ diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php index 2902dd9a6e1..19357b64f44 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_links_dont_open_new_window_testcase */ -class a_links_dont_open_new_window_test extends all_checks { +final class a_links_dont_open_new_window_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_links_dont_open_new_window'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php index 840258a47b5..3c5a0b49a11 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_must_contain_text_testcase */ -class a_must_contain_text_test extends all_checks { +final class a_must_contain_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_must_contain_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php index 61e55df229f..f43005394f4 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_suspicious_link_text */ -class a_suspicious_link_text_test extends all_checks { +final class a_suspicious_link_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_suspicious_link_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php index 119acc2d7de..9445e37db57 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class area_dont_open_new_window_testcase */ -class area_dont_open_new_window_test extends all_checks { +final class area_dont_open_new_window_test extends all_checks { /** @var string Check type */ protected $checktype = 'area_dont_open_new_window'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php index 216b24e6d89..df0729c1fb9 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class area_has_alt_value_testcase */ -class area_has_alt_value_test extends all_checks { +final class area_has_alt_value_test extends all_checks { /** @var string Check type */ protected $checktype = 'area_has_alt_value'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php index e1bca45514f..7a667f83ec7 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class basefont_is_not_used_testcase */ -class basefont_is_not_used_test extends all_checks { +final class basefont_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'basefont_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php index 66a4ce965ac..22ed04817c1 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class blink_is_not_used_testcase */ -class blink_is_not_used_test extends all_checks { +final class blink_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'blink_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php index a99978976b5..981cadec22c 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class bold_is_not_used_testcase */ -class bold_is_not_used_test extends all_checks { +final class bold_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'bold_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php index a5a6702b1d1..f4f564c9d45 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class content_too_long_testcase */ -class content_too_long_test extends all_checks { +final class content_too_long_test extends all_checks { /** @var string Check type */ protected $checktype = 'content_too_long'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php index 64e283f91d1..d60884df2fb 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class embed_has_associated_no_embed_testcase */ -class embed_has_associated_no_embed_test extends all_checks { +final class embed_has_associated_no_embed_test extends all_checks { /** @var string Check type */ protected $checktype = 'embed_has_associated_no_embed'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php index 2941ebe595c..b03c887e3ff 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class header_h3_testcase */ -class header_h3_test extends all_checks { +final class header_h3_test extends all_checks { /** @var string Check type */ protected $checktype = 'header_h3'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php index 43b55534f77..5118bdb0687 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class headers_have_text_testcase */ -class headers_have_text_test extends all_checks { +final class headers_have_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'headers_have_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php index 29bea3ea8be..fbf198cbd08 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class i_is_not_used_testcase */ -class i_is_not_used_test extends all_checks { +final class i_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'i_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php index c9c420bc8d5..c33c100aa11 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_is_different_testcase */ -class img_alt_is_different_test extends all_checks { +final class img_alt_is_different_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_is_different'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php index c5ab718e4d7..b3f17d0e1fa 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_is_too_long_testcase */ -class img_alt_is_too_long_test extends all_checks { +final class img_alt_is_too_long_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_is_too_long'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php index ecfeb860d9b..e92f806a92a 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_not_empty_in_anchor_testcase */ -class img_alt_not_empty_in_anchor_test extends all_checks { +final class img_alt_not_empty_in_anchor_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_not_empty_in_anchor'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php index 85fd7f5a0c2..2e89145c3f1 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_not_placeholder_testcase */ -class img_alt_not_place_holder_test extends all_checks { +final class img_alt_not_place_holder_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_not_place_holder'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php index 14d9941f6d9..aa2df0b3fbd 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class test_css_text_has_contrast_testcase */ -class img_has_alt_test extends all_checks { +final class img_has_alt_test extends all_checks { /** @var string Check type */ public $checktype = 'img_has_alt'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php index 991742a627c..a89002955d8 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_with_map_has_use_map_test */ -class img_with_map_has_use_map_test extends all_checks { +final class img_with_map_has_use_map_test extends all_checks { /** @var string Check type */ public $checktype = 'img_with_map_has_use_map'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php index 76a631f2fbc..73f35d41d30 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class legend_text_not_empty_test */ -class legend_text_not_empty_test extends all_checks { +final class legend_text_not_empty_test extends all_checks { /** @var string Check type */ public $checktype = 'legend_text_not_empty'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php index 3730b03e22a..b1d6794173c 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class no_headings_test */ -class no_headings_test extends all_checks { +final class no_headings_test extends all_checks { /** @var string Check type */ public $checktype = 'no_headings'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php index f560f92aecf..e5dc312a16f 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_embeded_test */ -class object_must_have_embed_test extends all_checks { +final class object_must_have_embed_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_embed'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php index 7235169afdd..8b6f6cf4593 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_title_test */ -class object_must_have_title_test extends all_checks { +final class object_must_have_title_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_title'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php index 17498863a0d..9670292a23d 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_valid_title_test */ -class object_must_have_valid_title_test extends all_checks { +final class object_must_have_valid_title_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_valid_title'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php index 2d89dbc5d89..f07b25df7aa 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class strike_is_not_used_testcase */ -class strike_is_not_used_test extends all_checks { +final class strike_is_not_used_test extends all_checks { /** @var string Check type */ public $checktype = 'strike_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php index ba703684ff8..1896743aa32 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_data_should_have_th_test */ -class table_data_should_have_th_test extends all_checks { +final class table_data_should_have_th_test extends all_checks { /** @var string Check type */ public $checktype = 'table_data_should_have_th'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php index 03df83ff36a..d1288a94dd3 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_summary_does_not_duplicate_caption_test */ -class table_summary_does_not_duplicate_caption_test extends all_checks { +final class table_summary_does_not_duplicate_caption_test extends all_checks { /** @var string Check type */ public $checktype = 'table_summary_does_not_duplicate_caption'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php index 11c7b087040..cf4298330b8 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_td_should_not_merge_test */ -class table_td_should_not_merge_test extends all_checks { +final class table_td_should_not_merge_test extends all_checks { /** @var string Check type */ public $checktype = 'table_td_should_not_merge'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php index 709fb4edef0..da128fd4eb3 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_th_should_have_scope_test */ -class table_th_should_have_scope_test extends all_checks { +final class table_th_should_have_scope_test extends all_checks { /** @var string Check type */ public $checktype = 'table_th_should_have_scope'; diff --git a/admin/tool/brickfield/tests/local/tool/activityresults_test.php b/admin/tool/brickfield/tests/local/tool/activityresults_test.php index badaf54fd45..b35f5faf82f 100644 --- a/admin/tool/brickfield/tests/local/tool/activityresults_test.php +++ b/admin/tool/brickfield/tests/local/tool/activityresults_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activityresults_test extends \advanced_testcase { +final class activityresults_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php b/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php index e79bab3eafa..e4806c980af 100644 --- a/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php +++ b/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class checktyperesults_test extends \advanced_testcase { +final class checktyperesults_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/errors_test.php b/admin/tool/brickfield/tests/local/tool/errors_test.php index dd78e10facc..80980735390 100644 --- a/admin/tool/brickfield/tests/local/tool/errors_test.php +++ b/admin/tool/brickfield/tests/local/tool/errors_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class errors_test extends \advanced_testcase { +final class errors_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/printable_test.php b/admin/tool/brickfield/tests/local/tool/printable_test.php index ca8300b7cc0..eee557a8188 100644 --- a/admin/tool/brickfield/tests/local/tool/printable_test.php +++ b/admin/tool/brickfield/tests/local/tool/printable_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class printable_test extends \advanced_testcase { +final class printable_test extends \advanced_testcase { /** * Test tool name. diff --git a/admin/tool/brickfield/tests/manager_test.php b/admin/tool/brickfield/tests/manager_test.php index 9e01f9ddeb6..702052a1850 100644 --- a/admin/tool/brickfield/tests/manager_test.php +++ b/admin/tool/brickfield/tests/manager_test.php @@ -23,7 +23,7 @@ namespace tool_brickfield; * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Tests for the function manager::get_all_areas() diff --git a/admin/tool/brickfield/tests/registration_test.php b/admin/tool/brickfield/tests/registration_test.php index 6015eba03bf..1800b6261a0 100644 --- a/admin/tool/brickfield/tests/registration_test.php +++ b/admin/tool/brickfield/tests/registration_test.php @@ -28,7 +28,7 @@ namespace tool_brickfield; * Unit tests for {@registration tool_brickfield\registration.php}. * @group tool_brickfield */ -class registration_test extends \advanced_testcase { +final class registration_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; diff --git a/admin/tool/brickfield/tests/scheduler_test.php b/admin/tool/brickfield/tests/scheduler_test.php index 07fc7d6dc22..f5207486a02 100644 --- a/admin/tool/brickfield/tests/scheduler_test.php +++ b/admin/tool/brickfield/tests/scheduler_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield; * @author Jay Churchward (jay@brickfieldlabs.ie) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scheduler_test extends \advanced_testcase { +final class scheduler_test extends \advanced_testcase { public function test_request_analysis() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/tool_test.php b/admin/tool/brickfield/tests/tool_test.php index 1144e766837..9e592f9cf1f 100644 --- a/admin/tool/brickfield/tests/tool_test.php +++ b/admin/tool/brickfield/tests/tool_test.php @@ -27,7 +27,7 @@ use tool_brickfield\local\tool\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_test extends \advanced_testcase { +final class tool_test extends \advanced_testcase { /** @var string base 64 image */ protected static string $base64img = <<dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php' /** * Tests for the capability overview helper functions. */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Test the function that gets the data - simple case. diff --git a/admin/tool/cohortroles/tests/api_test.php b/admin/tool/cohortroles/tests/api_test.php index 3e7a0523bfc..2151876520c 100644 --- a/admin/tool/cohortroles/tests/api_test.php +++ b/admin/tool/cohortroles/tests/api_test.php @@ -23,7 +23,7 @@ namespace tool_cohortroles; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** @var \stdClass $cohort */ protected $cohort = null; diff --git a/admin/tool/cohortroles/tests/privacy/provider_test.php b/admin/tool/cohortroles/tests/privacy/provider_test.php index deb05db61fa..301d5d6e832 100644 --- a/admin/tool/cohortroles/tests/privacy/provider_test.php +++ b/admin/tool/cohortroles/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/admin/tool/customlang/tests/local/mlang/langstring_test.php b/admin/tool/customlang/tests/local/mlang/langstring_test.php index 17f72da2b1c..da4fe405e94 100644 --- a/admin/tool/customlang/tests/local/mlang/langstring_test.php +++ b/admin/tool/customlang/tests/local/mlang/langstring_test.php @@ -36,7 +36,7 @@ use moodle_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class langstring_test extends advanced_testcase { +final class langstring_test extends advanced_testcase { /** * Sanity 1.x string diff --git a/admin/tool/customlang/tests/local/mlang/phpparser_test.php b/admin/tool/customlang/tests/local/mlang/phpparser_test.php index fe6e6bce28d..5835b470203 100644 --- a/admin/tool/customlang/tests/local/mlang/phpparser_test.php +++ b/admin/tool/customlang/tests/local/mlang/phpparser_test.php @@ -34,7 +34,7 @@ use moodle_exception; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class phpparser_test extends advanced_testcase { +final class phpparser_test extends advanced_testcase { /** diff --git a/admin/tool/dataprivacy/tests/api_test.php b/admin/tool/dataprivacy/tests/api_test.php index 862c5557b0f..1aba2023ed7 100644 --- a/admin/tool/dataprivacy/tests/api_test.php +++ b/admin/tool/dataprivacy/tests/api_test.php @@ -30,7 +30,7 @@ use tool_dataprivacy\task\process_data_request_task; * @copyright 2018 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Ensure that the check_can_manage_data_registry function fails cap testing when a user without capabilities is diff --git a/admin/tool/dataprivacy/tests/data_registry_test.php b/admin/tool/dataprivacy/tests/data_registry_test.php index cc234cb134d..eadf99db67c 100644 --- a/admin/tool/dataprivacy/tests/data_registry_test.php +++ b/admin/tool/dataprivacy/tests/data_registry_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_registry_test extends \advanced_testcase { +final class data_registry_test extends \advanced_testcase { /** * Ensure that the get_effective_context_value only errors if provided an inappropriate element. diff --git a/admin/tool/dataprivacy/tests/data_request_test.php b/admin/tool/dataprivacy/tests/data_request_test.php index a0f5ebcb177..7250491b9b3 100644 --- a/admin/tool/dataprivacy/tests/data_request_test.php +++ b/admin/tool/dataprivacy/tests/data_request_test.php @@ -28,7 +28,7 @@ require_once('data_privacy_testcase.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_request_test extends data_privacy_testcase { +final class data_request_test extends data_privacy_testcase { /** * Data provider for testing is_resettable, and is_active. diff --git a/admin/tool/dataprivacy/tests/expired_contexts_test.php b/admin/tool/dataprivacy/tests/expired_contexts_test.php index 91add391e99..da3ae12cbf3 100644 --- a/admin/tool/dataprivacy/tests/expired_contexts_test.php +++ b/admin/tool/dataprivacy/tests/expired_contexts_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class expired_contexts_test extends \advanced_testcase { +final class expired_contexts_test extends \advanced_testcase { /** * Setup the basics with the specified retention period. diff --git a/admin/tool/dataprivacy/tests/external/external_test.php b/admin/tool/dataprivacy/tests/external/external_test.php index 45a64381f92..2fe15bc77e8 100644 --- a/admin/tool/dataprivacy/tests/external/external_test.php +++ b/admin/tool/dataprivacy/tests/external/external_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2018 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test for external::approve_data_request() with the user not logged in. diff --git a/admin/tool/dataprivacy/tests/filtered_userlist_test.php b/admin/tool/dataprivacy/tests/filtered_userlist_test.php index 216cbfbaa85..82ff3c07e57 100644 --- a/admin/tool/dataprivacy/tests/filtered_userlist_test.php +++ b/admin/tool/dataprivacy/tests/filtered_userlist_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filtered_userlist_test extends \advanced_testcase { +final class filtered_userlist_test extends \advanced_testcase { /** * Test the apply_expired_contexts_filters function with arange of options. * diff --git a/admin/tool/dataprivacy/tests/manager_observer_test.php b/admin/tool/dataprivacy/tests/manager_observer_test.php index de898abf7d0..9a922042ac9 100644 --- a/admin/tool/dataprivacy/tests/manager_observer_test.php +++ b/admin/tool/dataprivacy/tests/manager_observer_test.php @@ -28,7 +28,7 @@ require_once('data_privacy_testcase.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_observer_test extends data_privacy_testcase { +final class manager_observer_test extends data_privacy_testcase { /** * Ensure that when users are configured as DPO, they are sent an message upon failure. */ diff --git a/admin/tool/dataprivacy/tests/metadata_registry_test.php b/admin/tool/dataprivacy/tests/metadata_registry_test.php index 2288507e745..fab74772be6 100644 --- a/admin/tool/dataprivacy/tests/metadata_registry_test.php +++ b/admin/tool/dataprivacy/tests/metadata_registry_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class metadata_registry_test extends \advanced_testcase { +final class metadata_registry_test extends \advanced_testcase { /** * Fetch the meta data and return it in a form that we can easily unit test. diff --git a/admin/tool/dataprivacy/tests/privacy/provider_test.php b/admin/tool/dataprivacy/tests/privacy/provider_test.php index 97397816505..5e1243f66e9 100644 --- a/admin/tool/dataprivacy/tests/privacy/provider_test.php +++ b/admin/tool/dataprivacy/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use tool_dataprivacy\privacy\provider; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test provider get_contexts_for_userid method diff --git a/admin/tool/dataprivacy/tests/task/task_test.php b/admin/tool/dataprivacy/tests/task/task_test.php index a418bce74ba..32bb9380fe9 100644 --- a/admin/tool/dataprivacy/tests/task/task_test.php +++ b/admin/tool/dataprivacy/tests/task/task_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../data_privacy_testcase.php'); * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_test extends \data_privacy_testcase { +final class task_test extends \data_privacy_testcase { /** * Test tearDown. diff --git a/admin/tool/dataprivacy/tests/user_deleted_observer_test.php b/admin/tool/dataprivacy/tests/user_deleted_observer_test.php index f5839891c47..4d4dce750c1 100644 --- a/admin/tool/dataprivacy/tests/user_deleted_observer_test.php +++ b/admin/tool/dataprivacy/tests/user_deleted_observer_test.php @@ -25,7 +25,7 @@ use tool_dataprivacy\event\user_deleted_observer; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_deleted_observer_test extends \advanced_testcase { +final class user_deleted_observer_test extends \advanced_testcase { /** * Ensure that a delete data request is created upon user deletion. diff --git a/admin/tool/filetypes/tests/tool_filetypes_test.php b/admin/tool/filetypes/tests/tool_filetypes_test.php index 6d536835d4e..f2a7fb6c495 100644 --- a/admin/tool/filetypes/tests/tool_filetypes_test.php +++ b/admin/tool/filetypes/tests/tool_filetypes_test.php @@ -33,7 +33,7 @@ use tool_filetypes\utils; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_filetypes_test extends advanced_testcase { +final class tool_filetypes_test extends advanced_testcase { /** * Tests is_extension_invalid() function. */ diff --git a/admin/tool/generator/tests/maketestcourse_test.php b/admin/tool/generator/tests/maketestcourse_test.php index 6960dd2c294..93b4b3b56da 100644 --- a/admin/tool/generator/tests/maketestcourse_test.php +++ b/admin/tool/generator/tests/maketestcourse_test.php @@ -26,7 +26,7 @@ use tool_generator_course_backend; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class maketestcourse_test extends \advanced_testcase { +final class maketestcourse_test extends \advanced_testcase { /** * Creates a small test course and checks all the components have been put in place. */ diff --git a/admin/tool/generator/tests/maketestsite_test.php b/admin/tool/generator/tests/maketestsite_test.php index e345b16eeee..8fd09b9b342 100644 --- a/admin/tool/generator/tests/maketestsite_test.php +++ b/admin/tool/generator/tests/maketestsite_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2013 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class maketestsite_test extends \advanced_testcase { +final class maketestsite_test extends \advanced_testcase { /** * Checks that site courses shortnames are properly generated. diff --git a/admin/tool/httpsreplace/tests/httpsreplace_test.php b/admin/tool/httpsreplace/tests/httpsreplace_test.php index c02ca75a635..4cfd915a9b1 100644 --- a/admin/tool/httpsreplace/tests/httpsreplace_test.php +++ b/admin/tool/httpsreplace/tests/httpsreplace_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright Copyright (c) 2016 Blackboard Inc. (http://www.blackboard.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class httpsreplace_test extends \advanced_testcase { +final class httpsreplace_test extends \advanced_testcase { /** * Data provider for test_upgrade_http_links diff --git a/admin/tool/installaddon/tests/installer_test.php b/admin/tool/installaddon/tests/installer_test.php index 38d900669a4..d0c13ea9320 100644 --- a/admin/tool/installaddon/tests/installer_test.php +++ b/admin/tool/installaddon/tests/installer_test.php @@ -33,7 +33,7 @@ require_once(__DIR__.'/fixtures/testable_installer.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class installer_test extends \advanced_testcase { +final class installer_test extends \advanced_testcase { public function test_get_addons_repository_url() { $installer = testable_tool_installaddon_installer::instance(); diff --git a/admin/tool/langimport/tests/controller_test.php b/admin/tool/langimport/tests/controller_test.php index 008dd470dca..dea6ba0ff8a 100644 --- a/admin/tool/langimport/tests/controller_test.php +++ b/admin/tool/langimport/tests/controller_test.php @@ -25,7 +25,7 @@ namespace tool_langimport; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class controller_test extends \advanced_testcase { +final class controller_test extends \advanced_testcase { /** * Test uninstall of language with invalid values. diff --git a/admin/tool/langimport/tests/event/events_test.php b/admin/tool/langimport/tests/event/events_test.php index e08d5d32c91..880b0284613 100644 --- a/admin/tool/langimport/tests/event/events_test.php +++ b/admin/tool/langimport/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace tool_langimport\event; * @copyright 2014 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/admin/tool/licensemanager/tests/helper_test.php b/admin/tool/licensemanager/tests/helper_test.php index 14c34c6a137..d23a9ac05e0 100644 --- a/admin/tool/licensemanager/tests/helper_test.php +++ b/admin/tool/licensemanager/tests/helper_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @group tool_licensemanager */ -class helper_test extends advanced_testcase { +final class helper_test extends advanced_testcase { public function test_convert_version_to_epoch() { diff --git a/admin/tool/licensemanager/tests/manager_test.php b/admin/tool/licensemanager/tests/manager_test.php index 2b9763c4ed4..605e887f142 100644 --- a/admin/tool/licensemanager/tests/manager_test.php +++ b/admin/tool/licensemanager/tests/manager_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/licenselib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @group tool_licensemanager */ -class manager_test extends advanced_testcase { +final class manager_test extends advanced_testcase { /** * Test editing a license. diff --git a/admin/tool/log/store/database/tests/privacy/provider_test.php b/admin/tool/log/store/database/tests/privacy/provider_test.php index 31d9f2bb328..5756efbbddc 100644 --- a/admin/tool/log/store/database/tests/privacy/provider_test.php +++ b/admin/tool/log/store/database/tests/privacy/provider_test.php @@ -49,7 +49,7 @@ require_once(__DIR__ . '/../fixtures/event.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/log/store/database/tests/store_test.php b/admin/tool/log/store/database/tests/store_test.php index 0a833172ce8..2f35d7ef154 100644 --- a/admin/tool/log/store/database/tests/store_test.php +++ b/admin/tool/log/store/database/tests/store_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/store.php'); * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \advanced_testcase { +final class store_test extends \advanced_testcase { /** * Tests log writing. * diff --git a/admin/tool/log/store/standard/tests/privacy/provider_test.php b/admin/tool/log/store/standard/tests/privacy/provider_test.php index 670039668e7..d5534eb58b1 100644 --- a/admin/tool/log/store/standard/tests/privacy/provider_test.php +++ b/admin/tool/log/store/standard/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once(__DIR__ . '/../fixtures/event.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/admin/tool/log/store/standard/tests/store_test.php b/admin/tool/log/store/standard/tests/store_test.php index dad69f335f4..a0b73df16ef 100644 --- a/admin/tool/log/store/standard/tests/store_test.php +++ b/admin/tool/log/store/standard/tests/store_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/restore_hack.php'); * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \advanced_testcase { +final class store_test extends \advanced_testcase { /** * @var bool Determine if we disabled the GC, so it can be re-enabled in tearDown. */ diff --git a/admin/tool/log/tests/manager_test.php b/admin/tool/log/tests/manager_test.php index 46d5af672fc..9de02ba48bc 100644 --- a/admin/tool/log/tests/manager_test.php +++ b/admin/tool/log/tests/manager_test.php @@ -23,8 +23,8 @@ namespace tool_log; * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { - public function test_get_log_manager() { +final class manager_test extends \advanced_testcase { + public function test_get_log_manager(): void { global $CFG; $this->resetAfterTest(); diff --git a/admin/tool/log/tests/privacy/provider_test.php b/admin/tool/log/tests/privacy/provider_test.php index 0d078ee1c1c..c892616bb2e 100644 --- a/admin/tool/log/tests/privacy/provider_test.php +++ b/admin/tool/log/tests/privacy/provider_test.php @@ -50,7 +50,7 @@ require_once($CFG->dirroot . '/admin/tool/log/store/standard/tests/fixtures/even * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/admin/tool/lp/tests/externallib_test.php b/admin/tool/lp/tests/externallib_test.php index 309a5d63732..95930293e0b 100644 --- a/admin/tool/lp/tests/externallib_test.php +++ b/admin/tool/lp/tests/externallib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** @var \stdClass $creator User with enough permissions to create insystem context. */ protected $creator = null; diff --git a/admin/tool/lpimportcsv/tests/import_test.php b/admin/tool/lpimportcsv/tests/import_test.php index 976381df63f..5d32bde5dd8 100644 --- a/admin/tool/lpimportcsv/tests/import_test.php +++ b/admin/tool/lpimportcsv/tests/import_test.php @@ -25,7 +25,7 @@ use core_competency\api; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_test extends \advanced_testcase { +final class import_test extends \advanced_testcase { public function test_import_framework() { $this->resetAfterTest(true); diff --git a/admin/tool/lpmigrate/tests/processor_test.php b/admin/tool/lpmigrate/tests/processor_test.php index fb2eda42cd4..6a3415d8c4d 100644 --- a/admin/tool/lpmigrate/tests/processor_test.php +++ b/admin/tool/lpmigrate/tests/processor_test.php @@ -26,7 +26,7 @@ use core_competency\course_module_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class processor_test extends \advanced_testcase { +final class processor_test extends \advanced_testcase { /** * This sets up a few things, and assign class variables. diff --git a/admin/tool/messageinbound/tests/manager_test.php b/admin/tool/messageinbound/tests/manager_test.php index 41045357c65..ae4b18fdedd 100644 --- a/admin/tool/messageinbound/tests/manager_test.php +++ b/admin/tool/messageinbound/tests/manager_test.php @@ -31,7 +31,7 @@ use tool_messageinbound\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends provider_testcase { +final class manager_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/messageinbound/tests/privacy/provider_test.php b/admin/tool/messageinbound/tests/privacy/provider_test.php index 9feca9ad908..a01c5cc552f 100644 --- a/admin/tool/messageinbound/tests/privacy/provider_test.php +++ b/admin/tool/messageinbound/tests/privacy/provider_test.php @@ -45,7 +45,7 @@ use tool_messageinbound\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/mobile/tests/api_test.php b/admin/tool/mobile/tests/api_test.php index 2b519a33aa8..2350294cc42 100644 --- a/admin/tool/mobile/tests/api_test.php +++ b/admin/tool/mobile/tests/api_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class api_test extends \externallib_advanced_testcase { +final class api_test extends \externallib_advanced_testcase { /** * Test get_autologin_key. diff --git a/admin/tool/mobile/tests/externallib_test.php b/admin/tool/mobile/tests/externallib_test.php index 1e7bd0a387c..2f54a45d1ee 100644 --- a/admin/tool/mobile/tests/externallib_test.php +++ b/admin/tool/mobile/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_plugins_supporting_mobile. diff --git a/admin/tool/mobile/tests/privacy/provider_test.php b/admin/tool/mobile/tests/privacy/provider_test.php index f827ce2008c..857645d611e 100644 --- a/admin/tool/mobile/tests/privacy/provider_test.php +++ b/admin/tool/mobile/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use tool_mobile\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/admin/tool/monitor/tests/event/events_test.php b/admin/tool/monitor/tests/event/events_test.php index 8fc0c503d14..754b5a6780f 100644 --- a/admin/tool/monitor/tests/event/events_test.php +++ b/admin/tool/monitor/tests/event/events_test.php @@ -28,7 +28,7 @@ namespace tool_monitor\event; /** * Tests that the tool_monitor events are valid and triggered correctly. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/admin/tool/monitor/tests/eventobservers_test.php b/admin/tool/monitor/tests/eventobservers_test.php index b72b1a7f438..24374414fd4 100644 --- a/admin/tool/monitor/tests/eventobservers_test.php +++ b/admin/tool/monitor/tests/eventobservers_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class eventobservers_test extends \advanced_testcase { +final class eventobservers_test extends \advanced_testcase { /** * Set up method. */ diff --git a/admin/tool/monitor/tests/generator_test.php b/admin/tool/monitor/tests/generator_test.php index d17694b1d40..56665c045c1 100644 --- a/admin/tool/monitor/tests/generator_test.php +++ b/admin/tool/monitor/tests/generator_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/privacy/provider_test.php b/admin/tool/monitor/tests/privacy/provider_test.php index 5d75717a3dc..14a425e93eb 100644 --- a/admin/tool/monitor/tests/privacy/provider_test.php +++ b/admin/tool/monitor/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/rule_manager_test.php b/admin/tool/monitor/tests/rule_manager_test.php index f29f2d9b886..24bdcf3fca6 100644 --- a/admin/tool/monitor/tests/rule_manager_test.php +++ b/admin/tool/monitor/tests/rule_manager_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_manager_test extends \advanced_testcase { +final class rule_manager_test extends \advanced_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/subscription_manager_test.php b/admin/tool/monitor/tests/subscription_manager_test.php index 39975523f5e..46f06438901 100644 --- a/admin/tool/monitor/tests/subscription_manager_test.php +++ b/admin/tool/monitor/tests/subscription_manager_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscription_manager_test extends \advanced_testcase { +final class subscription_manager_test extends \advanced_testcase { /** * Test count_rule_subscriptions method. diff --git a/admin/tool/monitor/tests/subscription_test.php b/admin/tool/monitor/tests/subscription_test.php index 53e5e17188b..f9f98cbdc96 100644 --- a/admin/tool/monitor/tests/subscription_test.php +++ b/admin/tool/monitor/tests/subscription_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscription_test extends \advanced_testcase { +final class subscription_test extends \advanced_testcase { /** * @var \tool_monitor\subscription $subscription object. diff --git a/admin/tool/monitor/tests/task_check_subscriptions_test.php b/admin/tool/monitor/tests/task_check_subscriptions_test.php index 85d252e83f9..14b9823a070 100644 --- a/admin/tool/monitor/tests/task_check_subscriptions_test.php +++ b/admin/tool/monitor/tests/task_check_subscriptions_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_check_subscriptions_test extends \advanced_testcase { +final class task_check_subscriptions_test extends \advanced_testcase { private $course; private $user; diff --git a/admin/tool/monitor/tests/task_clean_events_test.php b/admin/tool/monitor/tests/task_clean_events_test.php index 94c8c3c48bb..6696547b532 100644 --- a/admin/tool/monitor/tests/task_clean_events_test.php +++ b/admin/tool/monitor/tests/task_clean_events_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_clean_events_test extends \advanced_testcase { +final class task_clean_events_test extends \advanced_testcase { /** * Test set up. diff --git a/admin/tool/moodlenet/tests/import_backup_helper_test.php b/admin/tool/moodlenet/tests/import_backup_helper_test.php index a6d47020261..bb0a52167e2 100644 --- a/admin/tool/moodlenet/tests/import_backup_helper_test.php +++ b/admin/tool/moodlenet/tests/import_backup_helper_test.php @@ -24,7 +24,7 @@ namespace tool_moodlenet; * @copyright 2020 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_backup_helper_test extends \advanced_testcase { +final class import_backup_helper_test extends \advanced_testcase { /** * Test that the first available context with the capability to upload backup files is returned. diff --git a/admin/tool/moodlenet/tests/lib_test.php b/admin/tool/moodlenet/tests/lib_test.php index 5fafc586070..ab397507282 100644 --- a/admin/tool/moodlenet/tests/lib_test.php +++ b/admin/tool/moodlenet/tests/lib_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/admin/tool/moodlenet/lib.php'); /** * Test moodlenet functions */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test the generate_mnet_endpoint function diff --git a/admin/tool/moodlenet/tests/local/import_handler_info_test.php b/admin/tool/moodlenet/tests/local/import_handler_info_test.php index 239ec3ebd91..7191ce790a9 100644 --- a/admin/tool/moodlenet/tests/local/import_handler_info_test.php +++ b/admin/tool/moodlenet/tests/local/import_handler_info_test.php @@ -28,7 +28,7 @@ use tool_moodlenet\local\import_strategy_file; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_handler_info_test extends \advanced_testcase { +final class import_handler_info_test extends \advanced_testcase { /** * Test init and the getters. diff --git a/admin/tool/moodlenet/tests/local/import_handler_registry_test.php b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php index 0c679515f03..c51e086086e 100644 --- a/admin/tool/moodlenet/tests/local/import_handler_registry_test.php +++ b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php @@ -31,7 +31,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_handler_registry_test extends \advanced_testcase { +final class import_handler_registry_test extends \advanced_testcase { /** * Test confirming the behaviour of get_resource_handlers_for_strategy with different params. diff --git a/admin/tool/moodlenet/tests/local/import_info_test.php b/admin/tool/moodlenet/tests/local/import_info_test.php index 754fbbce8f1..96bd58d1fb8 100644 --- a/admin/tool/moodlenet/tests/local/import_info_test.php +++ b/admin/tool/moodlenet/tests/local/import_info_test.php @@ -28,7 +28,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_info_test extends \advanced_testcase { +final class import_info_test extends \advanced_testcase { /** * Create some test objects. diff --git a/admin/tool/moodlenet/tests/local/import_processor_test.php b/admin/tool/moodlenet/tests/local/import_processor_test.php index 26f73f668b1..4596ae978f8 100644 --- a/admin/tool/moodlenet/tests/local/import_processor_test.php +++ b/admin/tool/moodlenet/tests/local/import_processor_test.php @@ -31,7 +31,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_processor_test extends \advanced_testcase { +final class import_processor_test extends \advanced_testcase { /** * An integration test, this confirms the ability to construct an import processor and run the import for the current user. diff --git a/admin/tool/moodlenet/tests/local/remote_resource_test.php b/admin/tool/moodlenet/tests/local/remote_resource_test.php index 6d474a4f7b2..84c05e1dab6 100644 --- a/admin/tool/moodlenet/tests/local/remote_resource_test.php +++ b/admin/tool/moodlenet/tests/local/remote_resource_test.php @@ -27,7 +27,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class remote_resource_test extends \advanced_testcase { +final class remote_resource_test extends \advanced_testcase { /** * Test getters. diff --git a/admin/tool/moodlenet/tests/local/url_test.php b/admin/tool/moodlenet/tests/local/url_test.php index e7137c2f52b..0a25f7955be 100644 --- a/admin/tool/moodlenet/tests/local/url_test.php +++ b/admin/tool/moodlenet/tests/local/url_test.php @@ -26,7 +26,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class url_test extends \advanced_testcase { +final class url_test extends \advanced_testcase { /** * Test the parsing to host + path components. diff --git a/admin/tool/moodlenet/tests/profile_manager_test.php b/admin/tool/moodlenet/tests/profile_manager_test.php index 7d6de581cf1..aac0508865f 100644 --- a/admin/tool/moodlenet/tests/profile_manager_test.php +++ b/admin/tool/moodlenet/tests/profile_manager_test.php @@ -24,7 +24,7 @@ namespace tool_moodlenet; * @copyright 2020 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profile_manager_test extends \advanced_testcase { +final class profile_manager_test extends \advanced_testcase { /** * Test that on this site we use the user table to hold moodle net profile information. diff --git a/admin/tool/policy/tests/api_test.php b/admin/tool/policy/tests/api_test.php index de473299f63..9f47e33748e 100644 --- a/admin/tool/policy/tests/api_test.php +++ b/admin/tool/policy/tests/api_test.php @@ -26,7 +26,7 @@ use tool_policy\test\helper; * @copyright 2018 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test the common operations with a policy document and its versions. diff --git a/admin/tool/policy/tests/externallib_test.php b/admin/tool/policy/tests/externallib_test.php index 05dd2fc0715..eccdf30c510 100644 --- a/admin/tool/policy/tests/externallib_test.php +++ b/admin/tool/policy/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/user/externallib.php'); * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Setup function- we will create some policy docs. diff --git a/admin/tool/policy/tests/privacy/provider_test.php b/admin/tool/policy/tests/privacy/provider_test.php index 3b70138f9c2..6aee9299c3c 100644 --- a/admin/tool/policy/tests/privacy/provider_test.php +++ b/admin/tool/policy/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The user object. */ protected $user; diff --git a/admin/tool/policy/tests/sitepolicy_handler_test.php b/admin/tool/policy/tests/sitepolicy_handler_test.php index 51ec55afa4c..3278d8e83f7 100644 --- a/admin/tool/policy/tests/sitepolicy_handler_test.php +++ b/admin/tool/policy/tests/sitepolicy_handler_test.php @@ -27,7 +27,7 @@ use tool_policy\test\helper; * @copyright 2018 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sitepolicy_handler_test extends \advanced_testcase { +final class sitepolicy_handler_test extends \advanced_testcase { /** * Test behaviour of the {@link \tool_policy\privacy\local\sitepolicy\handler::get_redirect_url()} method. diff --git a/admin/tool/recyclebin/tests/category_bin_test.php b/admin/tool/recyclebin/tests/category_bin_test.php index 6e03d76c11a..8c1ddb473b1 100644 --- a/admin/tool/recyclebin/tests/category_bin_test.php +++ b/admin/tool/recyclebin/tests/category_bin_test.php @@ -23,7 +23,7 @@ namespace tool_recyclebin; * @copyright 2015 University of Kent * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class category_bin_test extends \advanced_testcase { +final class category_bin_test extends \advanced_testcase { /** * @var \stdClass $course diff --git a/admin/tool/recyclebin/tests/course_bin_test.php b/admin/tool/recyclebin/tests/course_bin_test.php index 34a38690a59..60c0aa2e9d1 100644 --- a/admin/tool/recyclebin/tests/course_bin_test.php +++ b/admin/tool/recyclebin/tests/course_bin_test.php @@ -23,7 +23,7 @@ namespace tool_recyclebin; * @copyright 2015 University of Kent * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_bin_test extends \advanced_testcase { +final class course_bin_test extends \advanced_testcase { /** * @var \stdClass $course diff --git a/admin/tool/recyclebin/tests/event/events_test.php b/admin/tool/recyclebin/tests/event/events_test.php index 7cdcf42053d..d0639dc1ca1 100644 --- a/admin/tool/recyclebin/tests/event/events_test.php +++ b/admin/tool/recyclebin/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace tool_recyclebin\event; * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/admin/tool/task/tests/form_test.php b/admin/tool/task/tests/form_test.php index 8cbb40d189f..760c79cdac2 100644 --- a/admin/tool/task/tests/form_test.php +++ b/admin/tool/task/tests/form_test.php @@ -23,7 +23,7 @@ namespace tool_task; * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ -class form_test extends \advanced_testcase { +final class form_test extends \advanced_testcase { /** * Test validations for minute field. diff --git a/admin/tool/templatelibrary/tests/externallib_test.php b/admin/tool/templatelibrary/tests/externallib_test.php index 87144cddef3..1977dcab12a 100644 --- a/admin/tool/templatelibrary/tests/externallib_test.php +++ b/admin/tool/templatelibrary/tests/externallib_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test list all. diff --git a/admin/tool/uploadcourse/tests/course_test.php b/admin/tool/uploadcourse/tests/course_test.php index ff6991086e1..9fac2ecdebe 100644 --- a/admin/tool/uploadcourse/tests/course_test.php +++ b/admin/tool/uploadcourse/tests/course_test.php @@ -26,7 +26,7 @@ use tool_uploadcourse_course; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ -class course_test extends \advanced_testcase { +final class course_test extends \advanced_testcase { public function test_proceed_without_prepare() { $this->resetAfterTest(true); diff --git a/admin/tool/uploadcourse/tests/helper_test.php b/admin/tool/uploadcourse/tests/helper_test.php index c94464cfc0e..2ee07e54092 100644 --- a/admin/tool/uploadcourse/tests/helper_test.php +++ b/admin/tool/uploadcourse/tests/helper_test.php @@ -25,7 +25,7 @@ use tool_uploadcourse_helper; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { public function test_generate_shortname() { $data = (object) array('fullname' => 'Ah bh Ch 01 02 03', 'idnumber' => 'ID123'); diff --git a/admin/tool/uploadcourse/tests/processor_test.php b/admin/tool/uploadcourse/tests/processor_test.php index c18218b875e..f73137e20cd 100644 --- a/admin/tool/uploadcourse/tests/processor_test.php +++ b/admin/tool/uploadcourse/tests/processor_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/csvlib.class.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class processor_test extends \advanced_testcase { +final class processor_test extends \advanced_testcase { public function test_basic() { global $DB; diff --git a/admin/tool/uploaduser/tests/cli_test.php b/admin/tool/uploaduser/tests/cli_test.php index 3c2802f1c56..94f0b511431 100644 --- a/admin/tool/uploaduser/tests/cli_test.php +++ b/admin/tool/uploaduser/tests/cli_test.php @@ -23,7 +23,7 @@ namespace tool_uploaduser; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cli_test extends \advanced_testcase { +final class cli_test extends \advanced_testcase { /** * Generate cli_helper and mock $_SERVER['argv'] diff --git a/admin/tool/uploaduser/tests/field_value_validators_test.php b/admin/tool/uploaduser/tests/field_value_validators_test.php index e3650d4bd28..a9375a21fd1 100644 --- a/admin/tool/uploaduser/tests/field_value_validators_test.php +++ b/admin/tool/uploaduser/tests/field_value_validators_test.php @@ -25,7 +25,7 @@ use tool_uploaduser\local\field_value_validators; * @copyright 2019 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class field_value_validators_test extends \advanced_testcase { +final class field_value_validators_test extends \advanced_testcase { /** * Data provider for \field_value_validators_testcase::test_validate_theme(). diff --git a/admin/tool/uploaduser/tests/upload_users_test.php b/admin/tool/uploaduser/tests/upload_users_test.php index 49e204e716f..7cca14c2f4d 100644 --- a/admin/tool/uploaduser/tests/upload_users_test.php +++ b/admin/tool/uploaduser/tests/upload_users_test.php @@ -31,7 +31,7 @@ use tool_uploaduser\local\text_progress_tracker; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upload_users_test extends advanced_testcase { +final class upload_users_test extends advanced_testcase { /** * Load required test libraries diff --git a/admin/tool/usertours/tests/accessdate_filter_test.php b/admin/tool/usertours/tests/accessdate_filter_test.php index ae2b2732344..712d5ba7872 100644 --- a/admin/tool/usertours/tests/accessdate_filter_test.php +++ b/admin/tool/usertours/tests/accessdate_filter_test.php @@ -25,8 +25,7 @@ use tool_usertours\local\filter\accessdate; * @copyright 2019 Tom Dickman * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class accessdate_filter_test extends \advanced_testcase { - +final class accessdate_filter_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(true); } diff --git a/admin/tool/usertours/tests/cache_test.php b/admin/tool/usertours/tests/cache_test.php index 9ba765a1162..6f96c45e646 100644 --- a/admin/tool/usertours/tests/cache_test.php +++ b/admin/tool/usertours/tests/cache_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cache_test extends \advanced_testcase { +final class cache_test extends \advanced_testcase { // There are shared helpers for these tests in the helper trait. use \tool_usertours_helper_trait; diff --git a/admin/tool/usertours/tests/manager_test.php b/admin/tool/usertours/tests/manager_test.php index 0310f3169f1..09c509e636c 100644 --- a/admin/tool/usertours/tests/manager_test.php +++ b/admin/tool/usertours/tests/manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { // There are shared helpers for these tests in the helper trait. use \tool_usertours_helper_trait; diff --git a/admin/tool/usertours/tests/privacy/provider_test.php b/admin/tool/usertours/tests/privacy/provider_test.php index 907feb48352..f23e2736b26 100644 --- a/admin/tool/usertours/tests/privacy/provider_test.php +++ b/admin/tool/usertours/tests/privacy/provider_test.php @@ -37,8 +37,7 @@ use tool_usertours\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { - +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Helper method for creating a tour * diff --git a/admin/tool/usertours/tests/role_filter_test.php b/admin/tool/usertours/tests/role_filter_test.php index cc93cd50786..084cd5b5b56 100644 --- a/admin/tool/usertours/tests/role_filter_test.php +++ b/admin/tool/usertours/tests/role_filter_test.php @@ -23,8 +23,7 @@ namespace tool_usertours; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class role_filter_test extends \advanced_testcase { - +final class role_filter_test extends \advanced_testcase { /** * @var $course Test course */ diff --git a/admin/tool/usertours/tests/step_test.php b/admin/tool/usertours/tests/step_test.php index 55ddda887e5..42b69bc17f8 100644 --- a/admin/tool/usertours/tests/step_test.php +++ b/admin/tool/usertours/tests/step_test.php @@ -28,8 +28,7 @@ require_once($CFG->libdir . '/formslib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class step_test extends \advanced_testcase { - +final class step_test extends \advanced_testcase { /** * @var moodle_database */ diff --git a/admin/tool/usertours/tests/theme_filter_test.php b/admin/tool/usertours/tests/theme_filter_test.php index cd63ee2d7b2..caf2ad10fdd 100644 --- a/admin/tool/usertours/tests/theme_filter_test.php +++ b/admin/tool/usertours/tests/theme_filter_test.php @@ -23,8 +23,7 @@ namespace tool_usertours; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class theme_filter_test extends \advanced_testcase { - +final class theme_filter_test extends \advanced_testcase { /** * Data Provider for filter_matches function. * diff --git a/admin/tool/usertours/tests/tour_test.php b/admin/tool/usertours/tests/tour_test.php index e9c75462366..e05cd83da7b 100644 --- a/admin/tool/usertours/tests/tour_test.php +++ b/admin/tool/usertours/tests/tour_test.php @@ -28,8 +28,7 @@ require_once($CFG->libdir . '/formslib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tour_test extends \advanced_testcase { - +final class tour_test extends \advanced_testcase { /** * @var moodle_database */ diff --git a/analytics/tests/analysis_test.php b/analytics/tests/analysis_test.php index 9d458a3aa57..e0f275cc7fd 100644 --- a/analytics/tests/analysis_test.php +++ b/analytics/tests/analysis_test.php @@ -23,7 +23,7 @@ namespace core_analytics; * @copyright 2019 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class analysis_test extends \advanced_testcase { +final class analysis_test extends \advanced_testcase { /** * Test fill_firstanalyses_cache. diff --git a/analytics/tests/course_test.php b/analytics/tests/course_test.php index d351908ae4c..841120af139 100644 --- a/analytics/tests/course_test.php +++ b/analytics/tests/course_test.php @@ -23,7 +23,7 @@ namespace core_analytics; * @copyright 2016 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_test extends \advanced_testcase { +final class course_test extends \advanced_testcase { public function setUp(): void { global $DB; diff --git a/analytics/tests/dataset_manager_test.php b/analytics/tests/dataset_manager_test.php index 8c051117767..8420db86222 100644 --- a/analytics/tests/dataset_manager_test.php +++ b/analytics/tests/dataset_manager_test.php @@ -23,7 +23,7 @@ namespace core_analytics; * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dataset_manager_test extends \advanced_testcase { +final class dataset_manager_test extends \advanced_testcase { /** * setUp diff --git a/analytics/tests/model_test.php b/analytics/tests/model_test.php index 239ff5d26d9..5aab2062793 100644 --- a/analytics/tests/model_test.php +++ b/analytics/tests/model_test.php @@ -41,7 +41,7 @@ require_once(__DIR__ . '/fixtures/test_analysis.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class model_test extends \advanced_testcase { +final class model_test extends \advanced_testcase { public function setUp(): void { diff --git a/analytics/tests/prediction_actions_test.php b/analytics/tests/prediction_actions_test.php index 16e5de0df20..148a9be5c38 100644 --- a/analytics/tests/prediction_actions_test.php +++ b/analytics/tests/prediction_actions_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/test_target_shortname.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class prediction_actions_test extends \advanced_testcase { +final class prediction_actions_test extends \advanced_testcase { /** * Common startup tasks diff --git a/analytics/tests/prediction_test.php b/analytics/tests/prediction_test.php index 63e1b3c463a..712caeee9d7 100644 --- a/analytics/tests/prediction_test.php +++ b/analytics/tests/prediction_test.php @@ -46,7 +46,7 @@ require_once(__DIR__ . '/../../course/lib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class prediction_test extends \advanced_testcase { +final class prediction_test extends \advanced_testcase { /** * Purge all the mlbackend outputs. diff --git a/analytics/tests/privacy/provider_test.php b/analytics/tests/privacy/provider_test.php index de9cb4dadf2..879758d8ec8 100644 --- a/analytics/tests/privacy/provider_test.php +++ b/analytics/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once(__DIR__ . '/../fixtures/test_target_course_users.php'); * @copyright 2018 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { public function setUp(): void { diff --git a/analytics/tests/stats_test.php b/analytics/tests/stats_test.php index 5d8f3019c5c..77abb83f1ce 100644 --- a/analytics/tests/stats_test.php +++ b/analytics/tests/stats_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/test_target_shortname.php'); * @copyright 2019 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stats_test extends \advanced_testcase { +final class stats_test extends \advanced_testcase { /** * Set up the test environment. diff --git a/analytics/tests/time_splittings_test.php b/analytics/tests/time_splittings_test.php index 8292eca83c5..3fe2ef52b3e 100644 --- a/analytics/tests/time_splittings_test.php +++ b/analytics/tests/time_splittings_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../lib/enrollib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class time_splittings_test extends \advanced_testcase { +final class time_splittings_test extends \advanced_testcase { /** * setUp diff --git a/auth/db/tests/db_test.php b/auth/db/tests/db_test.php index 0e98f086714..10abad9e1aa 100644 --- a/auth/db/tests/db_test.php +++ b/auth/db/tests/db_test.php @@ -25,7 +25,7 @@ namespace auth_db; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class db_test extends \advanced_testcase { +final class db_test extends \advanced_testcase { /** @var string Original error log */ protected $oldlog; diff --git a/auth/email/tests/external/external_test.php b/auth/email/tests/external/external_test.php index 4c203e3c3d6..5dc180ef7af 100644 --- a/auth/email/tests/external/external_test.php +++ b/auth/email/tests/external/external_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.2 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/auth/ldap/tests/plugin_test.php b/auth/ldap/tests/plugin_test.php index 7635af45852..3add9184fc7 100644 --- a/auth/ldap/tests/plugin_test.php +++ b/auth/ldap/tests/plugin_test.php @@ -33,8 +33,7 @@ namespace auth_ldap; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { - +final class plugin_test extends \advanced_testcase { /** * Data provider for auth_ldap tests * diff --git a/auth/lti/tests/auth_test.php b/auth/lti/tests/auth_test.php index bce29ad8bef..4e7bfeaf0c8 100644 --- a/auth/lti/tests/auth_test.php +++ b/auth/lti/tests/auth_test.php @@ -24,7 +24,7 @@ namespace auth_lti; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_plugin_lti */ -class auth_test extends \advanced_testcase { +final class auth_test extends \advanced_testcase { /** @var string issuer URL used for test cases. */ protected static string $issuer = 'https://lms.example.org'; diff --git a/auth/lti/tests/privacy/provider_test.php b/auth/lti/tests/privacy/provider_test.php index d58146f9463..efb5a5f6728 100644 --- a/auth/lti/tests/privacy/provider_test.php +++ b/auth/lti/tests/privacy/provider_test.php @@ -30,7 +30,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_lti\privacy\provider */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/manual/tests/manual_test.php b/auth/manual/tests/manual_test.php index 77503b18e87..208837900b9 100644 --- a/auth/manual/tests/manual_test.php +++ b/auth/manual/tests/manual_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/auth/manual/auth.php'); * @copyright 2014 Gilles-Philippe Leblanc * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manual_test extends \advanced_testcase { +final class manual_test extends \advanced_testcase { /** @var auth_plugin_manual Keeps the authentication plugin. */ protected $authplugin; diff --git a/auth/manual/tests/privacy/provider_test.php b/auth/manual/tests/privacy/provider_test.php index 178f3673368..abf995d8435 100644 --- a/auth/manual/tests/privacy/provider_test.php +++ b/auth/manual/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use auth_manual\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var \auth_plugin_manual Keeps the authentication plugin. */ protected $authplugin; diff --git a/auth/mnet/tests/privacy/provider_test.php b/auth/mnet/tests/privacy/provider_test.php index 01fac8140b2..448bd7374d3 100644 --- a/auth/mnet/tests/privacy/provider_test.php +++ b/auth/mnet/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Victor Deniz * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/oauth2/tests/api_test.php b/auth/oauth2/tests/api_test.php index 627d4fd2f8e..f69230fcb9a 100644 --- a/auth/oauth2/tests/api_test.php +++ b/auth/oauth2/tests/api_test.php @@ -23,7 +23,7 @@ namespace auth_oauth2; * @copyright 2017 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test the cleaning of orphaned linked logins for all issuers. diff --git a/auth/oauth2/tests/auth_test.php b/auth/oauth2/tests/auth_test.php index 29dc8f8b15c..47a224d39c7 100644 --- a/auth/oauth2/tests/auth_test.php +++ b/auth/oauth2/tests/auth_test.php @@ -25,7 +25,7 @@ namespace auth_oauth2; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_oauth2\auth */ -class auth_test extends \advanced_testcase { +final class auth_test extends \advanced_testcase { public function test_get_password_change_info() { $this->resetAfterTest(); diff --git a/auth/oauth2/tests/privacy/provider_test.php b/auth/oauth2/tests/privacy/provider_test.php index d398182fac0..2cd81f7e3c3 100644 --- a/auth/oauth2/tests/privacy/provider_test.php +++ b/auth/oauth2/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/tests/digital_consent_test.php b/auth/tests/digital_consent_test.php index 8ad2d411b15..cc0579271b6 100644 --- a/auth/tests/digital_consent_test.php +++ b/auth/tests/digital_consent_test.php @@ -23,7 +23,7 @@ namespace core_auth; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class digital_consent_test extends \advanced_testcase { +final class digital_consent_test extends \advanced_testcase { public function test_is_age_digital_consent_verification_enabled() { global $CFG; diff --git a/auth/tests/external/external_test.php b/auth/tests/external/external_test.php index f8a56d45938..945822e453a 100644 --- a/auth/tests/external/external_test.php +++ b/auth/tests/external/external_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.2 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** @var string Original error log */ protected $oldlog; diff --git a/auth/tests/privacy/provider_test.php b/auth/tests/privacy/provider_test.php index 6e041552087..d6d0c4749d3 100644 --- a/auth/tests/privacy/provider_test.php +++ b/auth/tests/privacy/provider_test.php @@ -42,7 +42,7 @@ use core_auth\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/availability/condition/completion/tests/condition_test.php b/availability/condition/completion/tests/condition_test.php index 21e1c9d3425..df6bdf5b593 100644 --- a/availability/condition/completion/tests/condition_test.php +++ b/availability/condition/completion/tests/condition_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/availability/condition/date/tests/condition_test.php b/availability/condition/date/tests/condition_test.php index e34f6681feb..6985aecbd5f 100644 --- a/availability/condition/date/tests/condition_test.php +++ b/availability/condition/date/tests/condition_test.php @@ -25,7 +25,7 @@ use core_availability\tree; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/grade/tests/condition_test.php b/availability/condition/grade/tests/condition_test.php index 28c0b35b0e0..fed782b0158 100644 --- a/availability/condition/grade/tests/condition_test.php +++ b/availability/condition/grade/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_grade; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Tests constructing and using grade condition. */ diff --git a/availability/condition/group/tests/condition_test.php b/availability/condition/group/tests/condition_test.php index eb221ea9234..a816af7a6a4 100644 --- a/availability/condition/group/tests/condition_test.php +++ b/availability/condition/group/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_group; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/grouping/tests/condition_test.php b/availability/condition/grouping/tests/condition_test.php index 0de2be5aa28..2cefb187675 100644 --- a/availability/condition/grouping/tests/condition_test.php +++ b/availability/condition/grouping/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_grouping; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/profile/tests/condition_test.php b/availability/condition/profile/tests/condition_test.php index e8a61f4bb8c..9e201676bbd 100644 --- a/availability/condition/profile/tests/condition_test.php +++ b/availability/condition/profile/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_profile; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** @var profile_define_text Profile field for testing */ protected $profilefield; diff --git a/availability/tests/capability_checker_test.php b/availability/tests/capability_checker_test.php index b228a2f55f4..6a8428bc9c8 100644 --- a/availability/tests/capability_checker_test.php +++ b/availability/tests/capability_checker_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class capability_checker_test extends \advanced_testcase { +final class capability_checker_test extends \advanced_testcase { /** * Tests loading a class from /availability/classes. */ diff --git a/availability/tests/component_test.php b/availability/tests/component_test.php index 993c778361e..3588fe82ba4 100644 --- a/availability/tests/component_test.php +++ b/availability/tests/component_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class component_test extends \advanced_testcase { +final class component_test extends \advanced_testcase { /** * Tests loading a class from /availability/classes. */ diff --git a/availability/tests/info_test.php b/availability/tests/info_test.php index 0e8d01fd5b6..091d807f833 100644 --- a/availability/tests/info_test.php +++ b/availability/tests/info_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class info_test extends \advanced_testcase { +final class info_test extends \advanced_testcase { public function setUp(): void { // Load the mock condition so that it can be used. require_once(__DIR__ . '/fixtures/mock_condition.php'); diff --git a/availability/tests/tree_test.php b/availability/tests/tree_test.php index 3720e816f34..f9ccffcae16 100644 --- a/availability/tests/tree_test.php +++ b/availability/tests/tree_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tree_test extends \advanced_testcase { +final class tree_test extends \advanced_testcase { public function setUp(): void { // Load the mock classes so they can be used. require_once(__DIR__ . '/fixtures/mock_condition.php'); diff --git a/backup/controller/tests/controller_test.php b/backup/controller/tests/controller_test.php index f2ade3d6136..b19668619c2 100644 --- a/backup/controller/tests/controller_test.php +++ b/backup/controller/tests/controller_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class controller_test extends \advanced_testcase { +final class controller_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/converter/moodle1/tests/moodle1_converter_test.php b/backup/converter/moodle1/tests/moodle1_converter_test.php index b11f5058d11..b4cb09c1ae7 100644 --- a/backup/converter/moodle1/tests/moodle1_converter_test.php +++ b/backup/converter/moodle1/tests/moodle1_converter_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/backup/converter/moodle1/lib.php'); * @copyright 2011 Mark Nielsen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class moodle1_converter_test extends \advanced_testcase { +final class moodle1_converter_test extends \advanced_testcase { /** @var string the name of the directory containing the unpacked Moodle 1.9 backup */ protected $tempdir; diff --git a/backup/moodle2/tests/backup_encrypted_content_test.php b/backup/moodle2/tests/backup_encrypted_content_test.php index 5323b93cecf..12ce523cc77 100644 --- a/backup/moodle2/tests/backup_encrypted_content_test.php +++ b/backup/moodle2/tests/backup_encrypted_content_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_custom_fields.php'); * @copyright 2016 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_encrypted_content_test extends \advanced_testcase { +final class backup_encrypted_content_test extends \advanced_testcase { public function setUp(): void { if (!function_exists('openssl_encrypt')) { diff --git a/backup/moodle2/tests/backup_xml_transformer_test.php b/backup/moodle2/tests/backup_xml_transformer_test.php index 83c19a44c04..6b58d25b674 100644 --- a/backup/moodle2/tests/backup_xml_transformer_test.php +++ b/backup/moodle2/tests/backup_xml_transformer_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php'); * @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_xml_transformer_test extends \advanced_testcase { +final class backup_xml_transformer_test extends \advanced_testcase { /** * Initial set up. diff --git a/backup/moodle2/tests/moodle2_course_format_test.php b/backup/moodle2/tests/moodle2_course_format_test.php index 1712348315e..6e9ffde34c7 100644 --- a/backup/moodle2/tests/moodle2_course_format_test.php +++ b/backup/moodle2/tests/moodle2_course_format_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/moodle2/tests/fixtures/format_test_cs_opti * @copyright 2014 Russell Smith * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class moodle2_course_format_test extends \advanced_testcase { +final class moodle2_course_format_test extends \advanced_testcase { /** * Tests a backup and restore adds the required section option data diff --git a/backup/moodle2/tests/restore_gradebook_structure_step_test.php b/backup/moodle2/tests/restore_gradebook_structure_step_test.php index 70a8e7ccbdd..1410ba091b1 100644 --- a/backup/moodle2/tests/restore_gradebook_structure_step_test.php +++ b/backup/moodle2/tests/restore_gradebook_structure_step_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_gradebook_structure_step_test extends \advanced_testcase { +final class restore_gradebook_structure_step_test extends \advanced_testcase { /** * Provide tests for rewrite_step_backup_file_for_legacy_freeze based upon fixtures. diff --git a/backup/moodle2/tests/restore_stepslib_date_test.php b/backup/moodle2/tests/restore_stepslib_date_test.php index 8ff878c55d3..e4a1c859794 100644 --- a/backup/moodle2/tests/restore_stepslib_date_test.php +++ b/backup/moodle2/tests/restore_stepslib_date_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/base_test.php'); * @copyright 2017 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_stepslib_date_test extends \restore_date_testcase { +final class restore_stepslib_date_test extends \restore_date_testcase { /** * Restoring a manual grade item does not result in the timecreated or diff --git a/backup/tests/async_backup_test.php b/backup/tests/async_backup_test.php index ebb5711ac69..92cd6f63823 100644 --- a/backup/tests/async_backup_test.php +++ b/backup/tests/async_backup_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_backup_test extends \advanced_testcase { +final class async_backup_test extends \advanced_testcase { /** * Tests the asynchronous backup. diff --git a/backup/tests/async_restore_test.php b/backup/tests/async_restore_test.php index 01faf9a1731..9a43001732e 100644 --- a/backup/tests/async_restore_test.php +++ b/backup/tests/async_restore_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_restore_test extends \advanced_testcase { +final class async_restore_test extends \advanced_testcase { /** * Tests the asynchronous backup. diff --git a/backup/tests/automated_backup_test.php b/backup/tests/automated_backup_test.php index c7bc863b418..4df9081347f 100644 --- a/backup/tests/automated_backup_test.php +++ b/backup/tests/automated_backup_test.php @@ -40,7 +40,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2019 John Yao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class automated_backup_test extends \advanced_testcase { +final class automated_backup_test extends \advanced_testcase { /** * @var \backup_cron_automated_helper */ diff --git a/backup/tests/backup_cleanup_task_test.php b/backup/tests/backup_cleanup_task_test.php index 0a10bd65ccd..d502f96a821 100644 --- a/backup/tests/backup_cleanup_task_test.php +++ b/backup/tests/backup_cleanup_task_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2021 Mikhail Golenkov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_cleanup_task_test extends \advanced_testcase { +final class backup_cleanup_task_test extends \advanced_testcase { /** * Set up tasks for all tests. diff --git a/backup/tests/backup_restore_permission_test.php b/backup/tests/backup_restore_permission_test.php index 4d15cbe8c27..e23c513ded2 100644 --- a/backup/tests/backup_restore_permission_test.php +++ b/backup/tests/backup_restore_permission_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright Tomo Tsuyuki * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_restore_permission_test extends core_backup_backup_restore_base_testcase { +final class backup_restore_permission_test extends core_backup_backup_restore_base_testcase { /** @var stdClass A test course which is restored/imported from. */ protected $course1; diff --git a/backup/tests/externallib_test.php b/backup/tests/externallib_test.php index ee39842a302..b2094f8d60e 100644 --- a/backup/tests/externallib_test.php +++ b/backup/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/externallib.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up tasks for all tests. diff --git a/backup/tests/privacy/provider_test.php b/backup/tests/privacy/provider_test.php index 11627c5e26e..10306d9c991 100644 --- a/backup/tests/privacy/provider_test.php +++ b/backup/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/backup/tests/quiz_restore_decode_links_test.php b/backup/tests/quiz_restore_decode_links_test.php index e4117d508d9..471f1ca5dea 100644 --- a/backup/tests/quiz_restore_decode_links_test.php +++ b/backup/tests/quiz_restore_decode_links_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2020 Ilya Tregubov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_restore_decode_links_test extends \advanced_testcase { +final class quiz_restore_decode_links_test extends \advanced_testcase { /** * Test restore_decode_rule class diff --git a/backup/tests/roles_backup_restore_test.php b/backup/tests/roles_backup_restore_test.php index 5e2ac5b8c91..d595a24b27c 100644 --- a/backup/tests/roles_backup_restore_test.php +++ b/backup/tests/roles_backup_restore_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class roles_backup_restore_test extends advanced_testcase { +final class roles_backup_restore_test extends advanced_testcase { /** * Create a course where the (non-editing) Teacher role is overridden diff --git a/backup/util/checks/tests/checks_test.php b/backup/util/checks/tests/checks_test.php index d94f7eff417..b3ad67c5454 100644 --- a/backup/util/checks/tests/checks_test.php +++ b/backup/util/checks/tests/checks_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class checks_test extends \advanced_testcase { +final class checks_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/dbops/tests/backup_dbops_test.php b/backup/util/dbops/tests/backup_dbops_test.php index e644b42d88c..14006474705 100644 --- a/backup/util/dbops/tests/backup_dbops_test.php +++ b/backup/util/dbops/tests/backup_dbops_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_dbops_test extends \advanced_testcase { +final class backup_dbops_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/dbops/tests/backup_structure_dbops_test.php b/backup/util/dbops/tests/backup_structure_dbops_test.php index 69b38514202..deb39326cff 100644 --- a/backup/util/dbops/tests/backup_structure_dbops_test.php +++ b/backup/util/dbops/tests/backup_structure_dbops_test.php @@ -27,7 +27,7 @@ use backup_structure_dbops; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \backup_structure_dbops */ -class backup_structure_dbops_test extends \advanced_testcase { +final class backup_structure_dbops_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; parent::setUpBeforeClass(); diff --git a/backup/util/dbops/tests/restore_dbops_test.php b/backup/util/dbops/tests/restore_dbops_test.php index 6252b5e0a9f..0454f06a3aa 100644 --- a/backup/util/dbops/tests/restore_dbops_test.php +++ b/backup/util/dbops/tests/restore_dbops_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_dbops_test extends \advanced_testcase { +final class restore_dbops_test extends \advanced_testcase { /** * Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected. diff --git a/backup/util/destinations/tests/destinations_test.php b/backup/util/destinations/tests/destinations_test.php index ef0b4f346f7..dccf670c785 100644 --- a/backup/util/destinations/tests/destinations_test.php +++ b/backup/util/destinations/tests/destinations_test.php @@ -22,7 +22,7 @@ namespace core_backup; * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class destinations_test extends \basic_testcase { +final class destinations_test extends \basic_testcase { /** * test backup_destination class diff --git a/backup/util/factories/tests/factories_test.php b/backup/util/factories/tests/factories_test.php index d67f6defc02..45f06a69fe2 100644 --- a/backup/util/factories/tests/factories_test.php +++ b/backup/util/factories/tests/factories_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/factories/backup_factory.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factories_test extends \advanced_testcase { +final class factories_test extends \advanced_testcase { public function setUp(): void { global $CFG; diff --git a/backup/util/helper/tests/async_helper_test.php b/backup/util/helper/tests/async_helper_test.php index 8fd9b48c583..21310e387f8 100644 --- a/backup/util/helper/tests/async_helper_test.php +++ b/backup/util/helper/tests/async_helper_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_helper_test extends \advanced_testcase { +final class async_helper_test extends \advanced_testcase { /** * Tests sending message for asynchronous backup. diff --git a/backup/util/helper/tests/backup_encode_content_test.php b/backup/util/helper/tests/backup_encode_content_test.php index c93df258173..6721d242bc0 100644 --- a/backup/util/helper/tests/backup_encode_content_test.php +++ b/backup/util/helper/tests/backup_encode_content_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_course_task.class.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_encode_content_test extends \basic_testcase { +final class backup_encode_content_test extends \basic_testcase { /** * Test the encode_content_links method for course. diff --git a/backup/util/helper/tests/converterhelper_test.php b/backup/util/helper/tests/converterhelper_test.php index 6086c10f08a..137a9d329d4 100644 --- a/backup/util/helper/tests/converterhelper_test.php +++ b/backup/util/helper/tests/converterhelper_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/helper/convert_helper.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converterhelper_test extends \basic_testcase { +final class converterhelper_test extends \basic_testcase { public function test_choose_conversion_path() { diff --git a/backup/util/helper/tests/copy_helper_test.php b/backup/util/helper/tests/copy_helper_test.php index 1080fe56e66..40b014654ef 100644 --- a/backup/util/helper/tests/copy_helper_test.php +++ b/backup/util/helper/tests/copy_helper_test.php @@ -34,7 +34,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \copy_helper */ -class copy_helper_test extends \advanced_testcase { +final class copy_helper_test extends \advanced_testcase { /** * diff --git a/backup/util/helper/tests/cronhelper_test.php b/backup/util/helper/tests/cronhelper_test.php index 23ed6687dd4..69e0b51202b 100644 --- a/backup/util/helper/tests/cronhelper_test.php +++ b/backup/util/helper/tests/cronhelper_test.php @@ -43,7 +43,7 @@ require_once("$CFG->dirroot/backup/backup.class.php"); * @copyright 2012 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cronhelper_test extends \advanced_testcase { +final class cronhelper_test extends \advanced_testcase { /** * Test {@link backup_cron_automated_helper::calculate_next_automated_backup}. */ diff --git a/backup/util/helper/tests/decode_test.php b/backup/util/helper/tests/decode_test.php index 772c0ec2256..e722d8bc5f0 100644 --- a/backup/util/helper/tests/decode_test.php +++ b/backup/util/helper/tests/decode_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class decode_test extends \basic_testcase { +final class decode_test extends \basic_testcase { /** * test restore_decode_rule class diff --git a/backup/util/helper/tests/helper_test.php b/backup/util/helper/tests/helper_test.php index fe1392764c6..ca7449a1645 100644 --- a/backup/util/helper/tests/helper_test.php +++ b/backup/util/helper/tests/helper_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/backup/util/helper/backup_general_helper.class.ph * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \basic_testcase { +final class helper_test extends \basic_testcase { /* * test backup_helper class diff --git a/backup/util/helper/tests/restore_log_rule_test.php b/backup/util/helper/tests/restore_log_rule_test.php index 58c0cfc6ffa..26852177c5e 100644 --- a/backup/util/helper/tests/restore_log_rule_test.php +++ b/backup/util/helper/tests/restore_log_rule_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_log_rule_test extends \basic_testcase { +final class restore_log_rule_test extends \basic_testcase { function test_process_keeps_log_unmodified() { diff --git a/backup/util/helper/tests/restore_structure_parser_processor_test.php b/backup/util/helper/tests/restore_structure_parser_processor_test.php index 0edfb84baf1..096672e1978 100644 --- a/backup/util/helper/tests/restore_structure_parser_processor_test.php +++ b/backup/util/helper/tests/restore_structure_parser_processor_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/util/helper/restore_structure_parser_proce * @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_structure_parser_processor_test extends advanced_testcase { +final class restore_structure_parser_processor_test extends advanced_testcase { /** * Initial set up. diff --git a/backup/util/loggers/tests/logger_test.php b/backup/util/loggers/tests/logger_test.php index bbcdc4fcedb..e4ed29acdf7 100644 --- a/backup/util/loggers/tests/logger_test.php +++ b/backup/util/loggers/tests/logger_test.php @@ -55,7 +55,7 @@ require_once($CFG->dirroot . '/backup/util/loggers/file_logger.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class logger_test extends \basic_testcase { +final class logger_test extends \basic_testcase { /** * test base_logger class diff --git a/backup/util/plan/tests/plan_test.php b/backup/util/plan/tests/plan_test.php index 8c9c9c9bbec..edc7f7ea00c 100644 --- a/backup/util/plan/tests/plan_test.php +++ b/backup/util/plan/tests/plan_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plan_test extends \advanced_testcase { +final class plan_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/plan/tests/step_test.php b/backup/util/plan/tests/step_test.php index 81c62b3c3fc..0aa98e39105 100644 --- a/backup/util/plan/tests/step_test.php +++ b/backup/util/plan/tests/step_test.php @@ -42,7 +42,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class step_test extends \advanced_testcase { +final class step_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/plan/tests/task_test.php b/backup/util/plan/tests/task_test.php index b928222e90b..16aaced4925 100644 --- a/backup/util/plan/tests/task_test.php +++ b/backup/util/plan/tests/task_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_test extends \advanced_testcase { +final class task_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/settings/tests/settings_test.php b/backup/util/settings/tests/settings_test.php index 92cda1134e5..6c70ebe9cee 100644 --- a/backup/util/settings/tests/settings_test.php +++ b/backup/util/settings/tests/settings_test.php @@ -58,7 +58,7 @@ require_once($CFG->dirroot . '/backup/util/ui/backup_ui_setting.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class settings_test extends \basic_testcase { +final class settings_test extends \basic_testcase { /** * test base_setting class diff --git a/backup/util/structure/tests/baseatom_test.php b/backup/util/structure/tests/baseatom_test.php index 98070cd1b95..401a22e73ff 100644 --- a/backup/util/structure/tests/baseatom_test.php +++ b/backup/util/structure/tests/baseatom_test.php @@ -36,7 +36,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseatom_test extends \basic_testcase { +final class baseatom_test extends \basic_testcase { /** * Correct base_atom_tests diff --git a/backup/util/structure/tests/baseattribute_test.php b/backup/util/structure/tests/baseattribute_test.php index e8248c0311e..78a8fb24784 100644 --- a/backup/util/structure/tests/baseattribute_test.php +++ b/backup/util/structure/tests/baseattribute_test.php @@ -35,7 +35,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseattribute_test extends \basic_testcase { +final class baseattribute_test extends \basic_testcase { /** * Correct base_attribute tests diff --git a/backup/util/structure/tests/basefinalelement_test.php b/backup/util/structure/tests/basefinalelement_test.php index 93ce518bce6..d22d66f25ef 100644 --- a/backup/util/structure/tests/basefinalelement_test.php +++ b/backup/util/structure/tests/basefinalelement_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class basefinalelement_test extends \basic_testcase { +final class basefinalelement_test extends \basic_testcase { /** * Correct base_final_element tests diff --git a/backup/util/structure/tests/basenestedelement_test.php b/backup/util/structure/tests/basenestedelement_test.php index 50ce8b8003e..9614987498f 100644 --- a/backup/util/structure/tests/basenestedelement_test.php +++ b/backup/util/structure/tests/basenestedelement_test.php @@ -39,7 +39,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class basenestedelement_test extends \basic_testcase { +final class basenestedelement_test extends \basic_testcase { /** * Correct creation tests (attributes and final elements) diff --git a/backup/util/structure/tests/baseoptigroup_test.php b/backup/util/structure/tests/baseoptigroup_test.php index baa782ddb0b..e9d4c7527c5 100644 --- a/backup/util/structure/tests/baseoptigroup_test.php +++ b/backup/util/structure/tests/baseoptigroup_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseoptigroup_test extends \basic_testcase { +final class baseoptigroup_test extends \basic_testcase { /** * Correct creation tests (s) diff --git a/backup/util/structure/tests/structure_test.php b/backup/util/structure/tests/structure_test.php index 4b2a8b1b37e..3abdf81b48d 100644 --- a/backup/util/structure/tests/structure_test.php +++ b/backup/util/structure/tests/structure_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/backup/util/xml/output/memory_xml_output.class.ph * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class structure_test extends \advanced_testcase { +final class structure_test extends \advanced_testcase { /** @var int Store the inserted forum->id for use in test functions */ protected $forumid; diff --git a/backup/util/ui/tests/base_setting_ui_test.php b/backup/util/ui/tests/base_setting_ui_test.php index 801bd7c0f0c..7c4f548ebe9 100644 --- a/backup/util/ui/tests/base_setting_ui_test.php +++ b/backup/util/ui/tests/base_setting_ui_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/backup/util/settings/tests/settings_test.php'); * @copyright 2021 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_setting_ui_test extends \advanced_testcase { +final class base_setting_ui_test extends \advanced_testcase { /** * Tests set_label(). * diff --git a/backup/util/ui/tests/ui_test.php b/backup/util/ui/tests/ui_test.php index 7494909e903..020a6e38123 100644 --- a/backup/util/ui/tests/ui_test.php +++ b/backup/util/ui/tests/ui_test.php @@ -23,7 +23,7 @@ namespace core_backup; * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ui_test extends \basic_testcase { +final class ui_test extends \basic_testcase { /** * Test backup_ui class diff --git a/backup/util/xml/output/tests/output_test.php b/backup/util/xml/output/tests/output_test.php index 9deba27581a..cece2c746f1 100644 --- a/backup/util/xml/output/tests/output_test.php +++ b/backup/util/xml/output/tests/output_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/backup/util/xml/output/file_xml_output.class.php' * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class output_test extends \advanced_testcase { +final class output_test extends \advanced_testcase { /* * test memory_xml_output diff --git a/backup/util/xml/parser/tests/parser_test.php b/backup/util/xml/parser/tests/parser_test.php index 06acf90c5f8..66af1f55da0 100644 --- a/backup/util/xml/parser/tests/parser_test.php +++ b/backup/util/xml/parser/tests/parser_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/backup/util/xml/parser/processors/grouped_parser_ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class parser_test extends \advanced_testcase { +final class parser_test extends \advanced_testcase { /* * test progressive_parser public methods diff --git a/backup/util/xml/tests/writer_test.php b/backup/util/xml/tests/writer_test.php index 2e5c4543551..191a816ecda 100644 --- a/backup/util/xml/tests/writer_test.php +++ b/backup/util/xml/tests/writer_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/backup/util/xml/contenttransformer/xml_contenttra * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class writer_test extends \basic_testcase { +final class writer_test extends \basic_testcase { /** * test xml_writer public methods diff --git a/badges/tests/badgeslib_test.php b/badges/tests/badgeslib_test.php index 1de13d977a9..c5d4849c796 100644 --- a/badges/tests/badgeslib_test.php +++ b/badges/tests/badgeslib_test.php @@ -14,26 +14,19 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +use core_badges\helper; +use core_badges\tests\badges_testcase; +use core\task\manager; + /** * Unit tests for badges * - * @package core - * @subpackage badges + * @package core_badges * @copyright 2013 onwards Totara Learning Solutions Ltd {@link http://www.totaralms.com/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Yuliya Bozhko */ - -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->libdir . '/badgeslib.php'); -require_once($CFG->dirroot . '/badges/lib.php'); - -use core_badges\helper; -use core\task\manager; - -class badgeslib_test extends advanced_testcase { +final class badgeslib_test extends badges_testcase { protected $badgeid; protected $course; protected $user; @@ -163,7 +156,7 @@ class badgeslib_test extends advanced_testcase { '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"}'; } - public function test_create_badge() { + public function test_create_badge(): void { $badge = new badge($this->badgeid); $this->assertInstanceOf('badge', $badge); @@ -1585,6 +1578,7 @@ class badgeslib_test extends advanced_testcase { * @return array */ public static function badges_change_sortorder_backpacks_provider(): array { + static::load_requirements(); return [ "Test up" => [ 'backpacktomove' => 1, @@ -1639,6 +1633,8 @@ class badgeslib_test extends advanced_testcase { * @return array */ public static function badgr_open_url_generator(): array { + static::load_requirements(); + return [ 'Badgr Assertion URL test' => [ OPEN_BADGES_V2_TYPE_ASSERTION, "https://api.ca.badgr.io/public/assertions/123455" diff --git a/badges/tests/classes/badges_testcase.php b/badges/tests/classes/badges_testcase.php new file mode 100644 index 00000000000..930de11c619 --- /dev/null +++ b/badges/tests/classes/badges_testcase.php @@ -0,0 +1,184 @@ +. + +namespace core_badges\tests; + +use badge; +use core_tag_tag; +use stdClass; + +/** + * Unit tests for badges + * + * @package core_badges + * @copyright 2013 onwards Totara Learning Solutions Ltd {@link http://www.totaralms.com/} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @author Yuliya Bozhko + */ +abstract class badges_testcase extends \advanced_testcase { + protected $badgeid; + protected $course; + protected $user; + protected $module; + protected $coursebadge; + protected $assertion; + + /** @var $assertion2 to define json format for Open badge version 2 */ + protected $assertion2; + + #[\Override] + public static function setUpBeforeClass(): void { + parent::setUpBeforeClass(); + static::load_requirements(); + } + + /** + * Helper to load class dependencies. + * + * Note: This must be called in any data providers. + */ + protected static function load_requirements(): void { + global $CFG; + + require_once($CFG->libdir . '/badgeslib.php'); + require_once($CFG->dirroot . '/badges/lib.php'); + } + + #[\Override] + protected function setUp(): void { + global $DB, $CFG; + parent::setUp(); + $this->resetAfterTest(true); + $CFG->enablecompletion = true; + $user = $this->getDataGenerator()->create_user(); + $fordb = new stdClass(); + $fordb->id = null; + $fordb->name = "Test badge with 'apostrophe' and other friends (<>&@#)"; + $fordb->description = "Testing badges"; + $fordb->timecreated = time(); + $fordb->timemodified = time(); + $fordb->usercreated = $user->id; + $fordb->usermodified = $user->id; + $fordb->issuername = "Test issuer"; + $fordb->issuerurl = "http://issuer-url.domain.co.nz"; + $fordb->issuercontact = "issuer@example.com"; + $fordb->expiredate = null; + $fordb->expireperiod = null; + $fordb->type = BADGE_TYPE_SITE; + $fordb->version = 1; + $fordb->language = 'en'; + $fordb->courseid = null; + $fordb->messagesubject = "Test message subject"; + $fordb->message = "Test message body"; + $fordb->attachment = 1; + $fordb->notification = 0; + $fordb->imageauthorname = "Image Author 1"; + $fordb->imageauthoremail = "author@example.com"; + $fordb->imageauthorurl = "http://author-url.example.com"; + $fordb->imagecaption = "Test caption image"; + $fordb->status = BADGE_STATUS_INACTIVE; + + $this->badgeid = $DB->insert_record('badge', $fordb, true); + + // Set the default Issuer (because OBv2 needs them). + set_config('badges_defaultissuername', $fordb->issuername); + set_config('badges_defaultissuercontact', $fordb->issuercontact); + + // Create a course with activity and auto completion tracking. + $this->course = $this->getDataGenerator()->create_course(array('enablecompletion' => true)); + $this->user = $this->getDataGenerator()->create_user(); + $studentrole = $DB->get_record('role', array('shortname' => 'student')); + $this->assertNotEmpty($studentrole); + + // Get manual enrolment plugin and enrol user. + require_once($CFG->dirroot.'/enrol/manual/locallib.php'); + $manplugin = enrol_get_plugin('manual'); + $maninstance = $DB->get_record('enrol', array('courseid' => $this->course->id, 'enrol' => 'manual'), '*', MUST_EXIST); + $manplugin->enrol_user($maninstance, $this->user->id, $studentrole->id); + $this->assertEquals(1, $DB->count_records('user_enrolments')); + $completionauto = array('completion' => COMPLETION_TRACKING_AUTOMATIC); + $this->module = $this->getDataGenerator()->create_module('forum', array('course' => $this->course->id), $completionauto); + + // Build badge and criteria. + $fordb->type = BADGE_TYPE_COURSE; + $fordb->courseid = $this->course->id; + $fordb->status = BADGE_STATUS_ACTIVE; + $this->coursebadge = $DB->insert_record('badge', $fordb, true); + + // Insert Endorsement. + $endorsement = new stdClass(); + $endorsement->badgeid = $this->coursebadge; + $endorsement->issuername = "Issuer 123"; + $endorsement->issueremail = "issuer123@email.com"; + $endorsement->issuerurl = "https://example.org/issuer-123"; + $endorsement->dateissued = 1524567747; + $endorsement->claimid = "https://example.org/robotics-badge.json"; + $endorsement->claimcomment = "Test endorser comment"; + $DB->insert_record('badge_endorsement', $endorsement, true); + + // Insert related badges. + $badge = new badge($this->coursebadge); + $clonedid = $badge->make_clone(); + $badgeclone = new badge($clonedid); + $badgeclone->status = BADGE_STATUS_ACTIVE; + $badgeclone->save(); + + $relatebadge = new stdClass(); + $relatebadge->badgeid = $this->coursebadge; + $relatebadge->relatedbadgeid = $clonedid; + $relatebadge->relatedid = $DB->insert_record('badge_related', $relatebadge, true); + + // Insert a aligment. + $alignment = new stdClass(); + $alignment->badgeid = $this->coursebadge; + $alignment->targetname = 'CCSS.ELA-Literacy.RST.11-12.3'; + $alignment->targeturl = 'http://www.corestandards.org/ELA-Literacy/RST/11-12/3'; + $alignment->targetdescription = 'Test target description'; + $alignment->targetframework = 'CCSS.RST.11-12.3'; + $alignment->targetcode = 'CCSS.RST.11-12.3'; + $DB->insert_record('badge_alignment', $alignment, true); + + // Insert tags. + core_tag_tag::set_item_tags('core_badges', 'badge', $badge->id, $badge->get_context(), ['tag1', 'tag2']); + + $this->assertion = new stdClass(); + $this->assertion->badge = '{"uid":"%s","recipient":{"identity":"%s","type":"email","hashed":true,"salt":"%s"},' . + '"badge":"%s","verify":{"type":"hosted","url":"%s"},"issuedOn":"%d","evidence":"%s","tags":%s}'; + $this->assertion->class = '{"name":"%s","description":"%s","image":"%s","criteria":"%s","issuer":"%s","tags":%s}'; + $this->assertion->issuer = '{"name":"%s","url":"%s","email":"%s"}'; + // Format JSON-LD for Openbadge specification version 2.0. + $this->assertion2 = new stdClass(); + $this->assertion2->badge = '{"recipient":{"identity":"%s","type":"email","hashed":true,"salt":"%s"},' . + '"badge":{"name":"%s","description":"%s","image":"%s",' . + '"criteria":{"id":"%s","narrative":"%s"},"issuer":{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"},' . + '"tags":%s,"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"BadgeClass","version":"%s",' . + '"@language":"en","related":[{"id":"%s","version":"%s","@language":"%s"}],"endorsement":"%s",' . + '"alignments":[{"targetName":"%s","targetUrl":"%s","targetDescription":"%s","targetFramework":"%s",' . + '"targetCode":"%s"}]},"verify":{"type":"hosted","url":"%s"},"issuedOn":"%s","evidence":"%s","tags":%s,' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","type":"Assertion","id":"%s"}'; + + $this->assertion2->class = '{"name":"%s","description":"%s","image":"%s",' . + '"criteria":{"id":"%s","narrative":"%s"},"issuer":{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"},' . + '"tags":%s,"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"BadgeClass","version":"%s",' . + '"@language":"%s","related":[{"id":"%s","version":"%s","@language":"%s"}],"endorsement":"%s",' . + '"alignments":[{"targetName":"%s","targetUrl":"%s","targetDescription":"%s","targetFramework":"%s",' . + '"targetCode":"%s"}]}'; + $this->assertion2->issuer = '{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"}'; + } +} diff --git a/badges/tests/events_test.php b/badges/tests/events_test.php index ab411a9b542..4d713b20150 100644 --- a/badges/tests/events_test.php +++ b/badges/tests/events_test.php @@ -13,16 +13,8 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Badge events tests. - * - * @package core_badges - * @copyright 2015 onwards Simey Lameze - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -defined('MOODLE_INTERNAL') || die(); -global $CFG; -require_once($CFG->dirroot . '/badges/tests/badgeslib_test.php'); + +use core_badges\tests\badges_testcase; /** * Badge events tests class. @@ -31,13 +23,11 @@ require_once($CFG->dirroot . '/badges/tests/badgeslib_test.php'); * @copyright 2015 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends badgeslib_test { - +final class events_test extends badges_testcase { /** * Test badge awarded event. */ public function test_badge_awarded() { - $systemcontext = context_system::instance(); $sink = $this->redirectEvents(); @@ -62,8 +52,7 @@ class events_test extends badgeslib_test { * There is no external API for creating a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_created() { - + public function test_badge_created(): void { $badge = new badge($this->badgeid); // Trigger an event: badge created. $eventparams = array( @@ -85,7 +74,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -107,10 +95,8 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } - /** * Test the badge updated event. * @@ -130,8 +116,8 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } + /** * Test the badge deleted event. */ @@ -150,7 +136,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -172,7 +157,6 @@ class events_test extends badgeslib_test { $this->assertEquals($newid, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -195,7 +179,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -218,7 +201,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -227,8 +209,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_created() { - + public function test_badge_criteria_created(): void { $badge = new badge($this->badgeid); // Trigger and capture the event. @@ -248,7 +229,6 @@ class events_test extends badgeslib_test { $this->assertEquals($criteriaprofile->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -257,8 +237,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_updated() { - + public function test_badge_criteria_updated(): void { $criteriaoverall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_OVERALL, 'badgeid' => $this->badgeid)); $criteriaoverall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ALL)); $criteriaprofile = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_PROFILE, 'badgeid' => $this->badgeid)); @@ -281,7 +260,6 @@ class events_test extends badgeslib_test { $this->assertEquals($this->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -290,8 +268,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_deleted() { - + public function test_badge_criteria_deleted(): void { $criteriaoverall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_OVERALL, 'badgeid' => $this->badgeid)); $criteriaoverall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ALL)); $badge = new badge($this->badgeid); @@ -308,7 +285,6 @@ class events_test extends badgeslib_test { $this->assertEquals($criteriaoverall->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -317,8 +293,7 @@ class events_test extends badgeslib_test { * There is no external API for viewing a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_viewed() { - + public function test_badge_viewed(): void { $badge = new badge($this->badgeid); // Trigger an event: badge viewed. $other = array('badgeid' => $badge->id, 'badgehash' => '12345678'); @@ -340,7 +315,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -349,8 +323,7 @@ class events_test extends badgeslib_test { * There is no external API for viewing a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_listing_viewed() { - + public function test_badge_listing_viewed(): void { // Trigger an event: badge listing viewed. $context = context_system::instance(); $eventparams = array( @@ -370,6 +343,5 @@ class events_test extends badgeslib_test { $this->assertEquals(BADGE_TYPE_SITE, $event->other['badgetype']); $this->assertDebuggingNotCalled(); $sink->close(); - } } diff --git a/badges/tests/external/external_test.php b/badges/tests/external/external_test.php index 126c2d7f13b..8aa2bbe3a00 100644 --- a/badges/tests/external/external_test.php +++ b/badges/tests/external/external_test.php @@ -45,7 +45,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** @var stdClass $course */ private $course; diff --git a/badges/tests/output/manage_badge_action_bar_test.php b/badges/tests/output/manage_badge_action_bar_test.php index e7047eae453..1d56b1c6cd8 100644 --- a/badges/tests/output/manage_badge_action_bar_test.php +++ b/badges/tests/output/manage_badge_action_bar_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manage_badge_action_bar_test extends \advanced_testcase { +final class manage_badge_action_bar_test extends \advanced_testcase { /** * Data provider for test_generate_badge_navigation * diff --git a/badges/tests/privacy/provider_test.php b/badges/tests/privacy/provider_test.php index 128a6fd8dac..b380bb770c5 100644 --- a/badges/tests/privacy/provider_test.php +++ b/badges/tests/privacy/provider_test.php @@ -47,7 +47,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/blocks/accessreview/tests/accessibility_review_test.php b/blocks/accessreview/tests/accessibility_review_test.php index 00f74ad458c..16ae0b8e85e 100644 --- a/blocks/accessreview/tests/accessibility_review_test.php +++ b/blocks/accessreview/tests/accessibility_review_test.php @@ -30,7 +30,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_accessreview */ -class accessibility_review_test extends advanced_testcase { +final class accessibility_review_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_accessreview.php'); diff --git a/blocks/badges/tests/badges_test.php b/blocks/badges/tests/badges_test.php index 2bd60e552f3..3c945958b43 100644 --- a/blocks/badges/tests/badges_test.php +++ b/blocks/badges/tests/badges_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_badges */ -class badges_test extends advanced_testcase { +final class badges_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_badges.php'); diff --git a/blocks/blog_menu/tests/blog_menu_test.php b/blocks/blog_menu/tests/blog_menu_test.php index be1d28e840e..f77c8bf7f38 100644 --- a/blocks/blog_menu/tests/blog_menu_test.php +++ b/blocks/blog_menu/tests/blog_menu_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_menu */ -class blog_menu_test extends advanced_testcase { +final class blog_menu_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_menu.php'); diff --git a/blocks/blog_recent/tests/blog_recent_test.php b/blocks/blog_recent/tests/blog_recent_test.php index 6b69e6156bf..7e1553b1c2b 100644 --- a/blocks/blog_recent/tests/blog_recent_test.php +++ b/blocks/blog_recent/tests/blog_recent_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_recent */ -class blog_recent_test extends advanced_testcase { +final class blog_recent_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_recent.php'); diff --git a/blocks/blog_tags/tests/blog_tags_test.php b/blocks/blog_tags/tests/blog_tags_test.php index 6244e7def80..7f5dc86eaad 100644 --- a/blocks/blog_tags/tests/blog_tags_test.php +++ b/blocks/blog_tags/tests/blog_tags_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_tags */ -class blog_tags_test extends advanced_testcase { +final class blog_tags_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_tags.php'); diff --git a/blocks/comments/tests/comments_test.php b/blocks/comments/tests/comments_test.php index e19eb26e23d..0bd090fc044 100644 --- a/blocks/comments/tests/comments_test.php +++ b/blocks/comments/tests/comments_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_comments */ -class comments_test extends advanced_testcase { +final class comments_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_comments.php'); diff --git a/blocks/comments/tests/event/events_test.php b/blocks/comments/tests/event/events_test.php index 980d497b371..62ddf012b17 100644 --- a/blocks/comments/tests/event/events_test.php +++ b/blocks/comments/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace block_comments\event; * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass Keeps course object */ private $course; diff --git a/blocks/comments/tests/privacy/provider_test.php b/blocks/comments/tests/privacy/provider_test.php index 8cecd1380ac..78a10428ac7 100644 --- a/blocks/comments/tests/privacy/provider_test.php +++ b/blocks/comments/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass A student who is only enrolled in course1. */ protected $student1; diff --git a/blocks/completionstatus/tests/completionstatus_test.php b/blocks/completionstatus/tests/completionstatus_test.php index deb92674091..eacef5e3a3d 100644 --- a/blocks/completionstatus/tests/completionstatus_test.php +++ b/blocks/completionstatus/tests/completionstatus_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_completionstatus */ -class completionstatus_test extends advanced_testcase { +final class completionstatus_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_completionstatus.php'); diff --git a/blocks/globalsearch/tests/globalsearch_test.php b/blocks/globalsearch/tests/globalsearch_test.php index 29e438824aa..31e8b9347f1 100644 --- a/blocks/globalsearch/tests/globalsearch_test.php +++ b/blocks/globalsearch/tests/globalsearch_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_globalsearch */ -class globalsearch_test extends advanced_testcase { +final class globalsearch_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_globalsearch.php'); diff --git a/blocks/glossary_random/tests/glossary_random_test.php b/blocks/glossary_random/tests/glossary_random_test.php index 08b07821ceb..f84ddadd5ce 100644 --- a/blocks/glossary_random/tests/glossary_random_test.php +++ b/blocks/glossary_random/tests/glossary_random_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_glossary_random */ -class glossary_random_test extends advanced_testcase { +final class glossary_random_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_glossary_random.php'); diff --git a/blocks/html/tests/block_html_test.php b/blocks/html/tests/block_html_test.php index 3c94431fe65..e2fb7e83e03 100644 --- a/blocks/html/tests/block_html_test.php +++ b/blocks/html/tests/block_html_test.php @@ -26,7 +26,7 @@ namespace block_html; * * @coversDefaultClass \block_html */ -class block_html_test extends \advanced_testcase { +final class block_html_test extends \advanced_testcase { /** * Tests instance files copying. * @covers ::instance_copy diff --git a/blocks/html/tests/privacy/provider_test.php b/blocks/html/tests/privacy/provider_test.php index 1348d130a1a..0d056b4bebb 100644 --- a/blocks/html/tests/privacy/provider_test.php +++ b/blocks/html/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use block_html\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Get the list of standard format options for comparison. * diff --git a/blocks/html/tests/search_content_test.php b/blocks/html/tests/search_content_test.php index c31566d9c30..e3fdde8a546 100644 --- a/blocks/html/tests/search_content_test.php +++ b/blocks/html/tests/search_content_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_content_test extends \advanced_testcase { +final class search_content_test extends \advanced_testcase { /** * Creates an HTML block on a course. diff --git a/blocks/lp/tests/lp_test.php b/blocks/lp/tests/lp_test.php index d93d91c0521..42e3150300b 100644 --- a/blocks/lp/tests/lp_test.php +++ b/blocks/lp/tests/lp_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_lp */ -class lp_test extends advanced_testcase { +final class lp_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_lp.php'); diff --git a/blocks/mnet_hosts/tests/mnet_hosts_test.php b/blocks/mnet_hosts/tests/mnet_hosts_test.php index a15a2ec8d35..2ca407327dc 100644 --- a/blocks/mnet_hosts/tests/mnet_hosts_test.php +++ b/blocks/mnet_hosts/tests/mnet_hosts_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_mnet_hosts */ -class mnet_hosts_test extends advanced_testcase { +final class mnet_hosts_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_mnet_hosts.php'); diff --git a/blocks/myoverview/tests/myoverview_test.php b/blocks/myoverview/tests/myoverview_test.php index f667cdc9c22..4da3d485734 100644 --- a/blocks/myoverview/tests/myoverview_test.php +++ b/blocks/myoverview/tests/myoverview_test.php @@ -24,7 +24,7 @@ namespace block_myoverview; * @copyright 2019 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class myoverview_test extends \advanced_testcase { +final class myoverview_test extends \advanced_testcase { /** * Test getting block configuration diff --git a/blocks/myoverview/tests/privacy/provider_test.php b/blocks/myoverview/tests/privacy/provider_test.php index f071cffb405..690602bd172 100644 --- a/blocks/myoverview/tests/privacy/provider_test.php +++ b/blocks/myoverview/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use block_myoverview\privacy\provider; * @copyright 2018 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. */ diff --git a/blocks/online_users/tests/generator_test.php b/blocks/online_users/tests/generator_test.php index ad5a7dfa079..1fe857dcfed 100644 --- a/blocks/online_users/tests/generator_test.php +++ b/blocks/online_users/tests/generator_test.php @@ -24,8 +24,8 @@ namespace block_online_users; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/blocks/online_users/tests/online_users_test.php b/blocks/online_users/tests/online_users_test.php index 2f653ca62a5..6ec8f98a3d3 100644 --- a/blocks/online_users/tests/online_users_test.php +++ b/blocks/online_users/tests/online_users_test.php @@ -25,7 +25,7 @@ namespace block_online_users; * @author Barry Oosthuizen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class online_users_test extends \advanced_testcase { +final class online_users_test extends \advanced_testcase { protected $data; diff --git a/blocks/recentlyaccesseditems/tests/externallib_test.php b/blocks/recentlyaccesseditems/tests/externallib_test.php index 0d98f1e90ec..4dbd7a1aa3f 100644 --- a/blocks/recentlyaccesseditems/tests/externallib_test.php +++ b/blocks/recentlyaccesseditems/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.6 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test the get_recent_items function. diff --git a/blocks/recentlyaccesseditems/tests/helper_test.php b/blocks/recentlyaccesseditems/tests/helper_test.php index 3eff6f7e09a..129382f7089 100644 --- a/blocks/recentlyaccesseditems/tests/helper_test.php +++ b/blocks/recentlyaccesseditems/tests/helper_test.php @@ -24,7 +24,7 @@ namespace block_recentlyaccesseditems; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Tests that the get recent items method can handle getting records when courses have been deleted. */ diff --git a/blocks/recentlyaccesseditems/tests/observer_test.php b/blocks/recentlyaccesseditems/tests/observer_test.php index 6b1b30e56dd..a6edd8dfbb1 100644 --- a/blocks/recentlyaccesseditems/tests/observer_test.php +++ b/blocks/recentlyaccesseditems/tests/observer_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.6 */ -class observer_test extends \advanced_testcase { +final class observer_test extends \advanced_testcase { use \mod_assign_test_generator; /** diff --git a/blocks/recentlyaccesseditems/tests/privacy/provider_test.php b/blocks/recentlyaccesseditems/tests/privacy/provider_test.php index de95e8bcfc5..465a383e412 100644 --- a/blocks/recentlyaccesseditems/tests/privacy/provider_test.php +++ b/blocks/recentlyaccesseditems/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.6 */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/blocks/rss_client/tests/cron_test.php b/blocks/rss_client/tests/cron_test.php index b90b73fcd7f..ac2cd67dcad 100644 --- a/blocks/rss_client/tests/cron_test.php +++ b/blocks/rss_client/tests/cron_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../block_rss_client.php'); * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cron_test extends \advanced_testcase { +final class cron_test extends \advanced_testcase { /** * Test that when a record has a skipuntil time that is greater * than the current time the attempt is skipped. diff --git a/blocks/rss_client/tests/privacy/provider_test.php b/blocks/rss_client/tests/privacy/provider_test.php index e04f0b4fd3a..319cb356fed 100644 --- a/blocks/rss_client/tests/privacy/provider_test.php +++ b/blocks/rss_client/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/blocks/tag_youtube/tests/block_tag_youtube_test.php b/blocks/tag_youtube/tests/block_tag_youtube_test.php index deae56cfbdc..d72bbdb24f9 100644 --- a/blocks/tag_youtube/tests/block_tag_youtube_test.php +++ b/blocks/tag_youtube/tests/block_tag_youtube_test.php @@ -24,7 +24,7 @@ namespace block_tag_youtube; * @copyright 2015 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class block_tag_youtube_test extends \advanced_testcase { +final class block_tag_youtube_test extends \advanced_testcase { /** * Testing the tag youtube block's initial state after a new installation. diff --git a/blocks/tags/tests/tags_test.php b/blocks/tags/tests/tags_test.php index 4c69a5870c2..6b4009f56ed 100644 --- a/blocks/tags/tests/tags_test.php +++ b/blocks/tags/tests/tags_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_tags */ -class tags_test extends advanced_testcase { +final class tags_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_tags.php'); diff --git a/blocks/tests/externallib_test.php b/blocks/tests/externallib_test.php index 8291879622d..d431b7c0721 100644 --- a/blocks/tests/externallib_test.php +++ b/blocks/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/my/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_course_blocks diff --git a/blocks/tests/privacy/provider_test.php b/blocks/tests/privacy/provider_test.php index b292847b203..f16d4b6ddc3 100644 --- a/blocks/tests/privacy/provider_test.php +++ b/blocks/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_block\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/blocks/timeline/tests/privacy/provider_test.php b/blocks/timeline/tests/privacy/provider_test.php index 6596744fa7b..04dc937e253 100644 --- a/blocks/timeline/tests/privacy/provider_test.php +++ b/blocks/timeline/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use block_timeline\privacy\provider; * @copyright 2018 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. diff --git a/blog/tests/event/events_test.php b/blog/tests/event/events_test.php index a53e99197d9..c60bc0d3d81 100644 --- a/blog/tests/event/events_test.php +++ b/blog/tests/event/events_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var $courseid */ private $courseid; diff --git a/blog/tests/external/external_test.php b/blog/tests/external/external_test.php index d75489bd43e..f2f1d25e1a1 100644 --- a/blog/tests/external/external_test.php +++ b/blog/tests/external/external_test.php @@ -37,8 +37,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); * @copyright 2018 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends \advanced_testcase { - +final class external_test extends \externallib_advanced_testcase { private $courseid; private $cmid; private $userid; diff --git a/blog/tests/lib_test.php b/blog/tests/lib_test.php index 345e9d2936e..0f2a652bcd4 100644 --- a/blog/tests/lib_test.php +++ b/blog/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); /** * Test functions that rely on the DB tables */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { private $courseid; private $cmid; diff --git a/blog/tests/privacy/provider_test.php b/blog/tests/privacy/provider_test.php index a2fe8eb0de0..d4ab7b83484 100644 --- a/blog/tests/privacy/provider_test.php +++ b/blog/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/blog/tests/reportbuilder/datasource/blogs_test.php b/blog/tests/reportbuilder/datasource/blogs_test.php index 857c0b1c493..19d6bc7ce7e 100644 --- a/blog/tests/reportbuilder/datasource/blogs_test.php +++ b/blog/tests/reportbuilder/datasource/blogs_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blogs_test extends core_reportbuilder_testcase { +final class blogs_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/cache/stores/apcu/tests/store_test.php b/cache/stores/apcu/tests/store_test.php index 975ac673897..e8da59b21d2 100644 --- a/cache/stores/apcu/tests/store_test.php +++ b/cache/stores/apcu/tests/store_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/cache/stores/apcu/lib.php'); * @copyright 2014 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the apcu class name * @return string diff --git a/cache/stores/file/tests/asyncpurge_test.php b/cache/stores/file/tests/asyncpurge_test.php index 6611aecf11e..2ebde57b2b1 100644 --- a/cache/stores/file/tests/asyncpurge_test.php +++ b/cache/stores/file/tests/asyncpurge_test.php @@ -29,7 +29,7 @@ use cachestore_file; * @author Jackson D'Souza * @coversDefaultClass \cachestore_file */ -class asyncpurge_test extends \advanced_testcase { +final class asyncpurge_test extends \advanced_testcase { /** * Testing Asynchronous file store cache purge diff --git a/cache/stores/file/tests/store_test.php b/cache/stores/file/tests/store_test.php index d39725bd2c7..21da9c6aeea 100644 --- a/cache/stores/file/tests/store_test.php +++ b/cache/stores/file/tests/store_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot.'/cache/stores/file/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \cachestore_file */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the file class name * @return string diff --git a/cache/stores/redis/tests/compressor_test.php b/cache/stores/redis/tests/compressor_test.php index 5158554eefd..a130586b1ca 100644 --- a/cache/stores/redis/tests/compressor_test.php +++ b/cache/stores/redis/tests/compressor_test.php @@ -36,7 +36,7 @@ require_once(__DIR__.'/../lib.php'); * @copyright 2018 Catalyst IT Australia {@link http://www.catalyst-au.net} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class compressor_test extends \advanced_testcase { +final class compressor_test extends \advanced_testcase { /** * Test set up diff --git a/cache/stores/redis/tests/store_test.php b/cache/stores/redis/tests/store_test.php index 525848bf06b..f4292715067 100644 --- a/cache/stores/redis/tests/store_test.php +++ b/cache/stores/redis/tests/store_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/../lib.php'); * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * @var cachestore_redis */ diff --git a/cache/stores/session/tests/store_test.php b/cache/stores/session/tests/store_test.php index 0c9ec4a1e13..19b8ecefec6 100644 --- a/cache/stores/session/tests/store_test.php +++ b/cache/stores/session/tests/store_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/cache/stores/session/lib.php'); * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the session class name * @return string diff --git a/cache/stores/static/tests/store_test.php b/cache/stores/static/tests/store_test.php index 0e4615a42c8..38dba4c75df 100644 --- a/cache/stores/static/tests/store_test.php +++ b/cache/stores/static/tests/store_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/cache/stores/static/lib.php'); * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the static class name * @return string diff --git a/calendar/tests/action_event_test.php b/calendar/tests/action_event_test.php index ab77a88edf2..171831bfe80 100644 --- a/calendar/tests/action_event_test.php +++ b/calendar/tests/action_event_test.php @@ -41,7 +41,7 @@ defined('MOODLE_INTERNAL') || die; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_event_test extends \advanced_testcase { +final class action_event_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/action_factory_test.php b/calendar/tests/action_factory_test.php index e6e1507673d..70b4f62ed86 100644 --- a/calendar/tests/action_factory_test.php +++ b/calendar/tests/action_factory_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\entities\action_interface; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_factory_test extends \advanced_testcase { +final class action_factory_test extends \advanced_testcase { /** * Test action factory. */ diff --git a/calendar/tests/action_test.php b/calendar/tests/action_test.php index 553db87369d..e2f44f549b7 100644 --- a/calendar/tests/action_test.php +++ b/calendar/tests/action_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\action; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_test extends \advanced_testcase { +final class action_test extends \advanced_testcase { /** * Test action class getters. * diff --git a/calendar/tests/calendar_event_exporter_test.php b/calendar/tests/calendar_event_exporter_test.php index c146a11ed3a..d78c520dc49 100644 --- a/calendar/tests/calendar_event_exporter_test.php +++ b/calendar/tests/calendar_event_exporter_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_event_exporter_test extends \advanced_testcase { +final class calendar_event_exporter_test extends \advanced_testcase { /** * Data provider for the timestamp min limit test case to confirm * that the minimum time limit is set correctly on the boundary cases. diff --git a/calendar/tests/calendar_information_test.php b/calendar/tests/calendar_information_test.php index ac8761d9b8d..c7919f0fcb8 100644 --- a/calendar/tests/calendar_information_test.php +++ b/calendar/tests/calendar_information_test.php @@ -27,7 +27,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_information_test extends \advanced_testcase { +final class calendar_information_test extends \advanced_testcase { /** * Helper to mock a course and category structure. diff --git a/calendar/tests/calendartype_test.php b/calendar/tests/calendartype_test.php index 57d5038a2f8..51443036b2b 100644 --- a/calendar/tests/calendartype_test.php +++ b/calendar/tests/calendartype_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/user/profile/definelib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.6 */ -class calendartype_test extends \advanced_testcase { +final class calendartype_test extends \advanced_testcase { /** @var MoodleQuickForm Keeps reference of dummy form object */ private $mform; diff --git a/calendar/tests/cm_info_proxy_test.php b/calendar/tests/cm_info_proxy_test.php index fcab933fae7..650e3dea347 100644 --- a/calendar/tests/cm_info_proxy_test.php +++ b/calendar/tests/cm_info_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\cm_info_proxy; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cm_info_proxy_test extends \advanced_testcase { +final class cm_info_proxy_test extends \advanced_testcase { /** * Test creating cm_info_std_proxy, using getter and setter. diff --git a/calendar/tests/container_test.php b/calendar/tests/container_test.php index b4500815f1b..b1a57506386 100644 --- a/calendar/tests/container_test.php +++ b/calendar/tests/container_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class container_test extends \advanced_testcase { +final class container_test extends \advanced_testcase { /** * Test setup. diff --git a/calendar/tests/coursecat_proxy_test.php b/calendar/tests/coursecat_proxy_test.php index 669105cae29..4df2877b4a2 100644 --- a/calendar/tests/coursecat_proxy_test.php +++ b/calendar/tests/coursecat_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\coursecat_proxy; * @copyright 2017 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class coursecat_proxy_test extends \advanced_testcase { +final class coursecat_proxy_test extends \advanced_testcase { public function test_valid_coursecat() { global $DB; diff --git a/calendar/tests/event/events_test.php b/calendar/tests/event/events_test.php index edb609a9c15..7aaf03a0af0 100644 --- a/calendar/tests/event/events_test.php +++ b/calendar/tests/event/events_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/calendar/tests/externallib_test.php'); * @copyright 2014 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * The test user. diff --git a/calendar/tests/event_description_test.php b/calendar/tests/event_description_test.php index b58213a9c37..3e2c998db64 100644 --- a/calendar/tests/event_description_test.php +++ b/calendar/tests/event_description_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\event_description; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_description_test extends \advanced_testcase { +final class event_description_test extends \advanced_testcase { /** * Test event description class getters. * diff --git a/calendar/tests/event_factory_test.php b/calendar/tests/event_factory_test.php index 21ce1522cf6..906caa54f97 100644 --- a/calendar/tests/event_factory_test.php +++ b/calendar/tests/event_factory_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_factory_test extends \advanced_testcase { +final class event_factory_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/event_mapper_test.php b/calendar/tests/event_mapper_test.php index 2fe720b51df..e1a460ff35b 100644 --- a/calendar/tests/event_mapper_test.php +++ b/calendar/tests/event_mapper_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_mapper_test extends \advanced_testcase { +final class event_mapper_test extends \advanced_testcase { /** * Test legacy event -> event. */ diff --git a/calendar/tests/event_test.php b/calendar/tests/event_test.php index a2f31d74834..9d71794b060 100644 --- a/calendar/tests/event_test.php +++ b/calendar/tests/event_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_test extends \advanced_testcase { +final class event_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/event_times_test.php b/calendar/tests/event_times_test.php index 0b3904ccd37..f7aa6f9368d 100644 --- a/calendar/tests/event_times_test.php +++ b/calendar/tests/event_times_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\event_times; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_times_test extends \advanced_testcase { +final class event_times_test extends \advanced_testcase { /** * Test event times class getters. * diff --git a/calendar/tests/event_vault_test.php b/calendar/tests/event_vault_test.php index 579e6461f3a..c2d7edc0f7f 100644 --- a/calendar/tests/event_vault_test.php +++ b/calendar/tests/event_vault_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/calendar/tests/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_vault_test extends \advanced_testcase { +final class event_vault_test extends \advanced_testcase { /** * Test that get_action_events_by_timesort returns events after the diff --git a/calendar/tests/events_related_objects_cache_test.php b/calendar/tests/events_related_objects_cache_test.php index 91ed2a3ff48..51f952cc748 100644 --- a/calendar/tests/events_related_objects_cache_test.php +++ b/calendar/tests/events_related_objects_cache_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_related_objects_cache_test extends \advanced_testcase { +final class events_related_objects_cache_test extends \advanced_testcase { /** * Tests set up diff --git a/calendar/tests/externallib_test.php b/calendar/tests/externallib_test.php index c5c062b2a72..4e7b2487e6d 100644 --- a/calendar/tests/externallib_test.php +++ b/calendar/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.5 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Tests set up diff --git a/calendar/tests/lib_test.php b/calendar/tests/lib_test.php index 68c2f8989ee..2c6b87248d1 100644 --- a/calendar/tests/lib_test.php +++ b/calendar/tests/lib_test.php @@ -23,7 +23,7 @@ namespace core_calendar; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/calendar/tests/local_api_test.php b/calendar/tests/local_api_test.php index 0d3e7d1184e..abe24c132fd 100644 --- a/calendar/tests/local_api_test.php +++ b/calendar/tests/local_api_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_calendar\local\api */ -class local_api_test extends \advanced_testcase { +final class local_api_test extends \advanced_testcase { /** * Tests set up diff --git a/calendar/tests/privacy/provider_test.php b/calendar/tests/privacy/provider_test.php index 8645f0d5966..7ae1732e1cc 100644 --- a/calendar/tests/privacy/provider_test.php +++ b/calendar/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/calendar/tests/raw_event_retrieval_strategy_test.php b/calendar/tests/raw_event_retrieval_strategy_test.php index 235d68fe7f2..7c79a9a1518 100644 --- a/calendar/tests/raw_event_retrieval_strategy_test.php +++ b/calendar/tests/raw_event_retrieval_strategy_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/calendar/tests/helpers.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class raw_event_retrieval_strategy_test extends \advanced_testcase { +final class raw_event_retrieval_strategy_test extends \advanced_testcase { /** * Test retrieval strategy when module is disabled. */ diff --git a/calendar/tests/repeat_event_collection_test.php b/calendar/tests/repeat_event_collection_test.php index 935eb2bf159..6a251e7d157 100644 --- a/calendar/tests/repeat_event_collection_test.php +++ b/calendar/tests/repeat_event_collection_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repeat_event_collection_test extends \advanced_testcase { +final class repeat_event_collection_test extends \advanced_testcase { /** * Test that the collection id is set to the parent id if the repeat id * is falsey. diff --git a/calendar/tests/rrule_manager_test.php b/calendar/tests/rrule_manager_test.php index ed9a3c11994..a5717aea78b 100644 --- a/calendar/tests/rrule_manager_test.php +++ b/calendar/tests/rrule_manager_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rrule_manager_test extends \advanced_testcase { +final class rrule_manager_test extends \advanced_testcase { /** @var calendar_event a dummy event */ protected $event; diff --git a/calendar/tests/std_proxy_test.php b/calendar/tests/std_proxy_test.php index 5de821581b7..8f879d537f3 100644 --- a/calendar/tests/std_proxy_test.php +++ b/calendar/tests/std_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\std_proxy; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class std_proxy_test extends \advanced_testcase { +final class std_proxy_test extends \advanced_testcase { /** * @var \stdClass[] $objects Array of objects to proxy. */ diff --git a/cohort/tests/externallib_test.php b/cohort/tests/externallib_test.php index 83e2a972747..c2ff24e3783 100644 --- a/cohort/tests/externallib_test.php +++ b/cohort/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/cohort/externallib.php'); * @copyright MediaTouch 2000 srl * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test create_cohorts diff --git a/cohort/tests/lib_test.php b/cohort/tests/lib_test.php index ccadc66a0c7..96f573d1bde 100644 --- a/cohort/tests/lib_test.php +++ b/cohort/tests/lib_test.php @@ -30,7 +30,7 @@ require_once("$CFG->dirroot/cohort/lib.php"); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_cohort_add_cohort() { global $DB; diff --git a/cohort/tests/privacy/provider_test.php b/cohort/tests/privacy/provider_test.php index 7f1fc5a8b0f..87609caedcf 100644 --- a/cohort/tests/privacy/provider_test.php +++ b/cohort/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/cohort/tests/reportbuilder/audience/cohortmember_test.php b/cohort/tests/reportbuilder/audience/cohortmember_test.php index bfd7620cb2d..8354fa30667 100644 --- a/cohort/tests/reportbuilder/audience/cohortmember_test.php +++ b/cohort/tests/reportbuilder/audience/cohortmember_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cohortmember_test extends advanced_testcase { +final class cohortmember_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/cohort/tests/reportbuilder/datasource/cohorts_test.php b/cohort/tests/reportbuilder/datasource/cohorts_test.php index cb7f034641f..b8e1611bbfe 100644 --- a/cohort/tests/reportbuilder/datasource/cohorts_test.php +++ b/cohort/tests/reportbuilder/datasource/cohorts_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cohorts_test extends core_reportbuilder_testcase { +final class cohorts_test extends core_reportbuilder_testcase { /** * Test cohorts datasource diff --git a/comment/tests/context_freeze_test.php b/comment/tests/context_freeze_test.php index 29bbd81fa0c..9243db8c7fc 100644 --- a/comment/tests/context_freeze_test.php +++ b/comment/tests/context_freeze_test.php @@ -28,7 +28,7 @@ use core_comment_external; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class context_freeze_test extends \advanced_testcase { +final class context_freeze_test extends \advanced_testcase { /** * Creates a comment by a student. * diff --git a/comment/tests/externallib_test.php b/comment/tests/externallib_test.php index 4465b1ec47e..0549e0d28c6 100644 --- a/comment/tests/externallib_test.php +++ b/comment/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.9 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Tests set up diff --git a/comment/tests/privacy/provider_test.php b/comment/tests/privacy/provider_test.php index 4e49cf29a56..6788ba7ac3b 100644 --- a/comment/tests/privacy/provider_test.php +++ b/comment/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\tests\request\approved_contextlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { protected function setUp(): void { $this->resetAfterTest(); diff --git a/comment/tests/reportbuilder/datasource/comments_test.php b/comment/tests/reportbuilder/datasource/comments_test.php index 7f272b58172..e671fafa615 100644 --- a/comment/tests/reportbuilder/datasource/comments_test.php +++ b/comment/tests/reportbuilder/datasource/comments_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class comments_test extends core_reportbuilder_testcase { +final class comments_test extends core_reportbuilder_testcase { /** * Require test libraries diff --git a/competency/tests/api_test.php b/competency/tests/api_test.php index ab1eaebd6f9..c58c2599d5e 100644 --- a/competency/tests/api_test.php +++ b/competency/tests/api_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { public function test_get_framework_related_contexts() { $this->resetAfterTest(true); diff --git a/competency/tests/competency_override_test.php b/competency/tests/competency_override_test.php index d0e4fb48b78..3cfaa09bad6 100644 --- a/competency/tests/competency_override_test.php +++ b/competency/tests/competency_override_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2022 Matthew Hilton * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class competency_override_test extends \advanced_testcase { +final class competency_override_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(true); diff --git a/competency/tests/competency_rule_test.php b/competency/tests/competency_rule_test.php index 893fa724c45..0ba327c034c 100644 --- a/competency/tests/competency_rule_test.php +++ b/competency/tests/competency_rule_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class competency_rule_test extends \externallib_advanced_testcase { +final class competency_rule_test extends \externallib_advanced_testcase { public function test_rule_all_matching() { $this->resetAfterTest(true); diff --git a/competency/tests/competency_test.php b/competency/tests/competency_test.php index eb1c3d523ae..08c6b5912b9 100644 --- a/competency/tests/competency_test.php +++ b/competency/tests/competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class competency_test extends \advanced_testcase { +final class competency_test extends \advanced_testcase { public function test_get_framework_depth() { $this->resetAfterTest(); diff --git a/competency/tests/course_competency_settings_test.php b/competency/tests/course_competency_settings_test.php index b825af74325..b48a6ca0df3 100644 --- a/competency/tests/course_competency_settings_test.php +++ b/competency/tests/course_competency_settings_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_competency_settings_test extends \advanced_testcase { +final class course_competency_settings_test extends \advanced_testcase { public function test_who_can_change_settings() { global $CFG, $DB; diff --git a/competency/tests/course_competency_test.php b/competency/tests/course_competency_test.php index ae1da6a99c8..e75b85ab800 100644 --- a/competency/tests/course_competency_test.php +++ b/competency/tests/course_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_competency_test extends \advanced_testcase { +final class course_competency_test extends \advanced_testcase { public function test_get_courses_with_competency_and_user() { global $CFG, $DB; diff --git a/competency/tests/course_module_competency_test.php b/competency/tests/course_module_competency_test.php index 1d7bd3b0ac2..bd1d2cfaea6 100644 --- a/competency/tests/course_module_competency_test.php +++ b/competency/tests/course_module_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2019 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_module_competency_test extends \advanced_testcase { +final class course_module_competency_test extends \advanced_testcase { public function test_count_competencies() { global $CFG, $DB; diff --git a/competency/tests/event/events_test.php b/competency/tests/event/events_test.php index 3c916dfeb88..8f10196dbf7 100644 --- a/competency/tests/event/events_test.php +++ b/competency/tests/event/events_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @copyright 2016 Serge Gauthier * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test the competency framework created event. diff --git a/competency/tests/external/external_test.php b/competency/tests/external/external_test.php index 8f3b842a694..00f620bb5ae 100644 --- a/competency/tests/external/external_test.php +++ b/competency/tests/external/external_test.php @@ -49,7 +49,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** @var \stdClass $creator User with enough permissions to create insystem context. */ protected $creator = null; diff --git a/competency/tests/generator_test.php b/competency/tests/generator_test.php index d520dc147c6..b86e485bf0b 100644 --- a/competency/tests/generator_test.php +++ b/competency/tests/generator_test.php @@ -24,7 +24,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_framework() { $this->resetAfterTest(true); diff --git a/competency/tests/hooks_test.php b/competency/tests/hooks_test.php index 595d31c17c3..3f3e251bcd6 100644 --- a/competency/tests/hooks_test.php +++ b/competency/tests/hooks_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class hooks_test extends \advanced_testcase { +final class hooks_test extends \advanced_testcase { public function test_hook_course_deleted() { $this->resetAfterTest(); diff --git a/competency/tests/lib_test.php b/competency/tests/lib_test.php index 660d4c4dfae..b9e128eb88f 100644 --- a/competency/tests/lib_test.php +++ b/competency/tests/lib_test.php @@ -38,7 +38,7 @@ global $CFG; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_comment_add_user_competency() { global $DB, $PAGE; diff --git a/competency/tests/performance_helper_test.php b/competency/tests/performance_helper_test.php index ae9477da573..13b67a9cba0 100644 --- a/competency/tests/performance_helper_test.php +++ b/competency/tests/performance_helper_test.php @@ -25,7 +25,7 @@ use core_competency\external\performance_helper; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class performance_helper_test extends \advanced_testcase { +final class performance_helper_test extends \advanced_testcase { public function test_get_context_from_competency() { global $DB; diff --git a/competency/tests/plan_test.php b/competency/tests/plan_test.php index b71e0d9d826..0e0b54fa9bb 100644 --- a/competency/tests/plan_test.php +++ b/competency/tests/plan_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plan_test extends \advanced_testcase { +final class plan_test extends \advanced_testcase { public function test_can_manage_user() { $this->resetAfterTest(true); diff --git a/competency/tests/privacy/provider_test.php b/competency/tests/privacy/provider_test.php index 6ec1f8e03a1..0e4bd0cac0c 100644 --- a/competency/tests/privacy/provider_test.php +++ b/competency/tests/privacy/provider_test.php @@ -47,7 +47,7 @@ use core_competency\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/competency/tests/task/task_test.php b/competency/tests/task/task_test.php index cbca259d5a9..ee121a1bb89 100644 --- a/competency/tests/task/task_test.php +++ b/competency/tests/task/task_test.php @@ -27,7 +27,7 @@ use core_competency\template; * @copyright 2015 Issam Taboubi * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_test extends \advanced_testcase { +final class task_test extends \advanced_testcase { public function test_sync_plans_from_cohorts_task() { global $DB; diff --git a/competency/tests/template_test.php b/competency/tests/template_test.php index 6087ca7fb25..1ac76ac1766 100644 --- a/competency/tests/template_test.php +++ b/competency/tests/template_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class template_test extends \advanced_testcase { +final class template_test extends \advanced_testcase { public function test_validate_duedate() { global $DB; diff --git a/competency/tests/user_evidence_competency_test.php b/competency/tests/user_evidence_competency_test.php index 60090b43233..d5400741e00 100644 --- a/competency/tests/user_evidence_competency_test.php +++ b/competency/tests/user_evidence_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Serge Gauthier - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_evidence_competency_test extends \advanced_testcase { +final class user_evidence_competency_test extends \advanced_testcase { public function test_get_user_competencies_by_userevidenceid() { global $CFG, $DB; diff --git a/completion/tests/activity_custom_completion_test.php b/completion/tests/activity_custom_completion_test.php index 9b8bd33b38b..b82fd197917 100644 --- a/completion/tests/activity_custom_completion_test.php +++ b/completion/tests/activity_custom_completion_test.php @@ -30,7 +30,7 @@ use PHPUnit\Framework\MockObject\MockObject; * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_custom_completion_test extends advanced_testcase { +final class activity_custom_completion_test extends advanced_testcase { /** * Fetches a mocked activity_custom_completion instance. diff --git a/completion/tests/api_test.php b/completion/tests/api_test.php index 5a92d85e59d..8d4e89eb067 100644 --- a/completion/tests/api_test.php +++ b/completion/tests/api_test.php @@ -24,7 +24,7 @@ namespace core_completion; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test setup. diff --git a/completion/tests/bulk_update_test.php b/completion/tests/bulk_update_test.php index c61db0e6c81..74f3a3e8932 100644 --- a/completion/tests/bulk_update_test.php +++ b/completion/tests/bulk_update_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2017 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class bulk_update_test extends \advanced_testcase { +final class bulk_update_test extends \advanced_testcase { /** * Provider for test_bulk_form_submit_single diff --git a/completion/tests/capabilities_test.php b/completion/tests/capabilities_test.php index cf6e58383b4..0d069288bbb 100644 --- a/completion/tests/capabilities_test.php +++ b/completion/tests/capabilities_test.php @@ -24,7 +24,7 @@ namespace core_completion; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class capabilities_test extends \advanced_testcase { +final class capabilities_test extends \advanced_testcase { /** * A user who does not have capabilities to add events to the calendar should be able to create activities. */ diff --git a/completion/tests/cm_completion_details_test.php b/completion/tests/cm_completion_details_test.php index 8417845223c..6667eec27a9 100644 --- a/completion/tests/cm_completion_details_test.php +++ b/completion/tests/cm_completion_details_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cm_completion_details_test extends advanced_testcase { +final class cm_completion_details_test extends advanced_testcase { /** @var completion_info A completion object. */ protected $completioninfo = null; diff --git a/completion/tests/completion_criteria_test.php b/completion/tests/completion_criteria_test.php index 7061d7e86e7..b1653e44d41 100644 --- a/completion/tests/completion_criteria_test.php +++ b/completion/tests/completion_criteria_test.php @@ -24,7 +24,7 @@ namespace core_completion; * @copyright 2021 Mikhail Golenkov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class completion_criteria_test extends \advanced_testcase { +final class completion_criteria_test extends \advanced_testcase { /** * Test setup. diff --git a/completion/tests/externallib_test.php b/completion/tests/externallib_test.php index c293e1de1e5..9da1400e7d2 100644 --- a/completion/tests/externallib_test.php +++ b/completion/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.9 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test update_activity_completion_status_manually diff --git a/completion/tests/privacy/provider_test.php b/completion/tests/privacy/provider_test.php index 6d1d81948a6..5c759990c51 100644 --- a/completion/tests/privacy/provider_test.php +++ b/completion/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/completion/tests/fixtures/completion_creation.php * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { use \completion_creation; diff --git a/completion/tests/progress_test.php b/completion/tests/progress_test.php index 51a6b576678..58b514fc7b9 100644 --- a/completion/tests/progress_test.php +++ b/completion/tests/progress_test.php @@ -26,7 +26,7 @@ use completion_completion; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class progress_test extends \advanced_testcase { +final class progress_test extends \advanced_testcase { /** * Test setup. diff --git a/contentbank/contenttype/h5p/tests/content_h5p_test.php b/contentbank/contenttype/h5p/tests/content_h5p_test.php index f7cdeb03b2d..8e71a8d5324 100644 --- a/contentbank/contenttype/h5p/tests/content_h5p_test.php +++ b/contentbank/contenttype/h5p/tests/content_h5p_test.php @@ -25,7 +25,7 @@ namespace contenttype_h5p; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \contenttype_h5p\content */ -class content_h5p_test extends \advanced_testcase { +final class content_h5p_test extends \advanced_testcase { /** * Tests for uploaded file. diff --git a/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php b/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php index 592072817ba..8ec5eb92c6f 100644 --- a/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php +++ b/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php @@ -25,7 +25,7 @@ namespace contenttype_h5p; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \contenttype_h5p\contenttype */ -class contenttype_h5p_test extends \advanced_testcase { +final class contenttype_h5p_test extends \advanced_testcase { /** * Test the behaviour of delete_content(). diff --git a/contentbank/tests/content_test.php b/contentbank/tests/content_test.php index cee3b9cd813..fa7474b2a66 100644 --- a/contentbank/tests/content_test.php +++ b/contentbank/tests/content_test.php @@ -39,7 +39,7 @@ use contenttype_testable\contenttype as contenttype; * @coversDefaultClass \core_contentbank\content * */ -class content_test extends \advanced_testcase { +final class content_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/contentbank/tests/contentbank_test.php b/contentbank/tests/contentbank_test.php index c7f369f1d26..05d99084b41 100644 --- a/contentbank/tests/contentbank_test.php +++ b/contentbank/tests/contentbank_test.php @@ -49,7 +49,7 @@ require_once($CFG->dirroot . '/contentbank/tests/fixtures/testable_content.php') * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_contentbank\contentbank */ -class contentbank_test extends advanced_testcase { +final class contentbank_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/contentbank/tests/contenttype_test.php b/contentbank/tests/contenttype_test.php index d137335e942..762ac2ddeee 100644 --- a/contentbank/tests/contenttype_test.php +++ b/contentbank/tests/contenttype_test.php @@ -40,7 +40,7 @@ use contenttype_testable\contenttype as contenttype; * @coversDefaultClass \core_contentbank\contenttype * */ -class contenttype_test extends \advanced_testcase { +final class contenttype_test extends \advanced_testcase { /** @var int Identifier for the manager role. */ protected $managerroleid; diff --git a/contentbank/tests/external/delete_content_test.php b/contentbank/tests/external/delete_content_test.php index 0e801302e18..289eddf96f6 100644 --- a/contentbank/tests/external/delete_content_test.php +++ b/contentbank/tests/external/delete_content_test.php @@ -43,7 +43,7 @@ use externallib_advanced_testcase; * @copyright 2020 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_content_test extends externallib_advanced_testcase { +final class delete_content_test extends externallib_advanced_testcase { /** * Test the behaviour of delete_content(). diff --git a/contentbank/tests/external/rename_content_test.php b/contentbank/tests/external/rename_content_test.php index 822e54fbd15..b8f0bebcac9 100644 --- a/contentbank/tests/external/rename_content_test.php +++ b/contentbank/tests/external/rename_content_test.php @@ -43,7 +43,7 @@ use external_api; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_contentbank\external\rename_content */ -class rename_content_test extends \externallib_advanced_testcase { +final class rename_content_test extends \externallib_advanced_testcase { /** * Data provider for test_rename_content. diff --git a/contentbank/tests/privacy/provider_test.php b/contentbank/tests/privacy/provider_test.php index 61e31e93d3d..3ebdeac7f69 100644 --- a/contentbank/tests/privacy/provider_test.php +++ b/contentbank/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2020 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/base_test.php b/course/format/tests/base_test.php index 8fa7ef2a9be..59d5c61e8e6 100644 --- a/course/format/tests/base_test.php +++ b/course/format/tests/base_test.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\base */ -class base_test extends advanced_testcase { +final class base_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/external/get_state_test.php b/course/format/tests/external/get_state_test.php index 3c13dbff7dd..ea69a226b3a 100644 --- a/course/format/tests/external/get_state_test.php +++ b/course/format/tests/external/get_state_test.php @@ -32,7 +32,7 @@ use external_api; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\external\get_state */ -class get_state_test extends \externallib_advanced_testcase { +final class get_state_test extends \externallib_advanced_testcase { /** @var array Sections in the testing course. */ private $sections; diff --git a/course/format/tests/external/update_course_test.php b/course/format/tests/external/update_course_test.php index 0691132da30..09fee3f8940 100644 --- a/course/format/tests/external/update_course_test.php +++ b/course/format/tests/external/update_course_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\external\update_course */ -class update_course_test extends \externallib_advanced_testcase { +final class update_course_test extends \externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/output/local/state/cm_test.php b/course/format/tests/output/local/state/cm_test.php index cdbc6bea7cc..b386ace924e 100644 --- a/course/format/tests/output/local/state/cm_test.php +++ b/course/format/tests/output/local/state/cm_test.php @@ -29,7 +29,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\output\local\state\cm */ -class cm_test extends \advanced_testcase { +final class cm_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/output/local/state/section_test.php b/course/format/tests/output/local/state/section_test.php index e5afb3fbf24..6fd7df28a9e 100644 --- a/course/format/tests/output/local/state/section_test.php +++ b/course/format/tests/output/local/state/section_test.php @@ -29,7 +29,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\output\local\state\section */ -class section_test extends \advanced_testcase { +final class section_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/output/local/state/state_test.php b/course/format/tests/output/local/state/state_test.php index 3e508faf1c8..597ac98fb71 100644 --- a/course/format/tests/output/local/state/state_test.php +++ b/course/format/tests/output/local/state/state_test.php @@ -24,7 +24,7 @@ namespace core_courseformat\output\local\state; * @copyright 2021 Ilya Tregubov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class state_test extends \advanced_testcase { +final class state_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/privacy/provider_test.php b/course/format/tests/privacy/provider_test.php index ada7676399e..d7960bc5c96 100644 --- a/course/format/tests/privacy/provider_test.php +++ b/course/format/tests/privacy/provider_test.php @@ -27,7 +27,7 @@ use core_privacy\local\request\writer; * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::test_export_user_preferences(). diff --git a/course/format/tests/stateupdates_test.php b/course/format/tests/stateupdates_test.php index 183d8114611..b6eef17f241 100644 --- a/course/format/tests/stateupdates_test.php +++ b/course/format/tests/stateupdates_test.php @@ -27,7 +27,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\stateupdates */ -class stateupdates_test extends \advanced_testcase { +final class stateupdates_test extends \advanced_testcase { /** * Test for add_course_put. diff --git a/course/format/topics/tests/format_topics_test.php b/course/format/topics/tests/format_topics_test.php index 31794cfe452..3be7ab8efc4 100644 --- a/course/format/topics/tests/format_topics_test.php +++ b/course/format/topics/tests/format_topics_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2015 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_topics_test extends \advanced_testcase { +final class format_topics_test extends \advanced_testcase { /** * Tests for format_topics::get_section_name method with default section names. diff --git a/course/format/weeks/tests/format_weeks_test.php b/course/format/weeks/tests/format_weeks_test.php index 8d6414a2a0c..9b25a9cdd61 100644 --- a/course/format/weeks/tests/format_weeks_test.php +++ b/course/format/weeks/tests/format_weeks_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2015 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_weeks_test extends \advanced_testcase { +final class format_weeks_test extends \advanced_testcase { /** * Tests for format_weeks::get_section_name method with default section names. diff --git a/course/format/weeks/tests/observer_test.php b/course/format/weeks/tests/observer_test.php index 4ab42703a63..8da491a2276 100644 --- a/course/format/weeks/tests/observer_test.php +++ b/course/format/weeks/tests/observer_test.php @@ -23,7 +23,7 @@ namespace format_weeks; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class observer_test extends \advanced_testcase { +final class observer_test extends \advanced_testcase { /** * Test setup. diff --git a/course/tests/analytics/indicators_test.php b/course/tests/analytics/indicators_test.php index 7a1baab8bf1..ee6d068335d 100644 --- a/course/tests/analytics/indicators_test.php +++ b/course/tests/analytics/indicators_test.php @@ -31,7 +31,7 @@ require_once(__DIR__ . '/../../../analytics/tests/fixtures/test_target_course_us * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class indicators_test extends \advanced_testcase { +final class indicators_test extends \advanced_testcase { /** * test_no_teacher diff --git a/course/tests/backup/restore_test.php b/course/tests/backup/restore_test.php index 550504007a9..8b6b6d419de 100644 --- a/course/tests/backup/restore_test.php +++ b/course/tests/backup/restore_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/course/format/tests/fixtures/format_theunittest.p * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_test extends \advanced_testcase { +final class restore_test extends \advanced_testcase { /** * Backup a course and return its backup ID. diff --git a/course/tests/backup_restore_activity_test.php b/course/tests/backup_restore_activity_test.php index 0fc1d9ebbb2..64bb2aa8837 100644 --- a/course/tests/backup_restore_activity_test.php +++ b/course/tests/backup_restore_activity_test.php @@ -26,7 +26,17 @@ use backup; * @covers \backup_module_structure_step * @covers \restore_module_structure_step */ -class backup_restore_activity_test extends \advanced_testcase { +final class backup_restore_activity_test extends \advanced_testcase { + /** + * Load the backup and restore classes. + */ + public static function setUpBeforeClass(): void { + global $CFG; + require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); + require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); + + parent::setUpBeforeClass(); + } /** * Test that duplicating a page preserves the lang setting. diff --git a/course/tests/caching_content_item_readonly_repository_test.php b/course/tests/caching_content_item_readonly_repository_test.php index ffb76c63901..dd1497dd7a8 100644 --- a/course/tests/caching_content_item_readonly_repository_test.php +++ b/course/tests/caching_content_item_readonly_repository_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\caching_content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class caching_content_item_readonly_repository_test extends \advanced_testcase { +final class caching_content_item_readonly_repository_test extends \advanced_testcase { /** * Test verifying that content items are cached and returned from the cache in subsequent same-request calls. */ diff --git a/course/tests/category_hooks_test.php b/course/tests/category_hooks_test.php index 17d347a465c..5a45c9c17db 100644 --- a/course/tests/category_hooks_test.php +++ b/course/tests/category_hooks_test.php @@ -36,7 +36,7 @@ use core_course\test\mock_hooks; /** * Functional test for class core_course_category methods invoking hooks. */ -class category_hooks_test extends \advanced_testcase { +final class category_hooks_test extends \advanced_testcase { protected function setUp(): void { $this->resetAfterTest(); diff --git a/course/tests/category_test.php b/course/tests/category_test.php index bc51b31295a..45eb4c1110d 100644 --- a/course/tests/category_test.php +++ b/course/tests/category_test.php @@ -26,7 +26,7 @@ use core_course_category; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class category_test extends \advanced_testcase { +final class category_test extends \advanced_testcase { protected $roles; diff --git a/course/tests/content_item_readonly_repository_test.php b/course/tests/content_item_readonly_repository_test.php index e055209f85e..9516d45a7f9 100644 --- a/course/tests/content_item_readonly_repository_test.php +++ b/course/tests/content_item_readonly_repository_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_item_readonly_repository_test extends \advanced_testcase { +final class content_item_readonly_repository_test extends \advanced_testcase { /** * Test the repository method, find_all_for_course(). */ diff --git a/course/tests/content_item_test.php b/course/tests/content_item_test.php index 6742c4f151a..0fe45db83bb 100644 --- a/course/tests/content_item_test.php +++ b/course/tests/content_item_test.php @@ -38,7 +38,7 @@ use core_course\local\entity\string_title; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_item_test extends \advanced_testcase { +final class content_item_test extends \advanced_testcase { /** * Test the content_item class. diff --git a/course/tests/course_delete_modules_test.php b/course/tests/course_delete_modules_test.php index 72098f0b16a..1267b079e45 100644 --- a/course/tests/course_delete_modules_test.php +++ b/course/tests/course_delete_modules_test.php @@ -32,7 +32,7 @@ namespace core_course; * @copyright 2021 Tomo Tsuyuki * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_delete_modules_test extends \advanced_testcase { +final class course_delete_modules_test extends \advanced_testcase { /** * Test to have a no message for usual process. diff --git a/course/tests/course_format_function_test.php b/course/tests/course_format_function_test.php index 6e89eca9786..20d7d6038a6 100644 --- a/course/tests/course_format_function_test.php +++ b/course/tests/course_format_function_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/course/format/lib.php'); * @author Jason den Dulk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_format_function_test extends \basic_testcase { +final class course_format_function_test extends \basic_testcase { /** * Tests clean_param_if_not_null function diff --git a/course/tests/course_image_cache_test.php b/course/tests/course_image_cache_test.php index c3fffd79c21..2a3cc45360a 100644 --- a/course/tests/course_image_cache_test.php +++ b/course/tests/course_image_cache_test.php @@ -31,7 +31,7 @@ use core_course\cache\course_image; * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_image_cache_test extends \advanced_testcase { +final class course_image_cache_test extends \advanced_testcase { /** * Initial setup. diff --git a/course/tests/course_summary_exporter_test.php b/course/tests/course_summary_exporter_test.php index b9fb8f120d0..e985307d59a 100644 --- a/course/tests/course_summary_exporter_test.php +++ b/course/tests/course_summary_exporter_test.php @@ -29,7 +29,7 @@ use context_course; * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_summary_exporter_test extends \advanced_testcase { +final class course_summary_exporter_test extends \advanced_testcase { /** * Test that if no course overview images uploaded get_course_image returns false. diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index 01b0d1fde9e..7f420bbe2cd 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -63,7 +63,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courselib_test extends advanced_testcase { +final class courselib_test extends advanced_testcase { /** * Load required libraries and fixtures. diff --git a/course/tests/courserequest_test.php b/course/tests/courserequest_test.php index e47df520e4b..32e00065341 100644 --- a/course/tests/courserequest_test.php +++ b/course/tests/courserequest_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/course/lib.php'); * @copyright 2012 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courserequest_test extends \advanced_testcase { +final class courserequest_test extends \advanced_testcase { public function test_create_request() { global $DB, $USER; diff --git a/course/tests/customfield_test.php b/course/tests/customfield_test.php index ff0f5cb85cc..5620b997c9f 100644 --- a/course/tests/customfield_test.php +++ b/course/tests/customfield_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class customfield_test extends \advanced_testcase { +final class customfield_test extends \advanced_testcase { /** * Set up diff --git a/course/tests/event/events_test.php b/course/tests/event/events_test.php index 49dd6ebc038..75df7e4cf73 100644 --- a/course/tests/event/events_test.php +++ b/course/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace core_course\event; * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up diff --git a/course/tests/exporters_content_item_test.php b/course/tests/exporters_content_item_test.php index 1c957c7016d..b1febe75433 100644 --- a/course/tests/exporters_content_item_test.php +++ b/course/tests/exporters_content_item_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_content_item_test extends \advanced_testcase { +final class exporters_content_item_test extends \advanced_testcase { /** * Test confirming a content_item can be exported for a course. diff --git a/course/tests/exporters_content_items_test.php b/course/tests/exporters_content_items_test.php index 9e4b6db53be..62affbb92b5 100644 --- a/course/tests/exporters_content_items_test.php +++ b/course/tests/exporters_content_items_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_content_items_test extends \advanced_testcase { +final class exporters_content_items_test extends \advanced_testcase { /** * Test confirming the collection of content_items can be exported for a course. diff --git a/course/tests/management_helper_test.php b/course/tests/management_helper_test.php index 66cd892a125..a96dcd21e6f 100644 --- a/course/tests/management_helper_test.php +++ b/course/tests/management_helper_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/course/tests/fixtures/course_capability_assignment. * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class management_helper_test extends \advanced_testcase { +final class management_helper_test extends \advanced_testcase { /** Category management capability: moodle/category:manage */ const CATEGORY_MANAGE = 'moodle/category:manage'; diff --git a/course/tests/modlib_test.php b/course/tests/modlib_test.php index 112bdd93508..56ebf861462 100644 --- a/course/tests/modlib_test.php +++ b/course/tests/modlib_test.php @@ -16,12 +16,6 @@ namespace core_course; -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->dirroot . '/course/lib.php'); -require_once($CFG->dirroot . '/course/modlib.php'); - /** * Module lib related unit tests * @@ -30,7 +24,16 @@ require_once($CFG->dirroot . '/course/modlib.php'); * @copyright 2016 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class modlib_test extends \advanced_testcase { +final class modlib_test extends \advanced_testcase { + /** + * Setup to ensure that fixtures are loaded. + */ + public static function setUpBeforeClass(): void { + global $CFG; + require_once($CFG->dirroot . '/course/lib.php'); + require_once($CFG->dirroot . '/course/modlib.php'); + parent::setUpBeforeClass(); + } /** * Test prepare_new_moduleinfo_data diff --git a/course/tests/privacy/provider_test.php b/course/tests/privacy/provider_test.php index 872bd12d986..b4ace8d2739 100644 --- a/course/tests/privacy/provider_test.php +++ b/course/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\transform; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { use \completion_creation; diff --git a/course/tests/reportbuilder/datasource/courses_test.php b/course/tests/reportbuilder/datasource/courses_test.php index 07adbcbd22a..07aeea4e3f7 100644 --- a/course/tests/reportbuilder/datasource/courses_test.php +++ b/course/tests/reportbuilder/datasource/courses_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courses_test extends core_reportbuilder_testcase { +final class courses_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/course/tests/search/search_test.php b/course/tests/search/search_test.php index 9e72b197331..07387dd669f 100644 --- a/course/tests/search/search_test.php +++ b/course/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/course/tests/services_content_item_service_test.php b/course/tests/services_content_item_service_test.php index edccbd4d66b..9971b490f4a 100644 --- a/course/tests/services_content_item_service_test.php +++ b/course/tests/services_content_item_service_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class services_content_item_service_test extends \advanced_testcase { +final class services_content_item_service_test extends \advanced_testcase { /** * Test confirming that content items are returned by the service. diff --git a/course/tests/targets_test.php b/course/tests/targets_test.php index d9ced154164..2ef9a5345ac 100644 --- a/course/tests/targets_test.php +++ b/course/tests/targets_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/lib/grade/constants.php'); * @copyright 2019 Victor Deniz * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class targets_test extends \advanced_testcase { +final class targets_test extends \advanced_testcase { /** * Provides course params for the {@link self::test_core_target_course_completion_analysable()} method. diff --git a/course/tests/task/content_notification_task_test.php b/course/tests/task/content_notification_task_test.php index 96dcd4b82a8..648a21461b0 100644 --- a/course/tests/task/content_notification_task_test.php +++ b/course/tests/task/content_notification_task_test.php @@ -27,7 +27,7 @@ use context_user; * @copyright 2021 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_notification_task_test extends \advanced_testcase { +final class content_notification_task_test extends \advanced_testcase { /** * Test execution of task diff --git a/customfield/field/checkbox/tests/plugin_test.php b/customfield/field/checkbox/tests/plugin_test.php index 23be0555258..dd0d666330e 100644 --- a/customfield/field/checkbox/tests/plugin_test.php +++ b/customfield/field/checkbox/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var \stdClass[] */ private $courses = []; diff --git a/customfield/field/date/tests/plugin_test.php b/customfield/field/date/tests/plugin_test.php index 002b6b4d395..ea579b35aa7 100644 --- a/customfield/field/date/tests/plugin_test.php +++ b/customfield/field/date/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var stdClass[] */ private $courses = []; diff --git a/customfield/field/text/tests/plugin_test.php b/customfield/field/text/tests/plugin_test.php index 9898aee15af..9c3647b8fab 100644 --- a/customfield/field/text/tests/plugin_test.php +++ b/customfield/field/text/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var stdClass[] */ private $courses = []; diff --git a/customfield/field/textarea/tests/plugin_test.php b/customfield/field/textarea/tests/plugin_test.php index 884e230a945..e2d0dc2b83b 100644 --- a/customfield/field/textarea/tests/plugin_test.php +++ b/customfield/field/textarea/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var stdClass[] */ private $courses = []; diff --git a/customfield/tests/api_test.php b/customfield/tests/api_test.php index c3e4e2aa4b1..7fee797de80 100644 --- a/customfield/tests/api_test.php +++ b/customfield/tests/api_test.php @@ -24,7 +24,7 @@ namespace core_customfield; * @copyright 2018 Toni Barbera * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Get generator. diff --git a/customfield/tests/generator_test.php b/customfield/tests/generator_test.php index 20f17b078f7..56cbd34c2da 100644 --- a/customfield/tests/generator_test.php +++ b/customfield/tests/generator_test.php @@ -24,7 +24,7 @@ namespace core_customfield; * @copyright 2018 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Get generator diff --git a/customfield/tests/handler_test.php b/customfield/tests/handler_test.php index 40d3c8e8ffc..c377f31b231 100644 --- a/customfield/tests/handler_test.php +++ b/customfield/tests/handler_test.php @@ -30,7 +30,7 @@ use moodle_exception; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class handler_test extends advanced_testcase { +final class handler_test extends advanced_testcase { /** * Test retrieving handler for given component/area diff --git a/customfield/tests/privacy/provider_test.php b/customfield/tests/privacy/provider_test.php index 8ee9c414ada..439233dfebf 100644 --- a/customfield/tests/privacy/provider_test.php +++ b/customfield/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_customfield\privacy\provider; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Generate data. diff --git a/dataformat/excel/tests/writer_test.php b/dataformat/excel/tests/writer_test.php index ec9fce708ba..a46169c2113 100644 --- a/dataformat/excel/tests/writer_test.php +++ b/dataformat/excel/tests/writer_test.php @@ -25,7 +25,7 @@ use core\dataformat; * @copyright 2022 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class writer_test extends \advanced_testcase { +final class writer_test extends \advanced_testcase { /** * Test writing data whose content contains an image with pluginfile.php source diff --git a/dataformat/ods/tests/writer_test.php b/dataformat/ods/tests/writer_test.php index fe71ab0f50b..a6f760e90e0 100644 --- a/dataformat/ods/tests/writer_test.php +++ b/dataformat/ods/tests/writer_test.php @@ -25,7 +25,7 @@ use core\dataformat; * @copyright 2022 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class writer_test extends \advanced_testcase { +final class writer_test extends \advanced_testcase { /** * Test writing data whose content contains an image with pluginfile.php source diff --git a/dataformat/pdf/tests/writer_test.php b/dataformat/pdf/tests/writer_test.php index 7cb3aca466a..950da78b294 100644 --- a/dataformat/pdf/tests/writer_test.php +++ b/dataformat/pdf/tests/writer_test.php @@ -36,7 +36,7 @@ use moodle_url; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class writer_test extends \advanced_testcase { +final class writer_test extends \advanced_testcase { /** * Test writing data whose content contains an image with pluginfile.php source diff --git a/enrol/category/tests/plugin_test.php b/enrol/category/tests/plugin_test.php index aae6632f131..56377cc7bf0 100644 --- a/enrol/category/tests/plugin_test.php +++ b/enrol/category/tests/plugin_test.php @@ -24,7 +24,7 @@ namespace enrol_category; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/cohort/tests/lib_test.php b/enrol/cohort/tests/lib_test.php index 8620eac9a67..f8ff25cff4e 100644 --- a/enrol/cohort/tests/lib_test.php +++ b/enrol/cohort/tests/lib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/group/lib.php'); * @copyright 2015 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test that a new group with the name of the cohort is created. diff --git a/enrol/cohort/tests/privacy/provider_test.php b/enrol/cohort/tests/privacy/provider_test.php index a31f2a24984..8015763a457 100644 --- a/enrol/cohort/tests/privacy/provider_test.php +++ b/enrol/cohort/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use enrol_cohort\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/enrol/cohort/tests/sync_test.php b/enrol/cohort/tests/sync_test.php index 2064379a4fb..a983eaab92b 100644 --- a/enrol/cohort/tests/sync_test.php +++ b/enrol/cohort/tests/sync_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/group/lib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_test extends \advanced_testcase { +final class sync_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/database/tests/lib_test.php b/enrol/database/tests/lib_test.php index d9f1b439fab..e8792847fab 100644 --- a/enrol/database/tests/lib_test.php +++ b/enrol/database/tests/lib_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public static function tearDownAfterClass(): void { global $DB; diff --git a/enrol/database/tests/sync_test.php b/enrol/database/tests/sync_test.php index 061c29b8d71..a1df4dfc082 100644 --- a/enrol/database/tests/sync_test.php +++ b/enrol/database/tests/sync_test.php @@ -27,7 +27,7 @@ namespace enrol_database; * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_test extends \advanced_testcase { +final class sync_test extends \advanced_testcase { protected static $courses = array(); protected static $users = array(); protected static $roles = array(); diff --git a/enrol/fee/tests/payment/service_provider_test.php b/enrol/fee/tests/payment/service_provider_test.php index a59af4884e4..dbcba25cc39 100644 --- a/enrol/fee/tests/payment/service_provider_test.php +++ b/enrol/fee/tests/payment/service_provider_test.php @@ -30,7 +30,7 @@ namespace enrol_fee\payment; * * @coversDefaultClass \enrol_fee\payment\service_provider */ -class service_provider_test extends \advanced_testcase { +final class service_provider_test extends \advanced_testcase { /** * Test for service_provider::get_payable(). diff --git a/enrol/flatfile/tests/flatfile_test.php b/enrol/flatfile/tests/flatfile_test.php index 74bdd992761..f971f019de8 100644 --- a/enrol/flatfile/tests/flatfile_test.php +++ b/enrol/flatfile/tests/flatfile_test.php @@ -35,7 +35,7 @@ use enrol_flatfile\task\flatfile_sync_task; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class flatfile_test extends \advanced_testcase { +final class flatfile_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/flatfile/tests/privacy/provider_test.php b/enrol/flatfile/tests/privacy/provider_test.php index c574c37f43c..4c5ef64eb52 100644 --- a/enrol/flatfile/tests/privacy/provider_test.php +++ b/enrol/flatfile/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use enrol_flatfile\privacy\provider; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var \stdClass $user1 a test user.*/ protected $user1; diff --git a/enrol/guest/tests/external/external_test.php b/enrol/guest/tests/external/external_test.php index 360e4ebf0f7..38c0f12b036 100644 --- a/enrol/guest/tests/external/external_test.php +++ b/enrol/guest/tests/external/external_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test get_instance_info diff --git a/enrol/imsenterprise/tests/imsenterprise_test.php b/enrol/imsenterprise/tests/imsenterprise_test.php index e0056a89c4e..8d853c85890 100644 --- a/enrol/imsenterprise/tests/imsenterprise_test.php +++ b/enrol/imsenterprise/tests/imsenterprise_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/enrol/imsenterprise/lib.php'); * @copyright 2012 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class imsenterprise_test extends \advanced_testcase { +final class imsenterprise_test extends \advanced_testcase { /** * @var $imsplugin enrol_imsenterprise_plugin IMS plugin instance. diff --git a/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php b/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php index 4c41962822d..b9fff8ca6a8 100644 --- a/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php +++ b/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/enrol/imsenterprise/lib.php'); * * @covers \enrol_imsenterprise_plugin */ -class imsenterprise_unenrol_test extends \advanced_testcase { +final class imsenterprise_unenrol_test extends \advanced_testcase { /** * @var $imsplugin enrol_imsenterprise_plugin IMS plugin instance. diff --git a/enrol/ldap/tests/ldap_test.php b/enrol/ldap/tests/ldap_test.php index f83a2651eaf..139d8a35103 100644 --- a/enrol/ldap/tests/ldap_test.php +++ b/enrol/ldap/tests/ldap_test.php @@ -33,7 +33,7 @@ namespace enrol_ldap; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ldap_test extends \advanced_testcase { +final class ldap_test extends \advanced_testcase { /** * Data provider for enrol_ldap tests diff --git a/enrol/lti/tests/data_connector_test.php b/enrol/lti/tests/data_connector_test.php index d2e812fecd4..bb038e1762a 100644 --- a/enrol/lti/tests/data_connector_test.php +++ b/enrol/lti/tests/data_connector_test.php @@ -34,7 +34,7 @@ use IMSGlobal\LTI\ToolProvider\User; * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_connector_test extends \advanced_testcase { +final class data_connector_test extends \advanced_testcase { /** * Test set up. diff --git a/enrol/lti/tests/helper_test.php b/enrol/lti/tests/helper_test.php index 5675593dc38..018eb6b94ec 100644 --- a/enrol/lti/tests/helper_test.php +++ b/enrol/lti/tests/helper_test.php @@ -23,7 +23,7 @@ namespace enrol_lti; * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var \stdClass $user1 A user. diff --git a/enrol/lti/tests/lib_test.php b/enrol/lti/tests/lib_test.php index 9698d5e818b..11154525526 100644 --- a/enrol/lti/tests/lib_test.php +++ b/enrol/lti/tests/lib_test.php @@ -41,7 +41,7 @@ require_once(__DIR__ . '/local/ltiadvantage/lti_advantage_testcase.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \lti_advantage_testcase { +final class lib_test extends \lti_advantage_testcase { /** * Test set up. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php b/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php index e0d20fc4f22..7395491f6e7 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\ags_info */ -class ags_info_test extends \advanced_testcase { +final class ags_info_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php b/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php index 692093eadba..578be1dd540 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\application_registration */ -class application_registration_test extends \advanced_testcase { +final class application_registration_test extends \advanced_testcase { /** * Test the creation of an application_registration instance. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/context_test.php b/enrol/lti/tests/local/ltiadvantage/entity/context_test.php index 2d9195d67a8..72a0c1128f2 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/context_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/context_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\context */ -class context_test extends \advanced_testcase { +final class context_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php b/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php index f422ba694c2..1a367558812 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\deployment */ -class deployment_test extends \advanced_testcase { +final class deployment_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php b/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php index 5332207d9b4..2b1cf0882c1 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\repository\legacy_consumer_repository; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\migration_claim */ -class migration_claim_test extends \advanced_testcase { +final class migration_claim_test extends \advanced_testcase { /** * Setup run for each test case. */ diff --git a/enrol/lti/tests/local/ltiadvantage/entity/nrps_info_test.php b/enrol/lti/tests/local/ltiadvantage/entity/nrps_info_test.php index 642633b0a0d..6b49d49e602 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/nrps_info_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/nrps_info_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\nrps_info */ -class nrps_info_test extends \advanced_testcase { +final class nrps_info_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php b/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php index 8a36880864c..ae6fa00b924 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\resource_link */ -class resource_link_test extends \advanced_testcase { +final class resource_link_test extends \advanced_testcase { /** * Test creation of the object instances. * diff --git a/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php b/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php index b8aef36e239..218d8e6fbb4 100644 --- a/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php +++ b/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php @@ -30,7 +30,7 @@ use Packback\Lti1p3\LtiRegistration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\lib\issuer_database */ -class issuer_database_test extends \advanced_testcase { +final class issuer_database_test extends \advanced_testcase { /** * Test the Moodle implementation of the library database method test_find_registration_by_issuer(). diff --git a/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php b/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php index a1bf00ad92b..5c52ff24e5e 100644 --- a/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php +++ b/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\lib; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\lib\launch_cache_session */ -class launch_cache_session_test extends \advanced_testcase { +final class launch_cache_session_test extends \advanced_testcase { /** * Test that the session cache, and in particular distinct object instances, can cache and retrieve launch data. diff --git a/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php index efac42c6f9c..e9a8890794b 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\deployment; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\application_registration_repository */ -class application_registration_repository_test extends \advanced_testcase { +final class application_registration_repository_test extends \advanced_testcase { /** * Helper to generate a new application_registration object. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php index a8ea6867ce4..dbb4f08525e 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\application_registration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\context_repository */ -class context_repository_test extends \advanced_testcase { +final class context_repository_test extends \advanced_testcase { /** * Helper to create test context objects for use with the repository tests. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php index e6217b3d6f6..41ae5a39064 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\deployment; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\deployment_repository */ -class deployment_repository_test extends \advanced_testcase { +final class deployment_repository_test extends \advanced_testcase { /** * Helper to create test deployment objects for use with the repository tests. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php index 16f23fda3ed..824e7b13e24 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\legacy_consumer_repository */ -class legacy_consumer_repository_test extends \lti_advantage_testcase { +final class legacy_consumer_repository_test extends \lti_advantage_testcase { /** * Test the get_consumer_secrets repository method. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php index f862e6be6f1..aa0e48c1b78 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\helper; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\published_resource_repository */ -class published_resource_repository_test extends \advanced_testcase { +final class published_resource_repository_test extends \advanced_testcase { /** * Get a list of published resources for testing. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php index a9ff411f17c..9ae26ea09e6 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\application_registration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\resource_link_repository */ -class resource_link_repository_test extends \advanced_testcase { +final class resource_link_repository_test extends \advanced_testcase { /** * Helper to generate a new resource_link instance. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php index e1c5526b53b..9f81c329217 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\user_repository */ -class user_repository_test extends \advanced_testcase { +final class user_repository_test extends \advanced_testcase { /** * Helper to generate a new user instance. * diff --git a/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php index b55ddb64b8e..87a47b929bb 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\application_registration_service */ -class application_registration_service_test extends \lti_advantage_testcase { +final class application_registration_service_test extends \lti_advantage_testcase { /** * Helper to get an application_registration_service instance. * @return application_registration_service diff --git a/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php index 20ab51762a0..197acb43172 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\tool_deployment_service */ -class tool_deployment_service_test extends \lti_advantage_testcase { +final class tool_deployment_service_test extends \lti_advantage_testcase { /** * Return a pre-existing application_registration object for testing. * diff --git a/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php index 83c30460ef4..18f719f9099 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php @@ -38,7 +38,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\tool_launch_service */ -class tool_launch_service_test extends \lti_advantage_testcase { +final class tool_launch_service_test extends \lti_advantage_testcase { /** * Test the use case "A user launches a tool so they can view an external resource/activity". diff --git a/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php b/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php index 62b9a36396a..1d6d138e0c9 100644 --- a/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php +++ b/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\task\sync_grades */ -class sync_grades_test extends \lti_advantage_testcase { +final class sync_grades_test extends \lti_advantage_testcase { /** * Get a task which has a mocked ags instance injected, meaning no real calls will be made to the platform. * diff --git a/enrol/lti/tests/local/ltiadvantage/task/sync_members_test.php b/enrol/lti/tests/local/ltiadvantage/task/sync_members_test.php index 6f190201685..c2932821039 100644 --- a/enrol/lti/tests/local/ltiadvantage/task/sync_members_test.php +++ b/enrol/lti/tests/local/ltiadvantage/task/sync_members_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\task\sync_members */ -class sync_members_test extends \lti_advantage_testcase { +final class sync_members_test extends \lti_advantage_testcase { /** * Verify the user's profile picture has been set, which is useful to verify picture syncs. diff --git a/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php b/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php index 14c0c33ff0c..1ef57beafd6 100644 --- a/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php +++ b/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\utility; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\utility\message_helper */ -class message_helper_test extends \base_testcase { +final class message_helper_test extends \base_testcase { /** * Test the static helper is_instructor_launch. diff --git a/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php b/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php index 17506334c63..4b60336f9aa 100644 --- a/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php +++ b/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\viewobject; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\viewobject\published_resource */ -class published_resource_test extends \advanced_testcase { +final class published_resource_test extends \advanced_testcase { /** * Test creating a simple published_resource view object and fetching information about it. diff --git a/enrol/lti/tests/privacy/provider_test.php b/enrol/lti/tests/privacy/provider_test.php index 33f1fea7ee0..e38b3594540 100644 --- a/enrol/lti/tests/privacy/provider_test.php +++ b/enrol/lti/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * @var stdClass The user diff --git a/enrol/lti/tests/sync_members_test.php b/enrol/lti/tests/sync_members_test.php index fc086ef4f2f..a753bf92410 100644 --- a/enrol/lti/tests/sync_members_test.php +++ b/enrol/lti/tests/sync_members_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_members_test extends \advanced_testcase { +final class sync_members_test extends \advanced_testcase { /** @var dummy_sync_members_task $task */ protected $task; diff --git a/enrol/lti/tests/tool_provider_test.php b/enrol/lti/tests/tool_provider_test.php index 50073da97a2..ee5038c661c 100644 --- a/enrol/lti/tests/tool_provider_test.php +++ b/enrol/lti/tests/tool_provider_test.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_provider_test extends \advanced_testcase { +final class tool_provider_test extends \advanced_testcase { /** * @var \stdClass $tool The LTI tool. diff --git a/enrol/manual/tests/externallib_test.php b/enrol/manual/tests/externallib_test.php index 91b773d5004..eef5f368afb 100644 --- a/enrol/manual/tests/externallib_test.php +++ b/enrol/manual/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/enrol/manual/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.4 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_enrolled_users diff --git a/enrol/manual/tests/lib_test.php b/enrol/manual/tests/lib_test.php index 6ecb5aab20c..8b62e917c17 100644 --- a/enrol/manual/tests/lib_test.php +++ b/enrol/manual/tests/lib_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test enrol migration function used when uninstalling enrol plugins. */ diff --git a/enrol/meta/tests/external/add_instances_test.php b/enrol/meta/tests/external/add_instances_test.php index 16ce1643014..656476e12ff 100644 --- a/enrol/meta/tests/external/add_instances_test.php +++ b/enrol/meta/tests/external/add_instances_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2021 WKS KV Bildung * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class add_instances_test extends \externallib_advanced_testcase { +final class add_instances_test extends \externallib_advanced_testcase { /** * Test setup diff --git a/enrol/meta/tests/external/delete_instances_test.php b/enrol/meta/tests/external/delete_instances_test.php index 53c79dd74f6..7296eafe758 100644 --- a/enrol/meta/tests/external/delete_instances_test.php +++ b/enrol/meta/tests/external/delete_instances_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2021 WKS KV Bildung * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_instances_test extends \externallib_advanced_testcase { +final class delete_instances_test extends \externallib_advanced_testcase { /** * Test setup diff --git a/enrol/meta/tests/plugin_test.php b/enrol/meta/tests/plugin_test.php index 9c12c1ef210..38aa0239330 100644 --- a/enrol/meta/tests/plugin_test.php +++ b/enrol/meta/tests/plugin_test.php @@ -27,7 +27,7 @@ use enrol_meta_plugin; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/meta/tests/privacy/provider_test.php b/enrol/meta/tests/privacy/provider_test.php index 1a278df8a38..c92e0b0d922 100644 --- a/enrol/meta/tests/privacy/provider_test.php +++ b/enrol/meta/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use enrol_meta\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Enable enrol_meta plugin. diff --git a/enrol/paypal/tests/paypal_test.php b/enrol/paypal/tests/paypal_test.php index b576f06e49c..12524f24f59 100644 --- a/enrol/paypal/tests/paypal_test.php +++ b/enrol/paypal/tests/paypal_test.php @@ -24,7 +24,7 @@ namespace enrol_paypal; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class paypal_test extends \advanced_testcase { +final class paypal_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/paypal/tests/privacy/provider_test.php b/enrol/paypal/tests/privacy/provider_test.php index e2a17899e8d..4bcc398dc3c 100644 --- a/enrol/paypal/tests/privacy/provider_test.php +++ b/enrol/paypal/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass A user whose email address matches the business field in some of the PayPal transactions. */ protected $businessuser1; diff --git a/enrol/self/tests/externallib_test.php b/enrol/self/tests/externallib_test.php index 21c5d6ede26..8f5c9345152 100644 --- a/enrol/self/tests/externallib_test.php +++ b/enrol/self/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/enrol/self/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.6 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_instance_info diff --git a/enrol/self/tests/self_test.php b/enrol/self/tests/self_test.php index ea5f3d02596..808be30e869 100644 --- a/enrol/self/tests/self_test.php +++ b/enrol/self/tests/self_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/enrol/self/locallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_self_plugin */ -class self_test extends \advanced_testcase { +final class self_test extends \advanced_testcase { public function test_basics() { $this->assertTrue(enrol_is_enabled('self')); diff --git a/enrol/tests/course_enrolment_manager_test.php b/enrol/tests/course_enrolment_manager_test.php index f7e3ab28c5b..113257ba8b7 100644 --- a/enrol/tests/course_enrolment_manager_test.php +++ b/enrol/tests/course_enrolment_manager_test.php @@ -29,7 +29,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \course_enrolment_manager */ -class course_enrolment_manager_test extends \advanced_testcase { +final class course_enrolment_manager_test extends \advanced_testcase { /** * The course used in tests. * @var stdClass diff --git a/enrol/tests/enrollib_test.php b/enrol/tests/enrollib_test.php index e1f1b2cb4db..a4c08b763d9 100644 --- a/enrol/tests/enrollib_test.php +++ b/enrol/tests/enrollib_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class enrollib_test extends advanced_testcase { +final class enrollib_test extends advanced_testcase { public function test_enrol_get_all_users_courses() { global $DB, $CFG; diff --git a/enrol/tests/privacy/provider_test.php b/enrol/tests/privacy/provider_test.php index 6b3ffe46f59..8f3c48e96a1 100644 --- a/enrol/tests/privacy/provider_test.php +++ b/enrol/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Check that a course context is returned if there is any user data for this user. */ diff --git a/enrol/tests/role_external_test.php b/enrol/tests/role_external_test.php index 9ad70aa34ac..7e0f6b86d6f 100644 --- a/enrol/tests/role_external_test.php +++ b/enrol/tests/role_external_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/enrol/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.4 */ -class role_external_test extends \externallib_advanced_testcase { +final class role_external_test extends \externallib_advanced_testcase { /** * Tests set up diff --git a/favourites/tests/component_favourite_service_test.php b/favourites/tests/component_favourite_service_test.php index a6b3092a255..452b448adc8 100644 --- a/favourites/tests/component_favourite_service_test.php +++ b/favourites/tests/component_favourite_service_test.php @@ -26,7 +26,7 @@ use core_favourites\local\entity\favourite; * @copyright 2019 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class component_favourite_service_test extends \advanced_testcase { +final class component_favourite_service_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/favourites/tests/privacy/provider_test.php b/favourites/tests/privacy/provider_test.php index 6e8583b4e06..71a2c994087 100644 --- a/favourites/tests/privacy/provider_test.php +++ b/favourites/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\transform; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(true); diff --git a/favourites/tests/repository_test.php b/favourites/tests/repository_test.php index 1488096b4c9..a1c7235204b 100644 --- a/favourites/tests/repository_test.php +++ b/favourites/tests/repository_test.php @@ -27,7 +27,7 @@ use core_favourites\local\entity\favourite; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repository_test extends \advanced_testcase { +final class repository_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/favourites/tests/user_favourite_service_test.php b/favourites/tests/user_favourite_service_test.php index 580ba3b8910..cbbdaed5eb5 100644 --- a/favourites/tests/user_favourite_service_test.php +++ b/favourites/tests/user_favourite_service_test.php @@ -26,7 +26,7 @@ use core_favourites\local\entity\favourite; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_favourite_service_test extends \advanced_testcase { +final class user_favourite_service_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/files/converter/googledrive/tests/privacy/provider_test.php b/files/converter/googledrive/tests/privacy/provider_test.php index 664fdf87452..d6f5d1d3035 100644 --- a/files/converter/googledrive/tests/privacy/provider_test.php +++ b/files/converter/googledrive/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/files/converter/unoconv/tests/converter_test.php b/files/converter/unoconv/tests/converter_test.php index ecc0e7b1257..961281f75c8 100644 --- a/files/converter/unoconv/tests/converter_test.php +++ b/files/converter/unoconv/tests/converter_test.php @@ -23,7 +23,7 @@ namespace fileconverter_unoconv; * @copyright 2016 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converter_test extends \advanced_testcase { +final class converter_test extends \advanced_testcase { /** * Helper to skip tests which _require_ unoconv. diff --git a/files/tests/archive_writer_test.php b/files/tests/archive_writer_test.php index c6d98b3ace6..a46c47ca22a 100644 --- a/files/tests/archive_writer_test.php +++ b/files/tests/archive_writer_test.php @@ -28,7 +28,7 @@ use core_files\local\archive_writer\zip_writer; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_files\archive_writer */ -class archive_writer_test extends advanced_testcase { +final class archive_writer_test extends advanced_testcase { /** * Test get_file_writer(). diff --git a/files/tests/conversion_test.php b/files/tests/conversion_test.php index 1cacf28e0e2..bc535b04496 100644 --- a/files/tests/conversion_test.php +++ b/files/tests/conversion_test.php @@ -23,7 +23,7 @@ namespace core_files; * @copyright 2017 Andrew nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class conversion_test extends \advanced_testcase { +final class conversion_test extends \advanced_testcase { /** * Helper to create a stored file object with the given supplied content. diff --git a/files/tests/converter_test.php b/files/tests/converter_test.php index e73361e9caa..b52e391feff 100644 --- a/files/tests/converter_test.php +++ b/files/tests/converter_test.php @@ -36,7 +36,7 @@ use core_files\converter; * @copyright 2017 Andrew nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converter_test extends advanced_testcase { +final class converter_test extends advanced_testcase { /** * Get a testable mock of the abstract files_converter class. diff --git a/files/tests/externallib_test.php b/files/tests/externallib_test.php index 9b1c7928056..84151ac159e 100644 --- a/files/tests/externallib_test.php +++ b/files/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/files/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.6 */ -class externallib_test extends \advanced_testcase { +final class externallib_test extends \advanced_testcase { /* * Test core_files_external::upload(). diff --git a/files/tests/local/archive_writer/zip_writer_test.php b/files/tests/local/archive_writer/zip_writer_test.php index 195b975b872..a15fb16e83f 100644 --- a/files/tests/local/archive_writer/zip_writer_test.php +++ b/files/tests/local/archive_writer/zip_writer_test.php @@ -30,7 +30,7 @@ use ZipArchive; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_files\local\archive_writer\zip_writer */ -class zip_writer_test extends advanced_testcase { +final class zip_writer_test extends advanced_testcase { /** * Test add_file_from_filepath(). diff --git a/files/tests/privacy/provider_test.php b/files/tests/privacy/provider_test.php index 9b413fea53a..4dc826e4439 100644 --- a/files/tests/privacy/provider_test.php +++ b/files/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/filter/displayh5p/tests/upgradelib_test.php b/filter/displayh5p/tests/upgradelib_test.php index 91b43a7def0..6b81fa2cef4 100644 --- a/filter/displayh5p/tests/upgradelib_test.php +++ b/filter/displayh5p/tests/upgradelib_test.php @@ -30,7 +30,7 @@ require_once("$CFG->libdir/filterlib.php"); * @copyright 2019 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgradelib_test extends \advanced_testcase { +final class upgradelib_test extends \advanced_testcase { /** * test_filter_displayh5p_reorder diff --git a/filter/tex/tests/lib_test.php b/filter/tex/tests/lib_test.php index 23ada285752..e5bfe29cf37 100644 --- a/filter/tex/tests/lib_test.php +++ b/filter/tex/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/filter/tex/lib.php'); * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends advanced_testcase { +final class lib_test extends advanced_testcase { /** * Data provider for test_filter_tex_sanitize_formula. * diff --git a/grade/export/ods/tests/event/events_test.php b/grade/export/ods/tests/event/events_test.php index 87e2dbd66bb..ebf751746ee 100644 --- a/grade/export/ods/tests/event/events_test.php +++ b/grade/export/ods/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_ods\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/txt/tests/event/events_test.php b/grade/export/txt/tests/event/events_test.php index c3c222d90fc..f3db990bc10 100644 --- a/grade/export/txt/tests/event/events_test.php +++ b/grade/export/txt/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_txt\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/xls/tests/event/events_test.php b/grade/export/xls/tests/event/events_test.php index 75921b7195a..3db72a697d2 100644 --- a/grade/export/xls/tests/event/events_test.php +++ b/grade/export/xls/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_xls\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/xml/tests/event/events_test.php b/grade/export/xml/tests/event/events_test.php index d2b94bd04b9..d984a52cf09 100644 --- a/grade/export/xml/tests/event/events_test.php +++ b/grade/export/xml/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_xml\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/grading/form/guide/tests/generator_test.php b/grade/grading/form/guide/tests/generator_test.php index 950c98f5743..5868b9e01a0 100644 --- a/grade/grading/form/guide/tests/generator_test.php +++ b/grade/grading/form/guide/tests/generator_test.php @@ -37,7 +37,7 @@ use gradingform_guide_controller; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Test guide creation. diff --git a/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php index cb86d137668..2d3381c68e9 100644 --- a/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php +++ b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php @@ -33,11 +33,12 @@ use moodle_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class fetch_test extends advanced_testcase { - +final class fetch_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; require_once("{$CFG->libdir}/externallib.php"); + + parent::setUpBeforeClass(); } /** diff --git a/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php index 5d649941608..7db3d595e23 100644 --- a/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php +++ b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php @@ -33,11 +33,12 @@ use moodle_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends advanced_testcase { - +final class store_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; require_once("{$CFG->libdir}/externallib.php"); + + parent::setUpBeforeClass(); } /** diff --git a/grade/grading/form/guide/tests/guide_test.php b/grade/grading/form/guide/tests/guide_test.php index ff25d88c629..2d5a3cc0015 100644 --- a/grade/grading/form/guide/tests/guide_test.php +++ b/grade/grading/form/guide/tests/guide_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/grade/grading/form/guide/lib.php'); * @copyright 2015 Nikita Kalinin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class guide_test extends \advanced_testcase { +final class guide_test extends \advanced_testcase { /** * Unit test to get draft instance and create new instance. */ diff --git a/grade/grading/form/guide/tests/privacy/provider_test.php b/grade/grading/form/guide/tests/privacy/provider_test.php index 7348ba18adb..96f1ed7cf6b 100644 --- a/grade/grading/form/guide/tests/privacy/provider_test.php +++ b/grade/grading/form/guide/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use gradingform_guide\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Ensure that export_user_preferences returns no data if the user has no data. diff --git a/grade/grading/form/rubric/tests/generator_test.php b/grade/grading/form/rubric/tests/generator_test.php index 44b4f439a63..9bb820dadea 100644 --- a/grade/grading/form/rubric/tests/generator_test.php +++ b/grade/grading/form/rubric/tests/generator_test.php @@ -38,7 +38,7 @@ use gradingform_controller; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends advanced_testcase { +final class generator_test extends advanced_testcase { /** * Test rubric creation. diff --git a/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php index 68402617c40..4e463515a6e 100644 --- a/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php +++ b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php @@ -34,11 +34,12 @@ use moodle_exception; * @copyright 2019 Mathew May * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class fetch_test extends advanced_testcase { - +final class fetch_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; require_once("{$CFG->libdir}/externallib.php"); + + parent::setUpBeforeClass(); } /** diff --git a/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php index f911134b18e..9299bb24f22 100644 --- a/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php +++ b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php @@ -33,11 +33,12 @@ use moodle_exception; * @copyright 2019 Mathew May * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends advanced_testcase { - +final class store_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; require_once("{$CFG->libdir}/externallib.php"); + + parent::setUpBeforeClass(); } /** diff --git a/grade/grading/form/rubric/tests/privacy/provider_test.php b/grade/grading/form/rubric/tests/privacy/provider_test.php index be18d4391b8..cc26ba0c77c 100644 --- a/grade/grading/form/rubric/tests/privacy/provider_test.php +++ b/grade/grading/form/rubric/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use context_module; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test the export of rubric data. diff --git a/grade/grading/tests/generator_test.php b/grade/grading/tests/generator_test.php index 8b7eb5a5d36..cc740ce95bf 100644 --- a/grade/grading/tests/generator_test.php +++ b/grade/grading/tests/generator_test.php @@ -38,7 +38,7 @@ use gradingform_rubric_controller; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends advanced_testcase { +final class generator_test extends advanced_testcase { /** * Test gradingform controller creation. diff --git a/grade/grading/tests/grading_manager_test.php b/grade/grading/tests/grading_manager_test.php index e43c8b6af7a..0c4d9e4ccac 100644 --- a/grade/grading/tests/grading_manager_test.php +++ b/grade/grading/tests/grading_manager_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/grade/grading/lib.php'); // Include the code to t * @copyright 2011 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grading_manager_test extends \advanced_testcase { - public function test_basic_instantiation() { +final class grading_manager_test extends \advanced_testcase { + public function test_basic_instantiation(): void { $manager1 = get_grading_manager(); $fakecontext = (object)array( diff --git a/grade/grading/tests/privacy/legacy_polyfill_test.php b/grade/grading/tests/privacy/legacy_polyfill_test.php index 13190762037..3a90a06daef 100644 --- a/grade/grading/tests/privacy/legacy_polyfill_test.php +++ b/grade/grading/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_grading\privacy\legacy_polyfill works and that the static _export_gradingform_instance_data can be called. */ diff --git a/grade/grading/tests/privacy/provider_test.php b/grade/grading/tests/privacy/provider_test.php index 40823d75980..065d12f6eb7 100644 --- a/grade/grading/tests/privacy/provider_test.php +++ b/grade/grading/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_grading\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass User without data. */ protected $user0; diff --git a/grade/import/csv/tests/load_data_test.php b/grade/import/csv/tests/load_data_test.php index b4aa3543259..af21733abf1 100644 --- a/grade/import/csv/tests/load_data_test.php +++ b/grade/import/csv/tests/load_data_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/grade/tests/fixtures/lib.php'); * @copyright 2014 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class load_data_test extends \grade_base_testcase { +final class load_data_test extends \grade_base_testcase { /** @var string $oktext Text to be imported. This data should have no issues being imported. */ protected $oktext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total" diff --git a/grade/report/grader/tests/privacy/provider_test.php b/grade/report/grader/tests/privacy/provider_test.php index 84e0c99315d..e706924b79d 100644 --- a/grade/report/grader/tests/privacy/provider_test.php +++ b/grade/report/grader/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use gradereport_grader\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/grade/report/overview/tests/externallib_test.php b/grade/report/overview/tests/externallib_test.php index 72f5566e7e9..88af0d4df96 100644 --- a/grade/report/overview/tests/externallib_test.php +++ b/grade/report/overview/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/grade/report/singleview/tests/screen_test.php b/grade/report/singleview/tests/screen_test.php index 38de9ac63da..4bfbc6cfc3f 100644 --- a/grade/report/singleview/tests/screen_test.php +++ b/grade/report/singleview/tests/screen_test.php @@ -32,7 +32,7 @@ require_once($CFG->libdir . '/gradelib.php'); * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class screen_test extends \advanced_testcase { +final class screen_test extends \advanced_testcase { /** * Test load_users method. diff --git a/grade/report/user/tests/externallib_test.php b/grade/report/user/tests/externallib_test.php index d574b6d5ea3..d57af63824e 100644 --- a/grade/report/user/tests/externallib_test.php +++ b/grade/report/user/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Loads some data to be used by the different tests diff --git a/grade/report/user/tests/lib_test.php b/grade/report/user/tests/lib_test.php index c27caa4c02f..ac6a1dbe876 100644 --- a/grade/report/user/tests/lib_test.php +++ b/grade/report/user/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/grade/report/user/lib.php'); * @copyright 2015 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/grade/report/user/tests/privacy/provider_test.php b/grade/report/user/tests/privacy/provider_test.php index e8f45ed9f92..8dd5ee851cd 100644 --- a/grade/report/user/tests/privacy/provider_test.php +++ b/grade/report/user/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/grade/tests/component_gradeitem_test.php b/grade/tests/component_gradeitem_test.php index f8bc016288e..e04d4b2ea48 100644 --- a/grade/tests/component_gradeitem_test.php +++ b/grade/tests/component_gradeitem_test.php @@ -38,7 +38,7 @@ use mod_forum\local\entities\forum as forum_entity; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @coversDefaultClass \core_grades\component_gradeitem */ -class component_gradeitem_test extends advanced_testcase { +final class component_gradeitem_test extends advanced_testcase { /** * Test get_formatted_grade_for_user with points. diff --git a/grade/tests/component_gradeitems_test.php b/grade/tests/component_gradeitems_test.php index 764be060802..557b203b29f 100644 --- a/grade/tests/component_gradeitems_test.php +++ b/grade/tests/component_gradeitems_test.php @@ -39,7 +39,7 @@ namespace core_grades { * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - class component_gradeitems_test extends advanced_testcase { + final class component_gradeitems_test extends advanced_testcase { /** * Ensure that a component which does not implement the mapping class excepts. diff --git a/grade/tests/edittreelib_test.php b/grade/tests/edittreelib_test.php index 8b011755dd0..3f134a65dfa 100644 --- a/grade/tests/edittreelib_test.php +++ b/grade/tests/edittreelib_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot.'/grade/edit/tree/lib.php'); * @author Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class edittreelib_test extends \advanced_testcase { - public function test_format_number() { +final class edittreelib_test extends \advanced_testcase { + public function test_format_number(): void { $numinput = array(0, 1, 1.01, '1.010', 1.2345); $numoutput = array(0.0, 1.0, 1.01, 1.01, 1.2345); @@ -134,5 +134,3 @@ class edittreelib_test extends \advanced_testcase { $this->assertEquals(null, $gradeitem->scaleid); } } - - diff --git a/grade/tests/event/events_test.php b/grade/tests/event/events_test.php index b1136f70d2d..fcc62be128e 100644 --- a/grade/tests/event/events_test.php +++ b/grade/tests/event/events_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/grade/lib.php'); * @copyright 2017 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass the course used for testing */ private $course; diff --git a/grade/tests/export_test.php b/grade/tests/export_test.php index ea58a8538ab..5d84dfb5400 100644 --- a/grade/tests/export_test.php +++ b/grade/tests/export_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/grade/export/lib.php'); * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class export_test extends \advanced_testcase { +final class export_test extends \advanced_testcase { /** * Ensure that feedback is correct formatted. Test the default implementation of format_feedback diff --git a/grade/tests/external/create_gradecategories_test.php b/grade/tests/external/create_gradecategories_test.php index ef4295ce4e7..f48d9da0f78 100644 --- a/grade/tests/external/create_gradecategories_test.php +++ b/grade/tests/external/create_gradecategories_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.11 */ -class create_gradecategories_test extends \externallib_advanced_testcase { +final class create_gradecategories_test extends \externallib_advanced_testcase { /** * Test create_gradecategories. diff --git a/grade/tests/external/get_gradable_users_test.php b/grade/tests/external/get_gradable_users_test.php index 41841b3db5f..99f2ffd4b99 100644 --- a/grade/tests/external/get_gradable_users_test.php +++ b/grade/tests/external/get_gradable_users_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Ilya Tregubov * @covers \core_grades\external\get_gradable_users */ -class get_gradable_users_test extends \externallib_advanced_testcase { +final class get_gradable_users_test extends \externallib_advanced_testcase { /** * Test the behaviour of get_gradable_users. diff --git a/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php b/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php index 282d04b399a..4fd97bac01c 100644 --- a/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php +++ b/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php @@ -33,7 +33,7 @@ use moodle_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class fetch_test extends advanced_testcase { +final class fetch_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; diff --git a/grade/tests/grades/grader/gradingpanel/point/external/store_test.php b/grade/tests/grades/grader/gradingpanel/point/external/store_test.php index 09e2fd5e66e..2243ab5d9bd 100644 --- a/grade/tests/grades/grader/gradingpanel/point/external/store_test.php +++ b/grade/tests/grades/grader/gradingpanel/point/external/store_test.php @@ -35,7 +35,7 @@ use grade_item; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends advanced_testcase { +final class store_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; diff --git a/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php b/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php index a4bb51a82da..e142fb7b2df 100644 --- a/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php +++ b/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php @@ -33,7 +33,7 @@ use moodle_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class fetch_test extends advanced_testcase { +final class fetch_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; diff --git a/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php b/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php index 95ef0f18dec..ec46f9ac9f8 100644 --- a/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php +++ b/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php @@ -35,7 +35,7 @@ use grade_item; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends advanced_testcase { +final class store_test extends advanced_testcase { public static function setupBeforeClass(): void { global $CFG; diff --git a/grade/tests/importlib_test.php b/grade/tests/importlib_test.php index 83d6bd8915f..93ff8ed493e 100644 --- a/grade/tests/importlib_test.php +++ b/grade/tests/importlib_test.php @@ -26,7 +26,7 @@ use grade_item; * @copyright 2015 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class importlib_test extends \advanced_testcase { +final class importlib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/grade/tests/lib_test.php b/grade/tests/lib_test.php index 6e647c33f20..b0acc104a3b 100644 --- a/grade/tests/lib_test.php +++ b/grade/tests/lib_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/grade/lib.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test can_output_item. diff --git a/grade/tests/output/general_action_bar_test.php b/grade/tests/output/general_action_bar_test.php index bfdabc4fd5e..24b7dce814c 100644 --- a/grade/tests/output/general_action_bar_test.php +++ b/grade/tests/output/general_action_bar_test.php @@ -28,7 +28,7 @@ use moodle_url; * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class general_action_bar_test extends advanced_testcase { +final class general_action_bar_test extends advanced_testcase { /** * Load required test libraries diff --git a/grade/tests/privacy/provider_test.php b/grade/tests/privacy/provider_test.php index 58990e2c20e..672bd5f94eb 100644 --- a/grade/tests/privacy/provider_test.php +++ b/grade/tests/privacy/provider_test.php @@ -45,7 +45,7 @@ require_once($CFG->libdir . '/gradelib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/grade/tests/querylib_test.php b/grade/tests/querylib_test.php index 28b36a32ce7..1a4cd233212 100644 --- a/grade/tests/querylib_test.php +++ b/grade/tests/querylib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/grade/querylib.php'); * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class querylib_test extends \advanced_testcase { +final class querylib_test extends \advanced_testcase { public function test_grade_get_gradable_activities() { $this->resetAfterTest(true); diff --git a/grade/tests/report_graderlib_test.php b/grade/tests/report_graderlib_test.php index ab718155d83..339ba0e2b1d 100644 --- a/grade/tests/report_graderlib_test.php +++ b/grade/tests/report_graderlib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/grade/report/grader/lib.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class report_graderlib_test extends \advanced_testcase { +final class report_graderlib_test extends \advanced_testcase { /** * Tests grade_report_grader::process_data() diff --git a/grade/tests/reportlib_test.php b/grade/tests/reportlib_test.php index c94216b980c..bce7cad0e2e 100644 --- a/grade/tests/reportlib_test.php +++ b/grade/tests/reportlib_test.php @@ -61,7 +61,7 @@ class grade_report_mock extends grade_report { /** * Tests grade_report, the parent class for all grade reports. */ -class reportlib_test extends advanced_testcase { +final class reportlib_test extends advanced_testcase { /** * Tests grade_report::blank_hidden_total_and_adjust_bounds() diff --git a/grade/tests/reportuserlib_test.php b/grade/tests/reportuserlib_test.php index 19f270065a8..28c50f45805 100644 --- a/grade/tests/reportuserlib_test.php +++ b/grade/tests/reportuserlib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/grade/report/user/lib.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class reportuserlib_test extends \advanced_testcase { +final class reportuserlib_test extends \advanced_testcase { /** * Tests grade_report_user::inject_rowspans() diff --git a/group/tests/externallib_test.php b/group/tests/externallib_test.php index 76ae85aaa31..098d1b85eef 100644 --- a/group/tests/externallib_test.php +++ b/group/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/group/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.4 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test create_groups diff --git a/group/tests/lib_test.php b/group/tests/lib_test.php index baaa2944c39..b075f4305f1 100644 --- a/group/tests/lib_test.php +++ b/group/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/group/lib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_member_added_event() { $this->resetAfterTest(); diff --git a/group/tests/privacy/provider_test.php b/group/tests/privacy/provider_test.php index af30c2ec835..4c5da70a53f 100644 --- a/group/tests/privacy/provider_test.php +++ b/group/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test for provider::get_metadata(). diff --git a/group/tests/reportbuilder/datasource/groups_test.php b/group/tests/reportbuilder/datasource/groups_test.php index 963ed25803f..83a0068079b 100644 --- a/group/tests/reportbuilder/datasource/groups_test.php +++ b/group/tests/reportbuilder/datasource/groups_test.php @@ -35,7 +35,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class groups_test extends core_reportbuilder_testcase { +final class groups_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/h5p/tests/api_test.php b/h5p/tests/api_test.php index 5e67daf844b..478619ab69e 100644 --- a/h5p/tests/api_test.php +++ b/h5p/tests/api_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_h5p\api */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test the behaviour of delete_library(). diff --git a/h5p/tests/editor_ajax_test.php b/h5p/tests/editor_ajax_test.php index 318f2478b42..45e3d690254 100644 --- a/h5p/tests/editor_ajax_test.php +++ b/h5p/tests/editor_ajax_test.php @@ -38,7 +38,7 @@ use Moodle\H5PCore; * * @runTestsInSeparateProcesses */ -class editor_ajax_test extends \advanced_testcase { +final class editor_ajax_test extends \advanced_testcase { /** @var editor_ajax H5P editor ajax instance */ protected $editorajax; diff --git a/h5p/tests/editor_framework_test.php b/h5p/tests/editor_framework_test.php index db142e1fc4c..988d16b378d 100644 --- a/h5p/tests/editor_framework_test.php +++ b/h5p/tests/editor_framework_test.php @@ -37,7 +37,7 @@ use core_h5p\local\library\autoloader; * * @runTestsInSeparateProcesses */ -class editor_framework_test extends \advanced_testcase { +final class editor_framework_test extends \advanced_testcase { /** @var editor_framework H5P editor_framework instance */ protected $editorframework; diff --git a/h5p/tests/editor_test.php b/h5p/tests/editor_test.php index 74fe952b91f..3f80bf38bf2 100644 --- a/h5p/tests/editor_test.php +++ b/h5p/tests/editor_test.php @@ -43,7 +43,7 @@ use Moodle\H5PCore; * * @runTestsInSeparateProcesses */ -class editor_test extends advanced_testcase { +final class editor_test extends advanced_testcase { /** * Form object to be used in test case. diff --git a/h5p/tests/event/deleted_test.php b/h5p/tests/event/deleted_test.php index ebd171b041d..2bd151e2900 100644 --- a/h5p/tests/event/deleted_test.php +++ b/h5p/tests/event/deleted_test.php @@ -27,7 +27,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class deleted_test extends \advanced_testcase { +final class deleted_test extends \advanced_testcase { /** * Setup test. diff --git a/h5p/tests/event/moved_test.php b/h5p/tests/event/moved_test.php index 8a3b8f166b0..0754ebfe16d 100644 --- a/h5p/tests/event/moved_test.php +++ b/h5p/tests/event/moved_test.php @@ -27,7 +27,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class moved_test extends \advanced_testcase { +final class moved_test extends \advanced_testcase { /** * Setup test. diff --git a/h5p/tests/external/external_test.php b/h5p/tests/external/external_test.php index dc4c1e9d130..9aa6b532c98 100644 --- a/h5p/tests/external/external_test.php +++ b/h5p/tests/external/external_test.php @@ -48,7 +48,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { protected function setUp(): void { parent::setUp(); diff --git a/h5p/tests/file_storage_test.php b/h5p/tests/file_storage_test.php index 40c16134ff3..2ceb1c94feb 100644 --- a/h5p/tests/file_storage_test.php +++ b/h5p/tests/file_storage_test.php @@ -34,7 +34,7 @@ use zip_archive; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @runTestsInSeparateProcesses */ -class file_storage_test extends \advanced_testcase { +final class file_storage_test extends \advanced_testcase { /** @var \core_h5p\file_storage H5P file storage instance */ protected $h5p_file_storage; diff --git a/h5p/tests/framework_test.php b/h5p/tests/framework_test.php index 9f0c04a5662..5c034e74eeb 100644 --- a/h5p/tests/framework_test.php +++ b/h5p/tests/framework_test.php @@ -33,7 +33,7 @@ use Moodle\H5PDisplayOptionBehaviour; * @covers \core_h5p\framework * @runTestsInSeparateProcesses */ -class framework_test extends \advanced_testcase { +final class framework_test extends \advanced_testcase { /** @var \core_h5p\framework */ private $framework; diff --git a/h5p/tests/generator_test.php b/h5p/tests/generator_test.php index 911cb812b87..e9cc7fce6bc 100644 --- a/h5p/tests/generator_test.php +++ b/h5p/tests/generator_test.php @@ -27,7 +27,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @runTestsInSeparateProcesses */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Tests set up. diff --git a/h5p/tests/h5p_core_test.php b/h5p/tests/h5p_core_test.php index 55cf3e5c699..6a5fb459b1f 100644 --- a/h5p/tests/h5p_core_test.php +++ b/h5p/tests/h5p_core_test.php @@ -31,7 +31,7 @@ use invalid_response_exception; * * @runTestsInSeparateProcesses */ -class h5p_core_test extends \advanced_testcase { +final class h5p_core_test extends \advanced_testcase { protected function setUp(): void { global $CFG; diff --git a/h5p/tests/helper_test.php b/h5p/tests/helper_test.php index b20c462ceac..331aa7f8ec3 100644 --- a/h5p/tests/helper_test.php +++ b/h5p/tests/helper_test.php @@ -29,7 +29,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_h5p\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Register the H5P autoloader diff --git a/h5p/tests/local/library/handler_test.php b/h5p/tests/local/library/handler_test.php index 3298b1185d6..93bd7fda4dd 100644 --- a/h5p/tests/local/library/handler_test.php +++ b/h5p/tests/local/library/handler_test.php @@ -34,7 +34,7 @@ use advanced_testcase; * @copyright 2020 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class handler_test extends advanced_testcase { +final class handler_test extends advanced_testcase { /** * Test the behaviour of get_h5p_string(). diff --git a/iplookup/tests/geoplugin_test.php b/iplookup/tests/geoplugin_test.php index 08167e34497..9346dcee42c 100644 --- a/iplookup/tests/geoplugin_test.php +++ b/iplookup/tests/geoplugin_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class geoplugin_test extends \advanced_testcase { +final class geoplugin_test extends \advanced_testcase { /** * Load required test libraries diff --git a/lib/antivirus/clamav/tests/scanner_test.php b/lib/antivirus/clamav/tests/scanner_test.php index a2dcb20e298..7aa9e61a8e3 100644 --- a/lib/antivirus/clamav/tests/scanner_test.php +++ b/lib/antivirus/clamav/tests/scanner_test.php @@ -24,7 +24,7 @@ namespace antivirus_clamav; * @copyright 2016 Ruslan Kabalin, Lancaster University. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scanner_test extends \advanced_testcase { +final class scanner_test extends \advanced_testcase { /** @var string temporary file used in testing */ protected $tempfile; diff --git a/lib/ddl/tests/ddl_test.php b/lib/ddl/tests/ddl_test.php index 7e552f6edd2..16bd4028a64 100644 --- a/lib/ddl/tests/ddl_test.php +++ b/lib/ddl/tests/ddl_test.php @@ -33,7 +33,7 @@ use xmldb_table; * @copyright 2008 Nicolas Connault * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ddl_test extends \database_driver_testcase { +final class ddl_test extends \database_driver_testcase { /** @var xmldb_table[] keys are table name. Created in setUp. */ private $tables = array(); /** @var array table name => array of stdClass test records loaded into that table. Created in setUp. */ diff --git a/lib/dml/tests/dml_pgsql_read_slave_test.php b/lib/dml/tests/dml_pgsql_read_slave_test.php index 2388b65a904..51a62b22ecf 100644 --- a/lib/dml/tests/dml_pgsql_read_slave_test.php +++ b/lib/dml/tests/dml_pgsql_read_slave_test.php @@ -41,7 +41,7 @@ require_once(__DIR__.'/fixtures/read_slave_moodle_database_mock_pgsql.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \pgsql_native_moodle_database */ -class dml_pgsql_read_slave_test extends \advanced_testcase { +final class dml_pgsql_read_slave_test extends \advanced_testcase { /** * Test correct database handles are used for cursors * diff --git a/lib/dml/tests/dml_table_test.php b/lib/dml/tests/dml_table_test.php index 2fe8a45de2c..29d44147222 100644 --- a/lib/dml/tests/dml_table_test.php +++ b/lib/dml/tests/dml_table_test.php @@ -28,7 +28,7 @@ use xmldb_table; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\dml\table */ -class dml_table_test extends \database_driver_testcase { +final class dml_table_test extends \database_driver_testcase { /** * Data provider for various \core\dml\table method tests. diff --git a/lib/dml/tests/dml_test.php b/lib/dml/tests/dml_test.php index 41816f671e6..839cd9744d9 100644 --- a/lib/dml/tests/dml_test.php +++ b/lib/dml/tests/dml_test.php @@ -44,7 +44,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \moodle_database */ -class dml_test extends \database_driver_testcase { +final class dml_test extends \database_driver_testcase { protected function setUp(): void { parent::setUp(); diff --git a/lib/dml/tests/pgsql_native_moodle_database_test.php b/lib/dml/tests/pgsql_native_moodle_database_test.php index 2129abf26c3..a2cad3a1826 100644 --- a/lib/dml/tests/pgsql_native_moodle_database_test.php +++ b/lib/dml/tests/pgsql_native_moodle_database_test.php @@ -32,8 +32,7 @@ * @copyright 2020 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class pgsql_native_moodle_database_test extends advanced_testcase { - +final class pgsql_native_moodle_database_test extends \advanced_testcase { /** * Setup before class. */ diff --git a/lib/dml/tests/pgsql_native_recordset_test.php b/lib/dml/tests/pgsql_native_recordset_test.php index bee1b5160af..9c5e58c201d 100644 --- a/lib/dml/tests/pgsql_native_recordset_test.php +++ b/lib/dml/tests/pgsql_native_recordset_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot.'/lib/dml/pgsql_native_moodle_database.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class pgsql_native_recordset_test extends basic_testcase { +final class pgsql_native_recordset_test extends basic_testcase { /** @var pgsql_native_moodle_database Special database connection */ protected $specialdb; diff --git a/lib/dml/tests/recordset_walk_test.php b/lib/dml/tests/recordset_walk_test.php index 79a452de7bb..9c6f42c6bfa 100644 --- a/lib/dml/tests/recordset_walk_test.php +++ b/lib/dml/tests/recordset_walk_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2015 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class recordset_walk_test extends \advanced_testcase { +final class recordset_walk_test extends \advanced_testcase { public function setUp(): void { parent::setUp(); diff --git a/lib/editor/atto/tests/privacy/provider_test.php b/lib/editor/atto/tests/privacy/provider_test.php index 258d0385f3f..7e10330d1a7 100644 --- a/lib/editor/atto/tests/privacy/provider_test.php +++ b/lib/editor/atto/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * One test to check fetch and export of all drafts. */ diff --git a/lib/editor/tests/privacy/provider_test.php b/lib/editor/tests/privacy/provider_test.php index 79fb31da8b9..7c03637c69f 100644 --- a/lib/editor/tests/privacy/provider_test.php +++ b/lib/editor/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. diff --git a/lib/external/tests/external_externallib_test.php b/lib/external/tests/external_externallib_test.php index 2eae46adca7..98588c9f170 100644 --- a/lib/external/tests/external_externallib_test.php +++ b/lib/external/tests/external_externallib_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2012 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_externallib_test extends externallib_advanced_testcase { +final class external_externallib_test extends externallib_advanced_testcase { /** * Test get_string diff --git a/lib/filebrowser/tests/file_browser_test.php b/lib/filebrowser/tests/file_browser_test.php index 48a768fc058..d14fcf3ff3e 100644 --- a/lib/filebrowser/tests/file_browser_test.php +++ b/lib/filebrowser/tests/file_browser_test.php @@ -28,7 +28,7 @@ use file_info_stored; * @copyright 2017 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class file_browser_test extends \advanced_testcase { +final class file_browser_test extends \advanced_testcase { /** @var int */ protected $initialnonempty; diff --git a/lib/filestorage/tests/file_storage_test.php b/lib/filestorage/tests/file_storage_test.php index e868b49ad31..eb700de0ec7 100644 --- a/lib/filestorage/tests/file_storage_test.php +++ b/lib/filestorage/tests/file_storage_test.php @@ -47,7 +47,7 @@ require_once($CFG->libdir . '/filestorage/stored_file.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \file_storage */ -class file_storage_test extends \advanced_testcase { +final class file_storage_test extends \advanced_testcase { /** * Files can be created from strings. diff --git a/lib/filestorage/tests/file_system_filedir_test.php b/lib/filestorage/tests/file_system_filedir_test.php index 1155726321b..1343f583291 100644 --- a/lib/filestorage/tests/file_system_filedir_test.php +++ b/lib/filestorage/tests/file_system_filedir_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/filestorage/file_system_filedir.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \file_system_filedir */ -class file_system_filedir_test extends \advanced_testcase { +final class file_system_filedir_test extends \advanced_testcase { /** * Shared test setUp. diff --git a/lib/filestorage/tests/file_system_test.php b/lib/filestorage/tests/file_system_test.php index bb873d976da..61e2eee950e 100644 --- a/lib/filestorage/tests/file_system_test.php +++ b/lib/filestorage/tests/file_system_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir . '/filestorage/file_system.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \file_system */ -class file_system_test extends \advanced_testcase { +final class file_system_test extends \advanced_testcase { public function setUp(): void { get_file_storage(true); diff --git a/lib/filestorage/tests/mbz_packer_test.php b/lib/filestorage/tests/mbz_packer_test.php index 9b50f1793c4..8be340c763f 100644 --- a/lib/filestorage/tests/mbz_packer_test.php +++ b/lib/filestorage/tests/mbz_packer_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mbz_packer_test extends \advanced_testcase { +final class mbz_packer_test extends \advanced_testcase { public function test_archive_with_both_options() { global $CFG; diff --git a/lib/filestorage/tests/stored_file_test.php b/lib/filestorage/tests/stored_file_test.php index d21150bfa8f..330ed7f67f6 100644 --- a/lib/filestorage/tests/stored_file_test.php +++ b/lib/filestorage/tests/stored_file_test.php @@ -28,7 +28,7 @@ use context_system; * @copyright 2022 Mikhail Golenkov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stored_file_test extends advanced_testcase { +final class stored_file_test extends advanced_testcase { /** * Test that the rotate_image() method does not rotate diff --git a/lib/filestorage/tests/tgz_packer_test.php b/lib/filestorage/tests/tgz_packer_test.php index 22ca0f1505b..5271b159957 100644 --- a/lib/filestorage/tests/tgz_packer_test.php +++ b/lib/filestorage/tests/tgz_packer_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tgz_packer_test extends \advanced_testcase implements file_progress { +final class tgz_packer_test extends \advanced_testcase implements file_progress { /** * @var array Progress information passed to the progress reporter */ diff --git a/lib/filestorage/tests/zip_packer_test.php b/lib/filestorage/tests/zip_packer_test.php index 1060fb0003c..3a557d687a4 100644 --- a/lib/filestorage/tests/zip_packer_test.php +++ b/lib/filestorage/tests/zip_packer_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2012 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class zip_packer_test extends \advanced_testcase implements file_progress { +final class zip_packer_test extends \advanced_testcase implements file_progress { protected $testfile; protected $files; diff --git a/lib/form/tests/autocomplete_test.php b/lib/form/tests/autocomplete_test.php index 40f3ea79714..d9d6185f643 100644 --- a/lib/form/tests/autocomplete_test.php +++ b/lib/form/tests/autocomplete_test.php @@ -32,7 +32,7 @@ require_once($CFG->libdir . '/form/autocomplete.php'); * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class autocomplete_test extends \basic_testcase { +final class autocomplete_test extends \basic_testcase { /** * Testcase for validation */ diff --git a/lib/form/tests/course_test.php b/lib/form/tests/course_test.php index dcd104a8669..d2fa3dc5f14 100644 --- a/lib/form/tests/course_test.php +++ b/lib/form/tests/course_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/form/course.php'); * @copyright 2020 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_test extends \basic_testcase { +final class course_test extends \basic_testcase { /** * Test constructor supports all declared attributes. diff --git a/lib/form/tests/dateselector_test.php b/lib/form/tests/dateselector_test.php index d5f751b0a13..a624f38ffcb 100644 --- a/lib/form/tests/dateselector_test.php +++ b/lib/form/tests/dateselector_test.php @@ -46,8 +46,8 @@ require_once($CFG->libdir.'/formslib.php'); * @copyright 2012 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dateselector_test extends \advanced_testcase { - /** @var MoodleQuickForm Keeps reference of dummy form object */ +final class dateselector_test extends \advanced_testcase { + /** @var \MoodleQuickForm Keeps reference of dummy form object */ private $mform; /** @var array test fixtures */ private $testvals; diff --git a/lib/form/tests/datetimeselector_test.php b/lib/form/tests/datetimeselector_test.php index 3dc55562d11..e1140ad5131 100644 --- a/lib/form/tests/datetimeselector_test.php +++ b/lib/form/tests/datetimeselector_test.php @@ -46,8 +46,8 @@ require_once($CFG->libdir.'/formslib.php'); * @copyright 2012 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datetimeselector_test extends \advanced_testcase { - /** @var MoodleQuickForm Keeps reference of dummy form object */ +final class datetimeselector_test extends \advanced_testcase { + /** @var \MoodleQuickForm Keeps reference of dummy form object */ private $mform; /** @var array test fixtures */ private $testvals; diff --git a/lib/form/tests/duration_test.php b/lib/form/tests/duration_test.php index 34901d4bf67..e48a6d7de14 100644 --- a/lib/form/tests/duration_test.php +++ b/lib/form/tests/duration_test.php @@ -45,7 +45,7 @@ require_once($CFG->libdir . '/form/duration.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class duration_test extends \basic_testcase { +final class duration_test extends \basic_testcase { /** * Get a form that can be used for testing. diff --git a/lib/form/tests/external_test.php b/lib/form/tests/external_test.php index 3631a8c890e..0100dabac5f 100644 --- a/lib/form/tests/external_test.php +++ b/lib/form/tests/external_test.php @@ -38,7 +38,7 @@ global $CFG; * @copyright 2017 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends advanced_testcase { +final class external_test extends advanced_testcase { /** * Test the core_form_get_filetypes_browser_data external function diff --git a/lib/form/tests/float_test.php b/lib/form/tests/float_test.php index 6f769dd032c..1b380fc43ed 100644 --- a/lib/form/tests/float_test.php +++ b/lib/form/tests/float_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/form/float.php'); * @copyright 2019 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class float_test extends \advanced_testcase { +final class float_test extends \advanced_testcase { /** * Define a local decimal separator. diff --git a/lib/grade/tests/grade_category_test.php b/lib/grade/tests/grade_category_test.php index 3644cc6ff66..838a201340f 100644 --- a/lib/grade/tests/grade_category_test.php +++ b/lib/grade/tests/grade_category_test.php @@ -29,7 +29,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_category_test extends \grade_base_testcase { +final class grade_category_test extends \grade_base_testcase { public function test_grade_category() { $this->sub_test_grade_category_construct(); diff --git a/lib/grade/tests/grade_grade_test.php b/lib/grade/tests/grade_grade_test.php index 65a301887c1..a7df746c73b 100644 --- a/lib/grade/tests/grade_grade_test.php +++ b/lib/grade/tests/grade_grade_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_grade_test extends \grade_base_testcase { +final class grade_grade_test extends \grade_base_testcase { public function test_grade_grade() { $this->sub_test_grade_grade_construct(); diff --git a/lib/grade/tests/grade_item_test.php b/lib/grade/tests/grade_item_test.php index 7ea4734aa4b..cfa4dc02b00 100644 --- a/lib/grade/tests/grade_item_test.php +++ b/lib/grade/tests/grade_item_test.php @@ -28,8 +28,8 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_item_test extends \grade_base_testcase { - public function test_grade_item() { +final class grade_item_test extends \grade_base_testcase { + public function test_grade_item(): void { $this->sub_test_grade_item_construct(); $this->sub_test_grade_item_insert(); $this->sub_test_grade_item_delete(); diff --git a/lib/grade/tests/grade_object_test.php b/lib/grade/tests/grade_object_test.php index 4ad43e1c814..1571365a1d8 100644 --- a/lib/grade/tests/grade_object_test.php +++ b/lib/grade/tests/grade_object_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/lib.php'); * @copyright 2014 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_object_test extends \grade_base_testcase { +final class grade_object_test extends \grade_base_testcase { public function test_fetch_all_helper() { // Simple ID lookup. diff --git a/lib/grade/tests/grade_outcome_test.php b/lib/grade/tests/grade_outcome_test.php index 5e164346ad7..b6c327d7e47 100644 --- a/lib/grade/tests/grade_outcome_test.php +++ b/lib/grade/tests/grade_outcome_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_outcome_test extends \grade_base_testcase { +final class grade_outcome_test extends \grade_base_testcase { public function test_grade_outcome() { $this->sub_test_grade_outcome_construct(); diff --git a/lib/grade/tests/grade_scale_test.php b/lib/grade/tests/grade_scale_test.php index 7af18c7a7e0..d291d0ad016 100644 --- a/lib/grade/tests/grade_scale_test.php +++ b/lib/grade/tests/grade_scale_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_scale_test extends \grade_base_testcase { +final class grade_scale_test extends \grade_base_testcase { public function test_grade_scale() { $this->sub_test_scale_construct(); diff --git a/lib/phpunit/tests/advanced_test.php b/lib/phpunit/tests/advanced_test.php index 4b67b169bac..837a21bc428 100644 --- a/lib/phpunit/tests/advanced_test.php +++ b/lib/phpunit/tests/advanced_test.php @@ -25,7 +25,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \advanced_testcase */ -class advanced_test extends \advanced_testcase { +final class advanced_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; require_once(__DIR__ . '/fixtures/adhoc_test_task.php'); diff --git a/lib/phpunit/tests/basic_test.php b/lib/phpunit/tests/basic_test.php index 190807b17c6..839b1917d17 100644 --- a/lib/phpunit/tests/basic_test.php +++ b/lib/phpunit/tests/basic_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class basic_test extends \basic_testcase { +final class basic_test extends \basic_testcase { protected $testassertexecuted = false; protected function setUp(): void { diff --git a/lib/phpunit/tests/phpunit_dataset_test.php b/lib/phpunit/tests/phpunit_dataset_test.php index 4eb07e4acf1..9c8322c1cdf 100644 --- a/lib/phpunit/tests/phpunit_dataset_test.php +++ b/lib/phpunit/tests/phpunit_dataset_test.php @@ -36,7 +36,7 @@ use org\bovigo\vfs\vfsStream; * * @coversDefaultClass \phpunit_dataset */ -class phpunit_dataset_test extends advanced_testcase { +final class phpunit_dataset_test extends advanced_testcase { /** diff --git a/lib/phpunit/tests/util_test.php b/lib/phpunit/tests/util_test.php index 54c54462523..cb7398a5a73 100644 --- a/lib/phpunit/tests/util_test.php +++ b/lib/phpunit/tests/util_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2015 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class util_test extends \advanced_testcase { +final class util_test extends \advanced_testcase { /** * @dataProvider set_table_modified_by_sql_provider */ diff --git a/lib/table/tests/external/dynamic/get_test.php b/lib/table/tests/external/dynamic/get_test.php index be186e51e14..df87b7c4aa5 100644 --- a/lib/table/tests/external/dynamic/get_test.php +++ b/lib/table/tests/external/dynamic/get_test.php @@ -38,14 +38,15 @@ use advanced_testcase; * @copyright 2020 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_test extends advanced_testcase { - +final class get_test extends advanced_testcase { /** * Setup before class. */ public static function setUpBeforeClass(): void { global $CFG; require_once("{$CFG->libdir}/externallib.php"); + + parent::setUpBeforeClass(); } /** diff --git a/lib/table/tests/local/filter/filter_test.php b/lib/table/tests/local/filter/filter_test.php index 0f93aada468..d091205a7ff 100644 --- a/lib/table/tests/local/filter/filter_test.php +++ b/lib/table/tests/local/filter/filter_test.php @@ -30,7 +30,7 @@ use InvalidArgumentException; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_table\local\filter\filter */ -class filter_test extends advanced_testcase { +final class filter_test extends advanced_testcase { /** * Test that the constructor correctly handles a number of conditions. * diff --git a/lib/table/tests/local/filter/filterset_test.php b/lib/table/tests/local/filter/filterset_test.php index bc58d067ce3..b0be93c7727 100644 --- a/lib/table/tests/local/filter/filterset_test.php +++ b/lib/table/tests/local/filter/filterset_test.php @@ -40,7 +40,7 @@ use moodle_exception; * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filterset_test extends advanced_testcase { +final class filterset_test extends advanced_testcase { /** * Ensure that it is possibly to set the join type. */ diff --git a/lib/table/tests/local/filter/integer_filter_test.php b/lib/table/tests/local/filter/integer_filter_test.php index a42f873a725..827b423d1c1 100644 --- a/lib/table/tests/local/filter/integer_filter_test.php +++ b/lib/table/tests/local/filter/integer_filter_test.php @@ -38,7 +38,7 @@ use TypeError; * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class integer_filter_test extends advanced_testcase { +final class integer_filter_test extends advanced_testcase { /** * Ensure that the add_filter_value function works as expected with valid values. */ diff --git a/lib/table/tests/local/filter/numeric_comparison_filter_test.php b/lib/table/tests/local/filter/numeric_comparison_filter_test.php index 876bb5746ec..e47d9b20dff 100644 --- a/lib/table/tests/local/filter/numeric_comparison_filter_test.php +++ b/lib/table/tests/local/filter/numeric_comparison_filter_test.php @@ -39,7 +39,7 @@ use TypeError; * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class numeric_comparison_filter_test extends advanced_testcase { +final class numeric_comparison_filter_test extends advanced_testcase { /** * Ensure that the add_filter_value function works as expected with valid values. */ diff --git a/lib/table/tests/local/filter/string_filter_test.php b/lib/table/tests/local/filter/string_filter_test.php index ecc3e587084..77dc3dfa8d3 100644 --- a/lib/table/tests/local/filter/string_filter_test.php +++ b/lib/table/tests/local/filter/string_filter_test.php @@ -38,7 +38,7 @@ use TypeError; * @copyright 2020 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class string_filter_test extends advanced_testcase { +final class string_filter_test extends advanced_testcase { /** * Ensure that the add_filter_value function works as expected with valid values. */ diff --git a/lib/testing/tests/testing_generator_test.php b/lib/testing/tests/testing_generator_test.php index 0291121d49b..1be54309039 100644 --- a/lib/testing/tests/testing_generator_test.php +++ b/lib/testing/tests/testing_generator_test.php @@ -24,8 +24,8 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class testing_generator_test extends \advanced_testcase { - public function test_get_plugin_generator_good_case() { +final class testing_generator_test extends \advanced_testcase { + public function test_get_plugin_generator_good_case(): void { $generator = $this->getDataGenerator()->get_plugin_generator('core_question'); $this->assertInstanceOf('core_question_generator', $generator); } diff --git a/lib/testing/tests/util_test.php b/lib/testing/tests/util_test.php index 68f8b0f8a54..3edd95c1a4b 100644 --- a/lib/testing/tests/util_test.php +++ b/lib/testing/tests/util_test.php @@ -24,7 +24,7 @@ namespace core\testing; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class util_test extends \advanced_testcase { +final class util_test extends \advanced_testcase { /** * Note: This test is required for the other two parts because the first time * a table is written to it may not have had the initial value reset. diff --git a/lib/tests/accesslib_has_capability_test.php b/lib/tests/accesslib_has_capability_test.php index 92829f4733a..bd7b347b63e 100644 --- a/lib/tests/accesslib_has_capability_test.php +++ b/lib/tests/accesslib_has_capability_test.php @@ -30,7 +30,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers ::has_capability */ -class accesslib_has_capability_test extends \advanced_testcase { +final class accesslib_has_capability_test extends \advanced_testcase { /** * Unit tests to check the operation of locked contexts. diff --git a/lib/tests/accesslib_test.php b/lib/tests/accesslib_test.php index d07ae89f1b9..02bf3c1e806 100644 --- a/lib/tests/accesslib_test.php +++ b/lib/tests/accesslib_test.php @@ -30,7 +30,18 @@ defined('MOODLE_INTERNAL') || die(); * * Note: execution may take many minutes especially on slower servers. */ -class accesslib_test extends advanced_testcase { +final class accesslib_test extends advanced_testcase { + + /** + * Setup. + */ + protected function setUp(): void { + parent::setUp(); + $this->resetAfterTest(); + // Turn off the course welcome message, so we can easily test other messages. + set_config('sendcoursewelcomemessage', 0, 'enrol_manual'); + } + /** * Verify comparison of context instances in phpunit asserts. */ diff --git a/lib/tests/adminlib_test.php b/lib/tests/adminlib_test.php index aba43145b6d..a7866ab5201 100644 --- a/lib/tests/adminlib_test.php +++ b/lib/tests/adminlib_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir.'/adminlib.php'); * @copyright 2020 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class adminlib_test extends \advanced_testcase { +final class adminlib_test extends \advanced_testcase { /** * Data provider of serialized string. diff --git a/lib/tests/admintree_test.php b/lib/tests/admintree_test.php index 30110ace62e..557bcfb00b1 100644 --- a/lib/tests/admintree_test.php +++ b/lib/tests/admintree_test.php @@ -41,7 +41,7 @@ require_once($CFG->libdir.'/adminlib.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class admintree_test extends \advanced_testcase { +final class admintree_test extends \advanced_testcase { /** * Adding nodes into the admin tree. diff --git a/lib/tests/ajaxlib_test.php b/lib/tests/ajaxlib_test.php index cea813f01e9..296dca15083 100644 --- a/lib/tests/ajaxlib_test.php +++ b/lib/tests/ajaxlib_test.php @@ -26,7 +26,7 @@ namespace core; * @covers ::ajax_capture_output * @covers ::ajax_check_captured_output */ -class ajaxlib_test extends \advanced_testcase { +final class ajaxlib_test extends \advanced_testcase { /** @var string Original error log */ protected $oldlog; diff --git a/lib/tests/analysers_test.php b/lib/tests/analysers_test.php index 1e5c3e813a8..d88ffa25e75 100644 --- a/lib/tests/analysers_test.php +++ b/lib/tests/analysers_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../lib/enrollib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class analysers_test extends \advanced_testcase { +final class analysers_test extends \advanced_testcase { /** * test_courses_analyser diff --git a/lib/tests/analytics/indicators_test.php b/lib/tests/analytics/indicators_test.php index f2a11eb1e02..3782aba37b1 100644 --- a/lib/tests/analytics/indicators_test.php +++ b/lib/tests/analytics/indicators_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/../../../lib/enrollib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class indicators_test extends \advanced_testcase { +final class indicators_test extends \advanced_testcase { /** * Test all core indicators. diff --git a/lib/tests/antivirus_test.php b/lib/tests/antivirus_test.php index bc4703ea9cd..643f2beecf9 100644 --- a/lib/tests/antivirus_test.php +++ b/lib/tests/antivirus_test.php @@ -25,7 +25,7 @@ require_once(__DIR__ . '/fixtures/testable_antivirus.php'); * @copyright 2016 Ruslan Kabalin, Lancaster University. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class antivirus_test extends advanced_testcase { +final class antivirus_test extends advanced_testcase { /** * @var string Path to the tempfile created for use with AV scanner tests diff --git a/lib/tests/authlib_test.php b/lib/tests/authlib_test.php index a424243298f..e13e3dc60c1 100644 --- a/lib/tests/authlib_test.php +++ b/lib/tests/authlib_test.php @@ -25,8 +25,8 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class authlib_test extends \advanced_testcase { - public function test_lockout() { +final class authlib_test extends \advanced_testcase { + public function test_lockout(): void { global $CFG; require_once("$CFG->libdir/authlib.php"); diff --git a/lib/tests/behat_lib_test.php b/lib/tests/behat_lib_test.php index 9b9f47375c7..75e5eb9660b 100644 --- a/lib/tests/behat_lib_test.php +++ b/lib/tests/behat_lib_test.php @@ -31,7 +31,7 @@ * @copyright 2021 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behat_lib_test extends advanced_testcase { +final class behat_lib_test extends advanced_testcase { /** * Setup function diff --git a/lib/tests/blocklib_test.php b/lib/tests/blocklib_test.php index b46e471ad27..59b23c8ed5f 100644 --- a/lib/tests/blocklib_test.php +++ b/lib/tests/blocklib_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/fixtures/testable_block_manager.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blocklib_test extends \advanced_testcase { +final class blocklib_test extends \advanced_testcase { protected $testpage; protected $blockmanager; protected $isediting = null; diff --git a/lib/tests/check_test.php b/lib/tests/check_test.php index ab426cbd2df..4ed80f2e29d 100644 --- a/lib/tests/check_test.php +++ b/lib/tests/check_test.php @@ -27,7 +27,7 @@ use core\check\security\passwordpolicy; * @copyright 2020 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class check_test extends \advanced_testcase { +final class check_test extends \advanced_testcase { /** * A simple example showing how a check and result object works diff --git a/lib/tests/classes/courses_tasks_testcase.php b/lib/tests/classes/courses_tasks_testcase.php new file mode 100644 index 00000000000..10ee6357f92 --- /dev/null +++ b/lib/tests/classes/courses_tasks_testcase.php @@ -0,0 +1,79 @@ +. + +namespace core\tests; + +/** + * TODO describe file courses_tasks_testcase + * + * @package core + * @copyright 2024 Andrew Lyons + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +abstract class courses_tasks_testcase extends \advanced_testcase { + /** + * Data provider for test_show_started_courses. + * + * @return array + */ + public static function get_courses_provider(): array { + return [ + 'No hidden courses' => [ + 'lastweek' => 0, + 'yesterday' => 0, + 'tomorrow' => 0, + ], + 'No hidden courses (without visible courses)' => [ + 'lastweek' => 0, + 'yesterday' => 0, + 'tomorrow' => 0, + 'createvisible' => false, + ], + 'Hidden courses with last week or tomorrow dates' => [ + 'lastweek' => 2, + 'yesterday' => 0, + 'tomorrow' => 2, + ], + 'One hidden course of each type (last week, yesterday and tomorrow)' => [ + 'lastweek' => 1, + 'yesterday' => 1, + 'tomorrow' => 1, + ], + 'Different hidden courses of each type' => [ + 'lastweek' => 2, + 'yesterday' => 3, + 'tomorrow' => 4, + ], + 'A couple of hidden courses of each type (without visible courses)' => [ + 'lastweek' => 2, + 'yesterday' => 2, + 'tomorrow' => 2, + 'createvisible' => false, + ], + 'Only a few hidden courses for yesterday' => [ + 'lastweek' => 0, + 'yesterday' => 5, + 'tomorrow' => 0, + ], + 'Only a few hidden courses for yesterday (without visible courses)' => [ + 'lastweek' => 0, + 'yesterday' => 5, + 'tomorrow' => 0, + 'createvisible' => false, + ], + ]; + } +} diff --git a/lib/tests/client_test.php b/lib/tests/client_test.php index e2249c03144..8ff0e2995f3 100644 --- a/lib/tests/client_test.php +++ b/lib/tests/client_test.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @package core */ -class client_test extends advanced_testcase { +final class client_test extends advanced_testcase { /** * Uses the static dataset as feed-in * diff --git a/lib/tests/collator_test.php b/lib/tests/collator_test.php index 4fa5c5be1dd..d43970e90f9 100644 --- a/lib/tests/collator_test.php +++ b/lib/tests/collator_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2011 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class collator_test extends \advanced_testcase { +final class collator_test extends \advanced_testcase { /** * @var string The initial lang, stored because we change it during testing diff --git a/lib/tests/completionlib_test.php b/lib/tests/completionlib_test.php index 902f25572e6..35c9b86cc91 100644 --- a/lib/tests/completionlib_test.php +++ b/lib/tests/completionlib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir.'/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \completion_info */ -class completionlib_test extends advanced_testcase { +final class completionlib_test extends advanced_testcase { protected $course; protected $user; protected $module1; diff --git a/lib/tests/componentlib_test.php b/lib/tests/componentlib_test.php index 7e6ac394b86..335ebaacb71 100644 --- a/lib/tests/componentlib_test.php +++ b/lib/tests/componentlib_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir.'/componentlib.class.php'); * @copyright 2011 Tomasz Muras * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class componentlib_test extends \advanced_testcase { +final class componentlib_test extends \advanced_testcase { public function test_component_installer() { global $CFG; diff --git a/lib/tests/configonlylib_test.php b/lib/tests/configonlylib_test.php index 5a9151faaa4..1f1546489b1 100644 --- a/lib/tests/configonlylib_test.php +++ b/lib/tests/configonlylib_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/../configonlylib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class configonlylib_test extends \advanced_testcase { +final class configonlylib_test extends \advanced_testcase { /** * Test cleaning of invalid utf-8 entities. diff --git a/lib/tests/content/export/exportable_items/exportable_filearea_test.php b/lib/tests/content/export/exportable_items/exportable_filearea_test.php index 8ce062edfaf..ac61d8e8693 100644 --- a/lib/tests/content/export/exportable_items/exportable_filearea_test.php +++ b/lib/tests/content/export/exportable_items/exportable_filearea_test.php @@ -35,7 +35,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_filearea */ -class exportable_filearea_test extends advanced_testcase { +final class exportable_filearea_test extends advanced_testcase { /** * Ensure that the the exportable_filearea does not fetch files when none exist. diff --git a/lib/tests/content/export/exportable_items/exportable_stored_file_test.php b/lib/tests/content/export/exportable_items/exportable_stored_file_test.php index 0b92d1b48cd..4d26aec7a12 100644 --- a/lib/tests/content/export/exportable_items/exportable_stored_file_test.php +++ b/lib/tests/content/export/exportable_items/exportable_stored_file_test.php @@ -34,7 +34,7 @@ use stored_file; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_stored_file */ -class exportable_stored_file_test extends advanced_testcase { +final class exportable_stored_file_test extends advanced_testcase { /** * Ensure that the create_from_area_params function returns an array. diff --git a/lib/tests/content/export/exportable_items/exportable_textarea_test.php b/lib/tests/content/export/exportable_items/exportable_textarea_test.php index de1968d30d1..4cca31db018 100644 --- a/lib/tests/content/export/exportable_items/exportable_textarea_test.php +++ b/lib/tests/content/export/exportable_items/exportable_textarea_test.php @@ -35,7 +35,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_textarea */ -class exportable_textarea_test extends advanced_testcase { +final class exportable_textarea_test extends advanced_testcase { /** * Ensure that an exportable textarea which does not relate to any content, does not attempt to export any content. diff --git a/lib/tests/content/export/exporters/course_exporter_test.php b/lib/tests/content/export/exporters/course_exporter_test.php index 3b1270b2d27..ac35bb714be 100644 --- a/lib/tests/content/export/exporters/course_exporter_test.php +++ b/lib/tests/content/export/exporters/course_exporter_test.php @@ -33,7 +33,7 @@ use core\content\export\zipwriter; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core\content\export\exporters\course_exporter */ -class course_exporter_test extends advanced_testcase { +final class course_exporter_test extends advanced_testcase { /** * The course_exporter should still export a module intro when no exportables are passed. diff --git a/lib/tests/content/export/zipwriter_test.php b/lib/tests/content/export/zipwriter_test.php index 762e5a1f1bc..b75630758bb 100644 --- a/lib/tests/content/export/zipwriter_test.php +++ b/lib/tests/content/export/zipwriter_test.php @@ -32,7 +32,7 @@ use ZipArchive; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core\content\export\zipwriter */ -class zipwriter_test extends advanced_testcase { +final class zipwriter_test extends advanced_testcase { /** * Test add_file_from_stored_file(). diff --git a/lib/tests/content_test.php b/lib/tests/content_test.php index 52c8f56ddd8..e323d3a89cb 100644 --- a/lib/tests/content_test.php +++ b/lib/tests/content_test.php @@ -33,7 +33,7 @@ namespace core; * @copyright 2020 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_test extends \advanced_testcase { +final class content_test extends \advanced_testcase { /** * A test to confirm only valid cases allow exporting of course content. diff --git a/lib/tests/context_block_test.php b/lib/tests/context_block_test.php index 61c92718786..7517ae1e541 100644 --- a/lib/tests/context_block_test.php +++ b/lib/tests/context_block_test.php @@ -26,7 +26,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \context_block */ -class context_block_test extends \advanced_testcase { +final class context_block_test extends \advanced_testcase { /** * Test setup. diff --git a/lib/tests/core_media_player_native_test.php b/lib/tests/core_media_player_native_test.php index 22a8bcf3d75..1b1e0403aa9 100644 --- a/lib/tests/core_media_player_native_test.php +++ b/lib/tests/core_media_player_native_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/fixtures/testable_core_media_player_native.php'); * @copyright 2019 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class core_media_player_native_test extends \advanced_testcase { +final class core_media_player_native_test extends \advanced_testcase { /** * Pre-test setup. diff --git a/lib/tests/core_renderer_template_exploit_test.php b/lib/tests/core_renderer_template_exploit_test.php index 94391f6c83b..5fd9a5eccdb 100644 --- a/lib/tests/core_renderer_template_exploit_test.php +++ b/lib/tests/core_renderer_template_exploit_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class core_renderer_template_exploit_test extends \advanced_testcase { +final class core_renderer_template_exploit_test extends \advanced_testcase { /** * Test cases to confirm that blacklisted helpers are stripped from the source * text by the helper before being passed to other another helper. This prevents diff --git a/lib/tests/csvclass_test.php b/lib/tests/csvclass_test.php index 1bf9e49c3df..41f418218a6 100644 --- a/lib/tests/csvclass_test.php +++ b/lib/tests/csvclass_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/lib/csvlib.class.php'); * @copyright 2012 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class csvclass_test extends \advanced_testcase { +final class csvclass_test extends \advanced_testcase { protected $testdata = array(); protected $teststring = ''; diff --git a/lib/tests/curl_security_helper_test.php b/lib/tests/curl_security_helper_test.php index f76c9928953..df3bae772cf 100644 --- a/lib/tests/curl_security_helper_test.php +++ b/lib/tests/curl_security_helper_test.php @@ -26,7 +26,7 @@ namespace core; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class curl_security_helper_test extends \advanced_testcase { +final class curl_security_helper_test extends \advanced_testcase { /** * Test for \core\files\curl_security_helper::url_is_blocked(). * diff --git a/lib/tests/customcontext_test.php b/lib/tests/customcontext_test.php index d6a68e3e10e..a30d13681c1 100644 --- a/lib/tests/customcontext_test.php +++ b/lib/tests/customcontext_test.php @@ -41,7 +41,7 @@ defined('MOODLE_INTERNAL') || die(); * @author Brent Boghosian (brent.boghosian@remote-learner.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class customcontext_test extends \advanced_testcase { +final class customcontext_test extends \advanced_testcase { /** * Perform setup before every test. This tells Moodle's phpunit to reset the database after every test. diff --git a/lib/tests/datalib_test.php b/lib/tests/datalib_test.php index 32e1d948ed6..2b20a349ce1 100644 --- a/lib/tests/datalib_test.php +++ b/lib/tests/datalib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datalib_test extends \advanced_testcase { +final class datalib_test extends \advanced_testcase { protected function normalise_sql($sort) { return preg_replace('~\s+~', ' ', $sort); } diff --git a/lib/tests/datalib_update_with_unique_index_test.php b/lib/tests/datalib_update_with_unique_index_test.php index 8cb864f66a9..a1869f4922a 100644 --- a/lib/tests/datalib_update_with_unique_index_test.php +++ b/lib/tests/datalib_update_with_unique_index_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datalib_update_with_unique_index_test extends \advanced_testcase { +final class datalib_update_with_unique_index_test extends \advanced_testcase { public function test_decompose_update_into_safe_changes_identity() { $this->assertEquals(array(), decompose_update_into_safe_changes( diff --git a/lib/tests/date_legacy_test.php b/lib/tests/date_legacy_test.php index f26e164a1f1..0397b5e2fce 100644 --- a/lib/tests/date_legacy_test.php +++ b/lib/tests/date_legacy_test.php @@ -24,8 +24,8 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Petr Skoda */ -class date_legacy_test extends \advanced_testcase { - public function test_settings() { +final class date_legacy_test extends \advanced_testcase { + public function test_settings(): void { global $CFG; $this->resetAfterTest(); diff --git a/lib/tests/date_test.php b/lib/tests/date_test.php index 5fe2fa7e7f2..9f36bb62e35 100644 --- a/lib/tests/date_test.php +++ b/lib/tests/date_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @covers \core_date * @coversDefaultClass \core_date */ -class date_test extends advanced_testcase { +final class date_test extends advanced_testcase { /** * @covers ::get_default_php_timezone */ diff --git a/lib/tests/db/upgradelib_test.php b/lib/tests/db/upgradelib_test.php index f989d285ec8..fcdfab99ac9 100644 --- a/lib/tests/db/upgradelib_test.php +++ b/lib/tests/db/upgradelib_test.php @@ -26,7 +26,7 @@ namespace core\db; * @copyright 2022 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgradelib_test extends \advanced_testcase { +final class upgradelib_test extends \advanced_testcase { /** * Shared setup for the testcase. diff --git a/lib/tests/editorlib_test.php b/lib/tests/editorlib_test.php index 2bb0a5725fc..2b969b60332 100644 --- a/lib/tests/editorlib_test.php +++ b/lib/tests/editorlib_test.php @@ -24,7 +24,7 @@ namespace core; * @author Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class editorlib_test extends \advanced_testcase { +final class editorlib_test extends \advanced_testcase { /** * Tests the installation of event handlers from file diff --git a/lib/tests/encryption_test.php b/lib/tests/encryption_test.php index eacd65f0ac8..290a8f0413e 100644 --- a/lib/tests/encryption_test.php +++ b/lib/tests/encryption_test.php @@ -31,8 +31,7 @@ namespace core; * @copyright 2020 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class encryption_test extends \basic_testcase { - +final class encryption_test extends \advanced_testcase { /** * Clear junk created by tests. */ diff --git a/lib/tests/event/base_test.php b/lib/tests/event/base_test.php index d749c543d2a..dfb456c9636 100644 --- a/lib/tests/event/base_test.php +++ b/lib/tests/event/base_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/..//fixtures/event_fixtures.php'); * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { const DEBUGGING_MSG = 'Events API using $handlers array has been deprecated in favour of Events 2 API, please use it instead.'; diff --git a/lib/tests/event/contentbank_content_created_test.php b/lib/tests/event/contentbank_content_created_test.php index 90b76708045..91915a705b3 100644 --- a/lib/tests/event/contentbank_content_created_test.php +++ b/lib/tests/event/contentbank_content_created_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_created */ -class contentbank_content_created_test extends \advanced_testcase { +final class contentbank_content_created_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_deleted_test.php b/lib/tests/event/contentbank_content_deleted_test.php index 4af8cc5d45e..b247a830909 100644 --- a/lib/tests/event/contentbank_content_deleted_test.php +++ b/lib/tests/event/contentbank_content_deleted_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_deleted */ -class contentbank_content_deleted_test extends \advanced_testcase { +final class contentbank_content_deleted_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_updated_test.php b/lib/tests/event/contentbank_content_updated_test.php index b1a71a3def6..416d6d11eba 100644 --- a/lib/tests/event/contentbank_content_updated_test.php +++ b/lib/tests/event/contentbank_content_updated_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_updated */ -class contentbank_content_updated_test extends \advanced_testcase { +final class contentbank_content_updated_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_uploaded_test.php b/lib/tests/event/contentbank_content_uploaded_test.php index 2aa131f1327..c2cde1e6e36 100644 --- a/lib/tests/event/contentbank_content_uploaded_test.php +++ b/lib/tests/event/contentbank_content_uploaded_test.php @@ -36,7 +36,7 @@ use core_contentbank\contentbank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_uploaded */ -class contentbank_content_uploaded_test extends \advanced_testcase { +final class contentbank_content_uploaded_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_viewed_test.php b/lib/tests/event/contentbank_content_viewed_test.php index a8f0524df44..78ea9e23619 100644 --- a/lib/tests/event/contentbank_content_viewed_test.php +++ b/lib/tests/event/contentbank_content_viewed_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_viewed */ -class contentbank_content_viewed_test extends \advanced_testcase { +final class contentbank_content_viewed_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/context_locked_test.php b/lib/tests/event/context_locked_test.php index c9ebc235ef0..f551c1e6938 100644 --- a/lib/tests/event/context_locked_test.php +++ b/lib/tests/event/context_locked_test.php @@ -25,7 +25,7 @@ namespace core\event; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class context_locked_test extends \advanced_testcase { +final class context_locked_test extends \advanced_testcase { /** * Locks an unlocked context and checks that a core\event\context_locked event is created. * diff --git a/lib/tests/event/deprecated_test.php b/lib/tests/event/deprecated_test.php index 57aa7a8af89..34d38bfe3db 100644 --- a/lib/tests/event/deprecated_test.php +++ b/lib/tests/event/deprecated_test.php @@ -24,7 +24,7 @@ namespace core\event; * @copyright 2013 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class deprecated_test extends \advanced_testcase { +final class deprecated_test extends \advanced_testcase { /** * Test event properties and methods. diff --git a/lib/tests/event/events_test.php b/lib/tests/event/events_test.php index c3b69c7c6b9..8a8b0d8c015 100644 --- a/lib/tests/event/events_test.php +++ b/lib/tests/event/events_test.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); require_once(__DIR__.'/../fixtures/event_fixtures.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/event/grade_deleted_test.php b/lib/tests/event/grade_deleted_test.php index b23d832b5f7..3eb92f9ac8d 100644 --- a/lib/tests/event/grade_deleted_test.php +++ b/lib/tests/event/grade_deleted_test.php @@ -26,7 +26,7 @@ namespace core\event; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_deleted_test extends \advanced_testcase { +final class grade_deleted_test extends \advanced_testcase { /** * Tests the event details. diff --git a/lib/tests/event/grade_item_deleted_test.php b/lib/tests/event/grade_item_deleted_test.php index d1b0c160c14..ee2e2e22d46 100644 --- a/lib/tests/event/grade_item_deleted_test.php +++ b/lib/tests/event/grade_item_deleted_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\grade_item_deleted */ -class grade_item_deleted_test extends \advanced_testcase { +final class grade_item_deleted_test extends \advanced_testcase { /** * Test the grade item deleted event. diff --git a/lib/tests/event/profile_field_test.php b/lib/tests/event/profile_field_test.php index 4af04703791..37aa0a0b5af 100644 --- a/lib/tests/event/profile_field_test.php +++ b/lib/tests/event/profile_field_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/user/profile/definelib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profile_field_test extends \advanced_testcase { +final class profile_field_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/event/unknown_logged_test.php b/lib/tests/event/unknown_logged_test.php index 8e40b9b1c1f..400be3a700e 100644 --- a/lib/tests/event/unknown_logged_test.php +++ b/lib/tests/event/unknown_logged_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/../fixtures/event_fixtures.php'); * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class unknown_logged_test extends \advanced_testcase { +final class unknown_logged_test extends \advanced_testcase { public function test_restore_event() { $event1 = \core_tests\event\unittest_executed::create(array('context' => \context_system::instance(), 'other' => array('sample' => 1, 'xx' => 10))); diff --git a/lib/tests/event/user_graded_test.php b/lib/tests/event/user_graded_test.php index 283f086c70e..20ffc87ae69 100644 --- a/lib/tests/event/user_graded_test.php +++ b/lib/tests/event/user_graded_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/mathslib.php'); * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_graded_test extends \advanced_testcase { +final class user_graded_test extends \advanced_testcase { /** * Tests set up. diff --git a/lib/tests/event/user_password_updated_test.php b/lib/tests/event/user_password_updated_test.php index 73af86c35f6..e759368e6f2 100644 --- a/lib/tests/event/user_password_updated_test.php +++ b/lib/tests/event/user_password_updated_test.php @@ -24,7 +24,7 @@ namespace core\event; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_password_updated_test extends \advanced_testcase { +final class user_password_updated_test extends \advanced_testcase { /** * Test the event. */ diff --git a/lib/tests/exporter_test.php b/lib/tests/exporter_test.php index ead475e86fb..a5e80703861 100644 --- a/lib/tests/exporter_test.php +++ b/lib/tests/exporter_test.php @@ -34,7 +34,7 @@ global $CFG; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporter_test extends \advanced_testcase { +final class exporter_test extends \advanced_testcase { protected $validrelated = null; protected $invalidrelated = null; diff --git a/lib/tests/external/dynamic_tabs_get_content_test.php b/lib/tests/external/dynamic_tabs_get_content_test.php index b30fdc1cddb..40ca0678df8 100644 --- a/lib/tests/external/dynamic_tabs_get_content_test.php +++ b/lib/tests/external/dynamic_tabs_get_content_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/lib/tests/fixtures/testeable_dynamic_tab.php'); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dynamic_tabs_get_content_test extends \externallib_advanced_testcase { +final class dynamic_tabs_get_content_test extends \externallib_advanced_testcase { /** * Text execute method diff --git a/lib/tests/external/output/icon_system/load_fontawesome_map_test.php b/lib/tests/external/output/icon_system/load_fontawesome_map_test.php index 0b5072d63de..b54ccfd680e 100644 --- a/lib/tests/external/output/icon_system/load_fontawesome_map_test.php +++ b/lib/tests/external/output/icon_system/load_fontawesome_map_test.php @@ -40,8 +40,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\external\output\icon_system\load_fontawesome_map */ -class load_fontawesome_map_test extends externallib_advanced_testcase { - +final class load_fontawesome_map_test extends externallib_advanced_testcase { /** * Perform setup before these tests are run. */ diff --git a/lib/tests/external/record_userfeedback_action_test.php b/lib/tests/external/record_userfeedback_action_test.php index 758dbc7916f..4b3ac20211b 100644 --- a/lib/tests/external/record_userfeedback_action_test.php +++ b/lib/tests/external/record_userfeedback_action_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\external\record_userfeedback_action */ -class record_userfeedback_action_test extends externallib_advanced_testcase { +final class record_userfeedback_action_test extends externallib_advanced_testcase { /** * Data provider for test_record_userfeedback_action. diff --git a/lib/tests/externallib_test.php b/lib/tests/externallib_test.php index ff09d856a18..8d94fe884b6 100644 --- a/lib/tests/externallib_test.php +++ b/lib/tests/externallib_test.php @@ -688,8 +688,7 @@ class externallib_test extends \advanced_testcase { /* * Just a wrapper to access protected apis for testing */ -class test_exernal_api extends \external_api { - +final class test_exernal_api extends \external_api { public static function get_context_wrapper($params) { return self::get_context_from_params($params); } diff --git a/lib/tests/filelib_test.php b/lib/tests/filelib_test.php index 1e6198429d0..dcb26cdb59c 100644 --- a/lib/tests/filelib_test.php +++ b/lib/tests/filelib_test.php @@ -43,8 +43,8 @@ require_once($CFG->dirroot . '/repository/lib.php'); * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filelib_test extends \advanced_testcase { - public function test_format_postdata_for_curlcall() { +final class filelib_test extends \advanced_testcase { + public function test_format_postdata_for_curlcall(): void { // POST params with just simple types. $postdatatoconvert = array( 'userid' => 1, 'roleid' => 22, 'name' => 'john'); diff --git a/lib/tests/filestorage_zip_archive_test.php b/lib/tests/filestorage_zip_archive_test.php index 681127ce36c..58dae500163 100644 --- a/lib/tests/filestorage_zip_archive_test.php +++ b/lib/tests/filestorage_zip_archive_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/filestorage/zip_archive.php'); * @copyright 2020 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filestorage_zip_archive_test extends \advanced_testcase { +final class filestorage_zip_archive_test extends \advanced_testcase { /** * Test mangle_pathname() method. * diff --git a/lib/tests/filetypes_test.php b/lib/tests/filetypes_test.php index 478de231f16..2df7bff15f9 100644 --- a/lib/tests/filetypes_test.php +++ b/lib/tests/filetypes_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/filelib.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filetypes_test extends \advanced_testcase { +final class filetypes_test extends \advanced_testcase { public function test_add_type() { $this->resetAfterTest(); diff --git a/lib/tests/filter_manager_test.php b/lib/tests/filter_manager_test.php index 14517b4d8b2..3ca53fa15c4 100644 --- a/lib/tests/filter_manager_test.php +++ b/lib/tests/filter_manager_test.php @@ -26,7 +26,7 @@ use filter_manager; * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class filter_manager_test extends \advanced_testcase { +final class filter_manager_test extends \advanced_testcase { /** * Helper method to apply filters to some text and return the result. diff --git a/lib/tests/filterlib_test.php b/lib/tests/filterlib_test.php index 29bd34c74ef..401f4d991a4 100644 --- a/lib/tests/filterlib_test.php +++ b/lib/tests/filterlib_test.php @@ -34,7 +34,7 @@ require_once($CFG->libdir . '/filterlib.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filterlib_test extends \advanced_testcase { +final class filterlib_test extends \advanced_testcase { private function assert_only_one_filter_globally($filter, $state) { global $DB; diff --git a/lib/tests/formslib_test.php b/lib/tests/formslib_test.php index 08c3d42eb9c..d2ec495971e 100644 --- a/lib/tests/formslib_test.php +++ b/lib/tests/formslib_test.php @@ -48,7 +48,7 @@ require_once($CFG->libdir . '/form/text.php'); * @copyright 2011 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formslib_test extends \advanced_testcase { +final class formslib_test extends \advanced_testcase { public function test_require_rule() { global $CFG; diff --git a/lib/tests/gdlib_test.php b/lib/tests/gdlib_test.php index d322d33d5cf..2862daf4c63 100644 --- a/lib/tests/gdlib_test.php +++ b/lib/tests/gdlib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2015 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gdlib_test extends \basic_testcase { +final class gdlib_test extends \basic_testcase { private $fixturepath = null; diff --git a/lib/tests/googlelib_test.php b/lib/tests/googlelib_test.php index 59241e76cd9..e7cebc07740 100644 --- a/lib/tests/googlelib_test.php +++ b/lib/tests/googlelib_test.php @@ -26,7 +26,7 @@ use Google_Service_YouTube; * @copyright 2021 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googlelib_test extends \advanced_testcase { +final class googlelib_test extends \advanced_testcase { public function test_invalid_google_api_key() { global $CFG; diff --git a/lib/tests/gradelib_test.php b/lib/tests/gradelib_test.php index 0bb9fa7f437..793e2c89dee 100644 --- a/lib/tests/gradelib_test.php +++ b/lib/tests/gradelib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/gradelib.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gradelib_test extends \advanced_testcase { +final class gradelib_test extends \advanced_testcase { public function test_grade_update_mod_grades() { diff --git a/lib/tests/grades_external_test.php b/lib/tests/grades_external_test.php index e9ffeacd347..962b4063bfb 100644 --- a/lib/tests/grades_external_test.php +++ b/lib/tests/grades_external_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grades_external_test extends \externallib_advanced_testcase { +final class grades_external_test extends \externallib_advanced_testcase { /** * Load initial test information diff --git a/lib/tests/grading_external_test.php b/lib/tests/grading_external_test.php index 2d1ef1f364d..3399bc65c96 100644 --- a/lib/tests/grading_external_test.php +++ b/lib/tests/grading_external_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2013 Paul Charsley * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grading_external_test extends \externallib_advanced_testcase { +final class grading_external_test extends \externallib_advanced_testcase { /** * Test get_definitions diff --git a/lib/tests/graphlib_test.php b/lib/tests/graphlib_test.php index e8b307b9898..9fa194a11d4 100644 --- a/lib/tests/graphlib_test.php +++ b/lib/tests/graphlib_test.php @@ -29,7 +29,7 @@ require_once("$CFG->libdir/graphlib.php"); * @copyright 2023 Meirza (meirza.arson@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class graphlib_test extends \basic_testcase { +final class graphlib_test extends \basic_testcase { /** * Data provider for test_graphlib. diff --git a/lib/tests/grouplib_test.php b/lib/tests/grouplib_test.php index f5a2bedc232..f4a11edc47f 100644 --- a/lib/tests/grouplib_test.php +++ b/lib/tests/grouplib_test.php @@ -24,7 +24,7 @@ namespace core; * @author Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grouplib_test extends \advanced_testcase { +final class grouplib_test extends \advanced_testcase { public function test_groups_get_group_by_idnumber() { $this->resetAfterTest(true); diff --git a/lib/tests/h5p_clean_orphaned_records_task_test.php b/lib/tests/h5p_clean_orphaned_records_task_test.php index ec473e60176..a01520e7b0a 100644 --- a/lib/tests/h5p_clean_orphaned_records_task_test.php +++ b/lib/tests/h5p_clean_orphaned_records_task_test.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * */ -class h5p_clean_orphaned_records_task_test extends advanced_testcase { +final class h5p_clean_orphaned_records_task_test extends advanced_testcase { /** * Test task execution diff --git a/lib/tests/htmlpurifier_test.php b/lib/tests/htmlpurifier_test.php index 6d5ddd6f034..5843ff11d2a 100644 --- a/lib/tests/htmlpurifier_test.php +++ b/lib/tests/htmlpurifier_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class htmlpurifier_test extends \basic_testcase { +final class htmlpurifier_test extends \basic_testcase { /** * Verify _blank target is allowed. diff --git a/lib/tests/ip_utils_test.php b/lib/tests/ip_utils_test.php index c177c22bc62..e27312101d3 100644 --- a/lib/tests/ip_utils_test.php +++ b/lib/tests/ip_utils_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ip_utils_test extends \basic_testcase { +final class ip_utils_test extends \basic_testcase { /** * Test for \core\ip_utils::is_domain_name(). * diff --git a/lib/tests/jquery_test.php b/lib/tests/jquery_test.php index b56226bfa88..b0082fadf83 100644 --- a/lib/tests/jquery_test.php +++ b/lib/tests/jquery_test.php @@ -30,7 +30,7 @@ namespace core; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class jquery_test extends \basic_testcase { +final class jquery_test extends \basic_testcase { public function test_plugins_file() { global $CFG; diff --git a/lib/tests/ldaplib_test.php b/lib/tests/ldaplib_test.php index 5da201b74bb..fe61ff9f547 100644 --- a/lib/tests/ldaplib_test.php +++ b/lib/tests/ldaplib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/ldaplib.php'); * @copyright Damyon Wiese, Iñaki Arenaza 2014 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class ldaplib_test extends \advanced_testcase { +final class ldaplib_test extends \advanced_testcase { public function test_ldap_addslashes() { // See http://tools.ietf.org/html/rfc4514#section-5.2 if you want diff --git a/lib/tests/licenselib_test.php b/lib/tests/licenselib_test.php index 15c152f4c1d..f6d6820b772 100644 --- a/lib/tests/licenselib_test.php +++ b/lib/tests/licenselib_test.php @@ -33,7 +33,7 @@ require_once(__DIR__.'/../licenselib.php'); * @copyright 2020 Tom Dickman * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class licenselib_test extends advanced_testcase { +final class licenselib_test extends advanced_testcase { /** * Test getting licenses from database or cache. diff --git a/lib/tests/lock/timing_wrapper_lock_factory_test.php b/lib/tests/lock/timing_wrapper_lock_factory_test.php index a05815d4cd7..23756f40e41 100644 --- a/lib/tests/lock/timing_wrapper_lock_factory_test.php +++ b/lib/tests/lock/timing_wrapper_lock_factory_test.php @@ -24,7 +24,7 @@ namespace core\lock; * @copyright 2022 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class timing_wrapper_lock_factory_test extends \advanced_testcase { +final class timing_wrapper_lock_factory_test extends \advanced_testcase { /** * Tests lock timing wrapper class. diff --git a/lib/tests/lock_config_test.php b/lib/tests/lock_config_test.php index adc689a1607..d1823b253ed 100644 --- a/lib/tests/lock_config_test.php +++ b/lib/tests/lock_config_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lock_config_test extends \advanced_testcase { +final class lock_config_test extends \advanced_testcase { /** * Tests the static parse charset method diff --git a/lib/tests/lock_test.php b/lib/tests/lock_test.php index 39ec94b9a53..4dacbf42257 100644 --- a/lib/tests/lock_test.php +++ b/lib/tests/lock_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lock_test extends \advanced_testcase { +final class lock_test extends \advanced_testcase { /** * Some lock types will store data in the database. diff --git a/lib/tests/markdown_test.php b/lib/tests/markdown_test.php index 3f75534e99b..52a20fc1066 100644 --- a/lib/tests/markdown_test.php +++ b/lib/tests/markdown_test.php @@ -30,7 +30,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class markdown_test extends \basic_testcase { +final class markdown_test extends \basic_testcase { public function test_paragraphs() { $text = "one\n\ntwo"; diff --git a/lib/tests/mathslib_test.php b/lib/tests/mathslib_test.php index 8e8368add18..afe585b8640 100644 --- a/lib/tests/mathslib_test.php +++ b/lib/tests/mathslib_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/mathslib.php'); * @copyright 2007 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mathslib_test extends \basic_testcase { +final class mathslib_test extends \basic_testcase { /** * Tests the basic formula evaluation. diff --git a/lib/tests/medialib_test.php b/lib/tests/medialib_test.php index e95bda6f679..36d6f00bb56 100644 --- a/lib/tests/medialib_test.php +++ b/lib/tests/medialib_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/fixtures/testable_core_media_player.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class medialib_test extends \advanced_testcase { +final class medialib_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/lib/tests/message_test.php b/lib/tests/message_test.php index c9a76c862dc..db0a4ad2297 100644 --- a/lib/tests/message_test.php +++ b/lib/tests/message_test.php @@ -26,7 +26,7 @@ namespace core; * @copyright 2015 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class message_test extends \advanced_testcase { +final class message_test extends \advanced_testcase { /** * Test the method get_eventobject_for_processor(). diff --git a/lib/tests/messagelib_test.php b/lib/tests/messagelib_test.php index ee04a68c271..a90b7755b1c 100644 --- a/lib/tests/messagelib_test.php +++ b/lib/tests/messagelib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 The Open Universtiy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class messagelib_test extends \advanced_testcase { +final class messagelib_test extends \advanced_testcase { public function test_message_provider_disabled() { $this->resetAfterTest(); diff --git a/lib/tests/minify_test.php b/lib/tests/minify_test.php index 679c19b3be9..7280001c51a 100644 --- a/lib/tests/minify_test.php +++ b/lib/tests/minify_test.php @@ -28,8 +28,8 @@ use core_minify; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class minify_test extends \advanced_testcase { - public function test_css() { +final class minify_test extends \advanced_testcase { + public function test_css(): void { $css = " body { background: #fff; diff --git a/lib/tests/modinfolib_test.php b/lib/tests/modinfolib_test.php index 6e72a0ed885..c1161ba538d 100644 --- a/lib/tests/modinfolib_test.php +++ b/lib/tests/modinfolib_test.php @@ -35,8 +35,8 @@ use Exception; * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class modinfolib_test extends advanced_testcase { - public function test_section_info_properties() { +final class modinfolib_test extends advanced_testcase { + public function test_section_info_properties(): void { global $DB, $CFG; $this->resetAfterTest(); diff --git a/lib/tests/moodle_page_test.php b/lib/tests/moodle_page_test.php index 87e007f47fc..75c4cd5c7be 100644 --- a/lib/tests/moodle_page_test.php +++ b/lib/tests/moodle_page_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir . '/blocklib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \moodle_page */ -class moodle_page_test extends \advanced_testcase { +final class moodle_page_test extends \advanced_testcase { /** * @var testable_moodle_page diff --git a/lib/tests/moodlelib_current_language_test.php b/lib/tests/moodlelib_current_language_test.php index 2b6c6cf273e..885e4bb49dd 100644 --- a/lib/tests/moodlelib_current_language_test.php +++ b/lib/tests/moodlelib_current_language_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers ::current_language */ -class moodlelib_current_language_test extends \advanced_testcase { +final class moodlelib_current_language_test extends \advanced_testcase { public function test_current_language_site_default(): void { $this->resetAfterTest(); diff --git a/lib/tests/myprofilelib_test.php b/lib/tests/myprofilelib_test.php index 7e4c8cdef0c..11222cf4e0c 100644 --- a/lib/tests/myprofilelib_test.php +++ b/lib/tests/myprofilelib_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/lib/myprofilelib.php'); * @copyright 2015 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class myprofilelib_test extends \advanced_testcase { +final class myprofilelib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/lib/tests/navigation/output/primary_test.php b/lib/tests/navigation/output/primary_test.php index 374efb3b62c..a7e40514895 100644 --- a/lib/tests/navigation/output/primary_test.php +++ b/lib/tests/navigation/output/primary_test.php @@ -26,7 +26,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class primary_test extends \advanced_testcase { +final class primary_test extends \advanced_testcase { /** * Basic setup to make sure the nav objects gets generated without any issues. */ diff --git a/lib/tests/navigation/views/primary_test.php b/lib/tests/navigation/views/primary_test.php index b28cee7a78f..7d6bcb192c4 100644 --- a/lib/tests/navigation/views/primary_test.php +++ b/lib/tests/navigation/views/primary_test.php @@ -29,7 +29,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class primary_test extends \advanced_testcase { +final class primary_test extends \advanced_testcase { /** * Test the initialise in different contexts * diff --git a/lib/tests/navigation/views/secondary_test.php b/lib/tests/navigation/views/secondary_test.php index 55f98d2d32c..27f3201387a 100644 --- a/lib/tests/navigation/views/secondary_test.php +++ b/lib/tests/navigation/views/secondary_test.php @@ -31,7 +31,7 @@ use moodle_url; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class secondary_test extends \advanced_testcase { +final class secondary_test extends \advanced_testcase { /** * Test the get_leaf_nodes function * @param float $siteorder The order for the siteadmin node diff --git a/lib/tests/navigationlib_test.php b/lib/tests/navigationlib_test.php index 8a22c3f6bd5..8d43958af9d 100644 --- a/lib/tests/navigationlib_test.php +++ b/lib/tests/navigationlib_test.php @@ -39,7 +39,7 @@ require_once($CFG->libdir . '/navigationlib.php'); * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5) */ -class navigationlib_test extends \advanced_testcase { +final class navigationlib_test extends \advanced_testcase { /** * @var navigation_node */ diff --git a/lib/tests/notification_test.php b/lib/tests/notification_test.php index 8e4a75af7c7..b29b234b2a4 100644 --- a/lib/tests/notification_test.php +++ b/lib/tests/notification_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class notification_test extends \advanced_testcase { +final class notification_test extends \advanced_testcase { /** * Setup required for all notification tests. diff --git a/lib/tests/oauth2_test.php b/lib/tests/oauth2_test.php index 873ceda8526..0fa7627db03 100644 --- a/lib/tests/oauth2_test.php +++ b/lib/tests/oauth2_test.php @@ -31,7 +31,7 @@ use \core\oauth2\user_field_mapping; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. * @coversDefaultClass \core\oauth2\api */ -class oauth2_test extends \advanced_testcase { +final class oauth2_test extends \advanced_testcase { /** * Tests the crud operations on oauth2 issuers. diff --git a/lib/tests/output/activity_header_test.php b/lib/tests/output/activity_header_test.php index 588dca4c2e0..6acba921499 100644 --- a/lib/tests/output/activity_header_test.php +++ b/lib/tests/output/activity_header_test.php @@ -25,7 +25,7 @@ namespace core\output; * @copyright 2021 Peter * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_header_test extends \advanced_testcase { +final class activity_header_test extends \advanced_testcase { /** * Test the title setter diff --git a/lib/tests/output/icon_system_test.php b/lib/tests/output/icon_system_test.php index 45056b9ba2d..57dec09d4a6 100644 --- a/lib/tests/output/icon_system_test.php +++ b/lib/tests/output/icon_system_test.php @@ -33,7 +33,7 @@ use coding_exception; * * @coversDefaultClass \core\output\icon_system */ -class icon_system_test extends advanced_testcase { +final class icon_system_test extends advanced_testcase { /** * Check whether the supplied classes are valid icon subsystems of the supplied one. * diff --git a/lib/tests/output/language_menu_test.php b/lib/tests/output/language_menu_test.php index d8b3e10c5bf..567abd79348 100644 --- a/lib/tests/output/language_menu_test.php +++ b/lib/tests/output/language_menu_test.php @@ -26,7 +26,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class language_menu_test extends \advanced_testcase { +final class language_menu_test extends \advanced_testcase { /** * Basic setup to make sure the nav objects gets generated without any issues. */ diff --git a/lib/tests/output/mustache_clean_string_helper_test.php b/lib/tests/output/mustache_clean_string_helper_test.php index 73d74fe21b8..d71e7fe1b16 100644 --- a/lib/tests/output/mustache_clean_string_helper_test.php +++ b/lib/tests/output/mustache_clean_string_helper_test.php @@ -27,7 +27,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\output\mustache_clean_string_helper */ -class mustache_clean_string_helper_test extends \basic_testcase { +final class mustache_clean_string_helper_test extends \basic_testcase { /** * Test the get_lang_menu diff --git a/lib/tests/output/mustache_helper_collection_test.php b/lib/tests/output/mustache_helper_collection_test.php index e27a1ca6e44..19fbfc1dd1c 100644 --- a/lib/tests/output/mustache_helper_collection_test.php +++ b/lib/tests/output/mustache_helper_collection_test.php @@ -24,7 +24,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\output\mustache_helper_collection */ -class mustache_helper_collection_test extends \advanced_testcase { +final class mustache_helper_collection_test extends \advanced_testcase { /** * Test cases to confirm that disallowed helpers are stripped from the source diff --git a/lib/tests/output/mustache_quote_helper_test.php b/lib/tests/output/mustache_quote_helper_test.php index 6ed5960e75b..f7cde42590d 100644 --- a/lib/tests/output/mustache_quote_helper_test.php +++ b/lib/tests/output/mustache_quote_helper_test.php @@ -27,7 +27,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\output\mustache_quote_helper */ -class mustache_quote_helper_test extends \basic_testcase { +final class mustache_quote_helper_test extends \basic_testcase { /** * Tests the quote helper diff --git a/lib/tests/output/mustache_template_finder_test.php b/lib/tests/output/mustache_template_finder_test.php index c9492a3c9b7..6b00f7f2aca 100644 --- a/lib/tests/output/mustache_template_finder_test.php +++ b/lib/tests/output/mustache_template_finder_test.php @@ -27,7 +27,7 @@ namespace core\output; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mustache_template_finder_test extends \advanced_testcase { +final class mustache_template_finder_test extends \advanced_testcase { /** * Data provider which reutrns a set of valid template directories to be used when testing diff --git a/lib/tests/output/mustache_template_source_loader_test.php b/lib/tests/output/mustache_template_source_loader_test.php index 5e753b4f6cf..3245399dd6d 100644 --- a/lib/tests/output/mustache_template_source_loader_test.php +++ b/lib/tests/output/mustache_template_source_loader_test.php @@ -25,7 +25,7 @@ namespace core\output; * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mustache_template_source_loader_test extends \advanced_testcase { +final class mustache_template_source_loader_test extends \advanced_testcase { /** * Ensure that stripping comments from templates does not mutilate the template body. */ diff --git a/lib/tests/output/participants_action_bar_test.php b/lib/tests/output/participants_action_bar_test.php index fb3e1c5a09b..f04efc9f186 100644 --- a/lib/tests/output/participants_action_bar_test.php +++ b/lib/tests/output/participants_action_bar_test.php @@ -25,7 +25,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class participants_action_bar_test extends \advanced_testcase { +final class participants_action_bar_test extends \advanced_testcase { /** * Test the get_content_for_select function diff --git a/lib/tests/pdflib_test.php b/lib/tests/pdflib_test.php index fea0e2dc34b..158c0306f77 100644 --- a/lib/tests/pdflib_test.php +++ b/lib/tests/pdflib_test.php @@ -25,7 +25,7 @@ use TCPDF_STATIC; * @copyright 2021 Brendan Heywood (brendan@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class pdflib_test extends \advanced_testcase { +final class pdflib_test extends \advanced_testcase { public function test_gettcpdf_producer() { global $CFG; diff --git a/lib/tests/persistent_test.php b/lib/tests/persistent_test.php index 151db755130..edf38278271 100644 --- a/lib/tests/persistent_test.php +++ b/lib/tests/persistent_test.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\persistent */ -class persistent_test extends advanced_testcase { +final class persistent_test extends advanced_testcase { public function setUp(): void { $this->make_persistent_table(); diff --git a/lib/tests/phpxmlrpc_test.php b/lib/tests/phpxmlrpc_test.php index 543e81b94b1..abe92d88067 100644 --- a/lib/tests/phpxmlrpc_test.php +++ b/lib/tests/phpxmlrpc_test.php @@ -30,7 +30,7 @@ use PhpXmlRpc\Value; * @copyright 2022 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com} * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class phpxmlrpc_test extends \basic_testcase { +final class phpxmlrpc_test extends \basic_testcase { /** * Ensure PhpXmlRpc availability. diff --git a/lib/tests/plugininfo/base_test.php b/lib/tests/plugininfo/base_test.php index e79f6b9b6fa..ca04a07d6bb 100644 --- a/lib/tests/plugininfo/base_test.php +++ b/lib/tests/plugininfo/base_test.php @@ -28,7 +28,7 @@ use testable_plugininfo_base; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/plugininfo/dataformat_test.php b/lib/tests/plugininfo/dataformat_test.php index d8dd2965d60..18daa7552ac 100644 --- a/lib/tests/plugininfo/dataformat_test.php +++ b/lib/tests/plugininfo/dataformat_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dataformat_test extends advanced_testcase { +final class dataformat_test extends advanced_testcase { /** * Helper method, to allow easy filtering of default formats in order to perform assertions without any third-party diff --git a/lib/tests/plugininfo/repository_test.php b/lib/tests/plugininfo/repository_test.php index fecd9d9c73c..adcb598d9ac 100644 --- a/lib/tests/plugininfo/repository_test.php +++ b/lib/tests/plugininfo/repository_test.php @@ -28,7 +28,7 @@ namespace core\plugininfo; /** * Tests of the repository plugin manager. */ -class repository_test extends \advanced_testcase { +final class repository_test extends \advanced_testcase { /** * Test the enable_plugin function to check that it enables and disables repository plugins properly. diff --git a/lib/tests/portfoliolib_test.php b/lib/tests/portfoliolib_test.php index ba740f368ab..d2448f85e8f 100644 --- a/lib/tests/portfoliolib_test.php +++ b/lib/tests/portfoliolib_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir.'/portfolio/formats.php'); * @copyright 2014 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfoliolib_test extends advanced_testcase { +final class portfoliolib_test extends advanced_testcase { public function test_portfolio_rewrite_pluginfile_urls() { $this->resetAfterTest(); diff --git a/lib/tests/progress_display_test.php b/lib/tests/progress_display_test.php index 8c48f4b3a14..84fd6ed63d1 100644 --- a/lib/tests/progress_display_test.php +++ b/lib/tests/progress_display_test.php @@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || die(); -class progress_display_test extends \advanced_testcase { +final class progress_display_test extends \advanced_testcase { /** * Test basic function of progress_display, updating status and outputting wibbler. diff --git a/lib/tests/progress_test.php b/lib/tests/progress_test.php index 31496cdd1a3..6e90e3266e5 100644 --- a/lib/tests/progress_test.php +++ b/lib/tests/progress_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class progress_test extends \basic_testcase { +final class progress_test extends \basic_testcase { /** * Tests for basic use with simple numeric progress. diff --git a/lib/tests/qrcode_test.php b/lib/tests/qrcode_test.php index 7e2830482a9..5b18a97e8fa 100644 --- a/lib/tests/qrcode_test.php +++ b/lib/tests/qrcode_test.php @@ -26,7 +26,7 @@ use core_qrcode; * @author * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qrcode_test extends \basic_testcase { +final class qrcode_test extends \basic_testcase { /** * Basic test to generate a QR code and check that the library is not broken. diff --git a/lib/tests/questionlib_test.php b/lib/tests/questionlib_test.php index fa8924b9a54..536ed0d7a09 100644 --- a/lib/tests/questionlib_test.php +++ b/lib/tests/questionlib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2006 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionlib_test extends \advanced_testcase { +final class questionlib_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/regex_test.php b/lib/tests/regex_test.php index 450a6754076..a176ce58ad6 100644 --- a/lib/tests/regex_test.php +++ b/lib/tests/regex_test.php @@ -24,8 +24,8 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Petr Skoda */ -class regex_test extends \advanced_testcase { - public function test_whitespace_replacement_with_u() { +final class regex_test extends \advanced_testcase { + public function test_whitespace_replacement_with_u(): void { $unicode = "Теорія і практика використання системи управління навчанням Moo dleКиївський національний університет будівництва і архітектури, 21-22 тра вня 2015 р.http://2015.moodlemoot.in.ua/"; @@ -34,5 +34,3 @@ dleКиївський національний університет будів $this->assertSame(str_replace("\n", ' ', $unicode), $whitespaced); } } - - diff --git a/lib/tests/report_helper_test.php b/lib/tests/report_helper_test.php index 9abe4d637c5..37612756faf 100644 --- a/lib/tests/report_helper_test.php +++ b/lib/tests/report_helper_test.php @@ -31,7 +31,7 @@ use core\report_helper; /** * Tests the functions for report_helper class. */ -class report_helper_test extends \advanced_testcase { +final class report_helper_test extends \advanced_testcase { /** * Data provider for testing selected report for same and different courses * diff --git a/lib/tests/requirejs_test.php b/lib/tests/requirejs_test.php index 922d05bde1f..ac0dd2b80f1 100644 --- a/lib/tests/requirejs_test.php +++ b/lib/tests/requirejs_test.php @@ -26,7 +26,7 @@ use core_requirejs; * @copyright 2016 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class requirejs_test extends \advanced_testcase { +final class requirejs_test extends \advanced_testcase { /** * Test requirejs loader diff --git a/lib/tests/rsslib_test.php b/lib/tests/rsslib_test.php index 3585601018e..846919542ad 100644 --- a/lib/tests/rsslib_test.php +++ b/lib/tests/rsslib_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/rsslib.php'); * @copyright 2009 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rsslib_test extends \advanced_testcase { +final class rsslib_test extends \advanced_testcase { // The number of seconds tests should wait for the server to respond (high to prevent false positives). const TIMEOUT = 10; diff --git a/lib/tests/rtlcss_test.php b/lib/tests/rtlcss_test.php index 0cf82b808d5..9d40e109e51 100644 --- a/lib/tests/rtlcss_test.php +++ b/lib/tests/rtlcss_test.php @@ -33,7 +33,7 @@ use Sabberworm\CSS\OutputFormat; /** * Class rtlcss_test. */ -class rtlcss_test extends basic_testcase { +final class rtlcss_test extends basic_testcase { /** * Data provider. * @return array diff --git a/lib/tests/scss_test.php b/lib/tests/scss_test.php index cb550143877..a7d0b88aa37 100644 --- a/lib/tests/scss_test.php +++ b/lib/tests/scss_test.php @@ -26,7 +26,7 @@ use core_scss; * @copyright 2016 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Data provider for is_valid_file diff --git a/lib/tests/session/utility/cookie_helper_test.php b/lib/tests/session/utility/cookie_helper_test.php index 03d5455b38e..7fe2a140f6c 100644 --- a/lib/tests/session/utility/cookie_helper_test.php +++ b/lib/tests/session/utility/cookie_helper_test.php @@ -24,7 +24,7 @@ namespace core\session\utility; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\session\utility\cookie_helper */ -class cookie_helper_test extends \advanced_testcase { +final class cookie_helper_test extends \advanced_testcase { /** * Testing cookie_response_headers_add_attributes(). diff --git a/lib/tests/sessionlib_test.php b/lib/tests/sessionlib_test.php index 27b1491fe53..c590b46d457 100644 --- a/lib/tests/sessionlib_test.php +++ b/lib/tests/sessionlib_test.php @@ -25,7 +25,10 @@ namespace core; * @copyright 2014 Totara Learning Solutions Ltd {@link http://www.totaralms.com/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sessionlib_test extends \advanced_testcase { +final class sessionlib_test extends \advanced_testcase { + /** + * @covers ::cron_setup_user + */ public function test_cron_setup_user() { global $PAGE, $USER, $SESSION, $SITE, $CFG; $this->resetAfterTest(); diff --git a/lib/tests/setuplib_test.php b/lib/tests/setuplib_test.php index 977d216b59f..5de82ad2538 100644 --- a/lib/tests/setuplib_test.php +++ b/lib/tests/setuplib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class setuplib_test extends \advanced_testcase { +final class setuplib_test extends \advanced_testcase { /** * Test get_docs_url_standard in the normal case when we should link to Moodle docs. diff --git a/lib/tests/statslib_test.php b/lib/tests/statslib_test.php index 5e154f29607..eae21fc8ce1 100644 --- a/lib/tests/statslib_test.php +++ b/lib/tests/statslib_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/fixtures/stats_events.php'); * @copyright 2012 Tyler Bannister * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statslib_test extends \advanced_testcase { +final class statslib_test extends \advanced_testcase { /** The day to use for testing **/ const DAY = 1272672000; diff --git a/lib/tests/string_manager_standard_test.php b/lib/tests/string_manager_standard_test.php index 2c1b9401385..005f2b3b896 100644 --- a/lib/tests/string_manager_standard_test.php +++ b/lib/tests/string_manager_standard_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir.'/moodlelib.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class string_manager_standard_test extends \advanced_testcase { +final class string_manager_standard_test extends \advanced_testcase { public function test_string_manager_instance() { $this->resetAfterTest(); diff --git a/lib/tests/tablelib_test.php b/lib/tests/tablelib_test.php index ec5f9245a99..7f3676434d9 100644 --- a/lib/tests/tablelib_test.php +++ b/lib/tests/tablelib_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/tests/fixtures/testable_flexible_table.php'); * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tablelib_test extends \advanced_testcase { +final class tablelib_test extends \advanced_testcase { protected function generate_columns($cols) { $columns = array(); foreach (range(0, $cols - 1) as $j) { diff --git a/lib/tests/task/calendar_cron_task_test.php b/lib/tests/task/calendar_cron_task_test.php index 2dbc52c9054..ec313b8e1e3 100644 --- a/lib/tests/task/calendar_cron_task_test.php +++ b/lib/tests/task/calendar_cron_task_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_cron_task_test extends \advanced_testcase { +final class calendar_cron_task_test extends \advanced_testcase { /** * Tests set up diff --git a/lib/tests/task/completion_daily_task_test.php b/lib/tests/task/completion_daily_task_test.php index fde8a40eaa9..6540dfbc7f1 100644 --- a/lib/tests/task/completion_daily_task_test.php +++ b/lib/tests/task/completion_daily_task_test.php @@ -25,7 +25,7 @@ use advanced_testcase; * @copyright 2020 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class completion_daily_task_test extends advanced_testcase { +final class completion_daily_task_test extends advanced_testcase { /** * Test calendar cron task with a broken subscription URL. diff --git a/lib/tests/task/database_logger_test.php b/lib/tests/task/database_logger_test.php index f4c93f6196e..a7ec8de5c9d 100644 --- a/lib/tests/task/database_logger_test.php +++ b/lib/tests/task/database_logger_test.php @@ -24,7 +24,7 @@ namespace core\task; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class database_logger_test extends \advanced_testcase { +final class database_logger_test extends \advanced_testcase { /** * @var \moodle_database The original database prior to mocking diff --git a/lib/tests/task/h5p_get_content_types_task_test.php b/lib/tests/task/h5p_get_content_types_task_test.php index ccb42ea2bd8..afa3858524e 100644 --- a/lib/tests/task/h5p_get_content_types_task_test.php +++ b/lib/tests/task/h5p_get_content_types_task_test.php @@ -28,7 +28,7 @@ use core_h5p\h5p_test_factory; * * @runTestsInSeparateProcesses */ -class h5p_get_content_types_task_test extends \advanced_testcase { +final class h5p_get_content_types_task_test extends \advanced_testcase { protected function setup(): void { global $CFG; diff --git a/lib/tests/task/logging_test.php b/lib/tests/task/logging_test.php index ee0df88197d..a914446d68c 100644 --- a/lib/tests/task/logging_test.php +++ b/lib/tests/task/logging_test.php @@ -36,7 +36,7 @@ require_once(__DIR__ . '/../fixtures/task_fixtures.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class logging_test extends \advanced_testcase { +final class logging_test extends \advanced_testcase { /** * @var \moodle_database The original database prior to mocking diff --git a/lib/tests/task/scheduled_task_test.php b/lib/tests/task/scheduled_task_test.php index 4e78495648e..91a52b0f104 100644 --- a/lib/tests/task/scheduled_task_test.php +++ b/lib/tests/task/scheduled_task_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../fixtures/task_fixtures.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\task\scheduled_task */ -class scheduled_task_test extends \advanced_testcase { +final class scheduled_task_test extends \advanced_testcase { /** * Data provider for {@see test_eval_cron_field} diff --git a/lib/tests/task/send_login_notifications_test.php b/lib/tests/task/send_login_notifications_test.php index 89d89553f86..22920196837 100644 --- a/lib/tests/task/send_login_notifications_test.php +++ b/lib/tests/task/send_login_notifications_test.php @@ -26,7 +26,7 @@ use moodle_url; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\task\send_login_notifications */ -class send_login_notifications_test extends \advanced_testcase { +final class send_login_notifications_test extends \advanced_testcase { /** * Load required classes diff --git a/lib/tests/text_test.php b/lib/tests/text_test.php index 3d13c425b7f..682936748ae 100644 --- a/lib/tests/text_test.php +++ b/lib/tests/text_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @coversDefaultClass \core_text * */ -class text_test extends advanced_testcase { +final class text_test extends advanced_testcase { /** * Tests the static parse charset method. diff --git a/lib/tests/theme_config_test.php b/lib/tests/theme_config_test.php index 1c62f3a6f6c..aef2fd9637b 100644 --- a/lib/tests/theme_config_test.php +++ b/lib/tests/theme_config_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/outputlib.php'); * @covers \theme_config * @coversDefaultClass \theme_config */ -class theme_config_test extends advanced_testcase { +final class theme_config_test extends advanced_testcase { /** * This function will test directives used to serve SVG images to make sure * this are making the right decisions. diff --git a/lib/tests/update_api_test.php b/lib/tests/update_api_test.php index 504041ce42f..c50c65ea671 100644 --- a/lib/tests/update_api_test.php +++ b/lib/tests/update_api_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/testable_update_api.php'); * @copyright 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_api_test extends \advanced_testcase { +final class update_api_test extends \advanced_testcase { /** * Make sure the $CFG->branch is mapped correctly to the format used by the API. diff --git a/lib/tests/update_checker_test.php b/lib/tests/update_checker_test.php index cb3676035f2..f710fbf2e27 100644 --- a/lib/tests/update_checker_test.php +++ b/lib/tests/update_checker_test.php @@ -32,7 +32,7 @@ require_once(__DIR__.'/fixtures/testable_update_checker.php'); * @copyright 2012, 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_checker_test extends \advanced_testcase { +final class update_checker_test extends \advanced_testcase { public function test_core_available_update() { $provider = testable_checker::instance(); diff --git a/lib/tests/update_code_manager_test.php b/lib/tests/update_code_manager_test.php index 3b3a071815f..7d02431643e 100644 --- a/lib/tests/update_code_manager_test.php +++ b/lib/tests/update_code_manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__.'/fixtures/testable_update_code_manager.php'); * @copyright 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_code_manager_test extends \advanced_testcase { +final class update_code_manager_test extends \advanced_testcase { public function test_get_remote_plugin_zip() { $codeman = new \core\update\testable_code_manager(); diff --git a/lib/tests/update_validator_test.php b/lib/tests/update_validator_test.php index a8794282cc7..4f6befe8b46 100644 --- a/lib/tests/update_validator_test.php +++ b/lib/tests/update_validator_test.php @@ -30,7 +30,7 @@ require_once(__DIR__.'/fixtures/testable_update_validator.php'); * @copyright 2013, 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_validator_test extends \advanced_testcase { +final class update_validator_test extends \advanced_testcase { public function test_validate_files_layout() { $fixtures = __DIR__.'/fixtures/update_validator'; diff --git a/lib/tests/upgrade_util_test.php b/lib/tests/upgrade_util_test.php index c1bf4fb556c..7f6e738a463 100644 --- a/lib/tests/upgrade_util_test.php +++ b/lib/tests/upgrade_util_test.php @@ -28,7 +28,7 @@ defined('CURL_SSLVERSION_TLSv1_2') || define('CURL_SSLVERSION_TLSv1_2', 6); * @copyright 2016 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_util_test extends \advanced_testcase { +final class upgrade_util_test extends \advanced_testcase { /** * The value of PHP_ZTS when thread safety is enabled. diff --git a/lib/tests/upgradelib_test.php b/lib/tests/upgradelib_test.php index 2e3615f733f..aa2cff4355b 100644 --- a/lib/tests/upgradelib_test.php +++ b/lib/tests/upgradelib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/calendar/tests/helpers.php'); /** * Tests various classes and functions in upgradelib.php library. */ -class upgradelib_test extends advanced_testcase { +final class upgradelib_test extends advanced_testcase { /** * Test the {@link upgrade_stale_php_files_present() function diff --git a/lib/tests/user_menu_test.php b/lib/tests/user_menu_test.php index 8e94abd8d4d..c342f3be031 100644 --- a/lib/tests/user_menu_test.php +++ b/lib/tests/user_menu_test.php @@ -23,7 +23,7 @@ namespace core; * @copyright 2015 Jetha Chan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_menu_test extends \advanced_testcase { +final class user_menu_test extends \advanced_testcase { /** * Custom user menu data for the test_custom_user_menu test. diff --git a/lib/tests/user_test.php b/lib/tests/user_test.php index 607ef61979b..39a680f6f40 100644 --- a/lib/tests/user_test.php +++ b/lib/tests/user_test.php @@ -23,7 +23,7 @@ namespace core; * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_test extends \advanced_testcase { +final class user_test extends \advanced_testcase { /** * Setup test data. diff --git a/lib/tests/useragent_test.php b/lib/tests/useragent_test.php index d3bfc40da1e..5e9ef9a0ee6 100644 --- a/lib/tests/useragent_test.php +++ b/lib/tests/useragent_test.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_useragent */ -class useragent_test extends advanced_testcase { +final class useragent_test extends advanced_testcase { /** * Restores the user agent to the default one. diff --git a/lib/tests/weblib_format_text_test.php b/lib/tests/weblib_format_text_test.php index b799d9a0409..facb47fb4e9 100644 --- a/lib/tests/weblib_format_text_test.php +++ b/lib/tests/weblib_format_text_test.php @@ -27,7 +27,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers ::format_text */ -class weblib_format_text_test extends \advanced_testcase { +final class weblib_format_text_test extends \advanced_testcase { public function test_format_text_format_html() { $this->resetAfterTest(); diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php index b97896bc0d5..2013a7b60ef 100644 --- a/lib/tests/weblib_test.php +++ b/lib/tests/weblib_test.php @@ -23,7 +23,7 @@ * @author T.J.Hunt@open.ac.uk * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class weblib_test extends advanced_testcase { +final class weblib_test extends advanced_testcase { /** * @covers ::format_string */ diff --git a/lib/tests/xhprof_test.php b/lib/tests/xhprof_test.php index 60ccbf910db..fda642bc463 100644 --- a/lib/tests/xhprof_test.php +++ b/lib/tests/xhprof_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2019 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xhprof_test extends \advanced_testcase { +final class xhprof_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; diff --git a/lib/tests/xmlize_test.php b/lib/tests/xmlize_test.php index cfdfb33be72..8842c426579 100644 --- a/lib/tests/xmlize_test.php +++ b/lib/tests/xmlize_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/xmlize.php'); * @copyright 2017 Kilian Singer {@link http://quantumtechnology.info} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xmlize_test extends \basic_testcase { +final class xmlize_test extends \basic_testcase { /** * Test an XML import using a valid XML file. * diff --git a/lib/userkey/tests/privacy/provider_test.php b/lib/userkey/tests/privacy/provider_test.php index 8eeeaf526b0..82cd88be508 100644 --- a/lib/userkey/tests/privacy/provider_test.php +++ b/lib/userkey/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_userkey\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Export for a user with no keys in the specified instance will not have any data exported. */ diff --git a/lib/xapi/tests/external/post_statement_test.php b/lib/xapi/tests/external/post_statement_test.php index c3118bca97c..5cda2d089c4 100644 --- a/lib/xapi/tests/external/post_statement_test.php +++ b/lib/xapi/tests/external/post_statement_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class post_statement_test extends externallib_advanced_testcase { +final class post_statement_test extends externallib_advanced_testcase { /** @var test_helper for generating valid xapi statements. */ private $testhelper; diff --git a/lib/xapi/tests/handler_test.php b/lib/xapi/tests/handler_test.php index 7abdebf20aa..5311b047549 100644 --- a/lib/xapi/tests/handler_test.php +++ b/lib/xapi/tests/handler_test.php @@ -42,7 +42,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class handler_test extends advanced_testcase { +final class handler_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/iri_test.php b/lib/xapi/tests/iri_test.php index 0e85b92f496..7687d1d160c 100644 --- a/lib/xapi/tests/iri_test.php +++ b/lib/xapi/tests/iri_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class iri_test extends advanced_testcase { +final class iri_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/local/statement/item_activity_test.php b/lib/xapi/tests/local/statement/item_activity_test.php index 60a8a815cc3..89428b2a095 100644 --- a/lib/xapi/tests/local/statement/item_activity_test.php +++ b/lib/xapi/tests/local/statement/item_activity_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_activity_test extends advanced_testcase { +final class item_activity_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_actor_test.php b/lib/xapi/tests/local/statement/item_actor_test.php index eae47d5ec04..0f4d01e21a9 100644 --- a/lib/xapi/tests/local/statement/item_actor_test.php +++ b/lib/xapi/tests/local/statement/item_actor_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_actor_test extends advanced_testcase { +final class item_actor_test extends advanced_testcase { /** * Test item creation with agent. diff --git a/lib/xapi/tests/local/statement/item_agent_test.php b/lib/xapi/tests/local/statement/item_agent_test.php index 7e17eeeab4e..c986baa3591 100644 --- a/lib/xapi/tests/local/statement/item_agent_test.php +++ b/lib/xapi/tests/local/statement/item_agent_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_agent_test extends advanced_testcase { +final class item_agent_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_attachment_test.php b/lib/xapi/tests/local/statement/item_attachment_test.php index 74e90e1d79d..ca4e8c00671 100644 --- a/lib/xapi/tests/local/statement/item_attachment_test.php +++ b/lib/xapi/tests/local/statement/item_attachment_test.php @@ -36,7 +36,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_attachment_test extends advanced_testcase { +final class item_attachment_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_context_test.php b/lib/xapi/tests/local/statement/item_context_test.php index d48a1da78e9..9fa3a04acd1 100644 --- a/lib/xapi/tests/local/statement/item_context_test.php +++ b/lib/xapi/tests/local/statement/item_context_test.php @@ -35,7 +35,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_context_test extends advanced_testcase { +final class item_context_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_definition_test.php b/lib/xapi/tests/local/statement/item_definition_test.php index cbc2a52b9b2..fddd1966cb4 100644 --- a/lib/xapi/tests/local/statement/item_definition_test.php +++ b/lib/xapi/tests/local/statement/item_definition_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_definition_test extends advanced_testcase { +final class item_definition_test extends advanced_testcase { /** * Test item_definition creation. diff --git a/lib/xapi/tests/local/statement/item_group_test.php b/lib/xapi/tests/local/statement/item_group_test.php index b7bef6d34a5..5de06028ef4 100644 --- a/lib/xapi/tests/local/statement/item_group_test.php +++ b/lib/xapi/tests/local/statement/item_group_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_group_test extends advanced_testcase { +final class item_group_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_object_test.php b/lib/xapi/tests/local/statement/item_object_test.php index a9de796cfe2..bbea08f2ae7 100644 --- a/lib/xapi/tests/local/statement/item_object_test.php +++ b/lib/xapi/tests/local/statement/item_object_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_object_test extends advanced_testcase { +final class item_object_test extends advanced_testcase { /** * Test item creation with agent. diff --git a/lib/xapi/tests/local/statement/item_result_test.php b/lib/xapi/tests/local/statement/item_result_test.php index b061548581e..621335cf176 100644 --- a/lib/xapi/tests/local/statement/item_result_test.php +++ b/lib/xapi/tests/local/statement/item_result_test.php @@ -35,7 +35,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_result_test extends advanced_testcase { +final class item_result_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_score_test.php b/lib/xapi/tests/local/statement/item_score_test.php index cf6e8f0d470..a33d8260dbe 100644 --- a/lib/xapi/tests/local/statement/item_score_test.php +++ b/lib/xapi/tests/local/statement/item_score_test.php @@ -35,7 +35,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_score_test extends advanced_testcase { +final class item_score_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_test.php b/lib/xapi/tests/local/statement/item_test.php index b3bec363969..754b5b1b1ef 100644 --- a/lib/xapi/tests/local/statement/item_test.php +++ b/lib/xapi/tests/local/statement/item_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_test extends advanced_testcase { +final class item_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_verb_test.php b/lib/xapi/tests/local/statement/item_verb_test.php index 07892e95edb..0704b1777f1 100644 --- a/lib/xapi/tests/local/statement/item_verb_test.php +++ b/lib/xapi/tests/local/statement/item_verb_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_verb_test extends advanced_testcase { +final class item_verb_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement_test.php b/lib/xapi/tests/local/statement_test.php index c8c1d110b93..3efdef30c00 100644 --- a/lib/xapi/tests/local/statement_test.php +++ b/lib/xapi/tests/local/statement_test.php @@ -49,7 +49,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statement_test extends advanced_testcase { +final class statement_test extends advanced_testcase { /** * Returns a valid item for a specific attribute. diff --git a/login/tests/login_lib_test.php b/login/tests/login_lib_test.php index 041bd4dde38..7c67611c6ca 100644 --- a/login/tests/login_lib_test.php +++ b/login/tests/login_lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/login/lib.php'); * @copyright 2017 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class login_lib_test extends \advanced_testcase { +final class login_lib_test extends \advanced_testcase { public function test_core_login_process_password_reset_one_time_without_username_protection() { global $CFG; diff --git a/media/player/html5audio/tests/player_test.php b/media/player/html5audio/tests/player_test.php index b5285cb23a9..29d2c338e70 100644 --- a/media/player/html5audio/tests/player_test.php +++ b/media/player/html5audio/tests/player_test.php @@ -26,7 +26,7 @@ use media_html5audio_plugin; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/html5video/tests/player_test.php b/media/player/html5video/tests/player_test.php index 302f194a5f5..0e3e9aa6064 100644 --- a/media/player/html5video/tests/player_test.php +++ b/media/player/html5video/tests/player_test.php @@ -26,7 +26,7 @@ use media_html5video_plugin; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/videojs/tests/player_test.php b/media/player/videojs/tests/player_test.php index 079f2cfe71f..f1ea272c7b0 100644 --- a/media/player/videojs/tests/player_test.php +++ b/media/player/videojs/tests/player_test.php @@ -36,7 +36,7 @@ use moodle_url; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/vimeo/tests/player_test.php b/media/player/vimeo/tests/player_test.php index 041af3129c5..94185f7c611 100644 --- a/media/player/vimeo/tests/player_test.php +++ b/media/player/vimeo/tests/player_test.php @@ -25,7 +25,7 @@ use core_media_manager; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/youtube/tests/player_test.php b/media/player/youtube/tests/player_test.php index d50ec85f28d..294bd6de92e 100644 --- a/media/player/youtube/tests/player_test.php +++ b/media/player/youtube/tests/player_test.php @@ -25,7 +25,7 @@ use core_media_manager; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/message/output/airnotifier/tests/externallib_test.php b/message/output/airnotifier/tests/externallib_test.php index 218c603b117..39c7520a2ec 100644 --- a/message/output/airnotifier/tests/externallib_test.php +++ b/message/output/airnotifier/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2012 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Tests set up diff --git a/message/output/airnotifier/tests/manager_test.php b/message/output/airnotifier/tests/manager_test.php index 95d578aa30a..fd06f35a35e 100644 --- a/message/output/airnotifier/tests/manager_test.php +++ b/message/output/airnotifier/tests/manager_test.php @@ -26,7 +26,7 @@ use message_airnotifier_manager; * @copyright 2020 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** Test check_configuration by default **/ public function test_check_configuration_default() { diff --git a/message/output/airnotifier/tests/privacy/provider_test.php b/message/output/airnotifier/tests/privacy/provider_test.php index 87b638e71d8..1a4ca4ba45d 100644 --- a/message/output/airnotifier/tests/privacy/provider_test.php +++ b/message/output/airnotifier/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/message/output/email/tests/event_observers_test.php b/message/output/email/tests/event_observers_test.php index 13f612ee934..d1f07d0a56b 100644 --- a/message/output/email/tests/event_observers_test.php +++ b/message/output/email/tests/event_observers_test.php @@ -24,7 +24,7 @@ namespace message_email; * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_observers_test extends \advanced_testcase { +final class event_observers_test extends \advanced_testcase { /** * Test the message viewed event observer. diff --git a/message/output/email/tests/privacy/provider_test.php b/message/output/email/tests/privacy/provider_test.php index e7c0e6c9f88..0abc709c634 100644 --- a/message/output/email/tests/privacy/provider_test.php +++ b/message/output/email/tests/privacy/provider_test.php @@ -29,7 +29,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. */ diff --git a/message/output/email/tests/task/send_email_test.php b/message/output/email/tests/task/send_email_test.php index b8a19775156..8fad5bdc8ed 100644 --- a/message/output/email/tests/task/send_email_test.php +++ b/message/output/email/tests/task/send_email_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class send_email_test extends \advanced_testcase { +final class send_email_test extends \advanced_testcase { /** * Test sending email task. diff --git a/message/output/popup/tests/api_test.php b/message/output/popup/tests/api_test.php index df6371c15a9..f548c4ebb59 100644 --- a/message/output/popup/tests/api_test.php +++ b/message/output/popup/tests/api_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/message/output/popup/tests/base.php'); * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { use \message_popup_test_helper; /** diff --git a/message/output/popup/tests/externallib_test.php b/message/output/popup/tests/externallib_test.php index 5e5d4b33729..bfb5da9928c 100644 --- a/message/output/popup/tests/externallib_test.php +++ b/message/output/popup/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/message/output/popup/tests/base.php'); * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends \advanced_testcase { +final class externallib_test extends \advanced_testcase { use message_popup_test_helper; /** diff --git a/message/output/popup/tests/messaging_cleanup_test.php b/message/output/popup/tests/messaging_cleanup_test.php index 53c9742cafc..1085afcc700 100644 --- a/message/output/popup/tests/messaging_cleanup_test.php +++ b/message/output/popup/tests/messaging_cleanup_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/message/output/popup/tests/base.php'); * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class messaging_cleanup_test extends \advanced_testcase { +final class messaging_cleanup_test extends \advanced_testcase { // Helper trait for sending fake popup notifications. use message_popup_test_helper; diff --git a/message/tests/external/get_unread_notification_count_test.php b/message/tests/external/get_unread_notification_count_test.php index feef3c20f04..69badab50a3 100644 --- a/message/tests/external/get_unread_notification_count_test.php +++ b/message/tests/external/get_unread_notification_count_test.php @@ -34,7 +34,7 @@ use \core_message\tests\helper as testhelper; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 4.0 */ -class get_unread_notification_count_test extends externallib_advanced_testcase { +final class get_unread_notification_count_test extends externallib_advanced_testcase { /** * get_unread_notification should throw an exception for an invalid user. diff --git a/message/tests/externallib_test.php b/message/tests/externallib_test.php index 99a477550ed..bd0c984719c 100644 --- a/message/tests/externallib_test.php +++ b/message/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/message/externallib.php'); * @copyright 2012 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Tests set up diff --git a/message/tests/helper_test.php b/message/tests/helper_test.php index af66d381c34..1d13568ee5c 100644 --- a/message/tests/helper_test.php +++ b/message/tests/helper_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_message\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(true); diff --git a/message/tests/inbound_test.php b/message/tests/inbound_test.php index 1fe6ed972e3..dc6a191f635 100644 --- a/message/tests/inbound_test.php +++ b/message/tests/inbound_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/fixtures/inbound_fixtures.php'); * @copyright 2014 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class inbound_test extends \advanced_testcase { +final class inbound_test extends \advanced_testcase { /** * Perform setup tasks generic to each test. diff --git a/message/tests/privacy/provider_test.php b/message/tests/privacy/provider_test.php index 9863c5906b3..7505ff7413f 100644 --- a/message/tests/privacy/provider_test.php +++ b/message/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_metadata(). diff --git a/message/tests/search_received_test.php b/message/tests/search_received_test.php index c2fbaf7f92c..ab58fb11633 100644 --- a/message/tests/search_received_test.php +++ b/message/tests/search_received_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_received_test extends \advanced_testcase { +final class search_received_test extends \advanced_testcase { /** * @var string Area id diff --git a/message/tests/search_sent_test.php b/message/tests/search_sent_test.php index d81500499f2..9ac50b8d1ee 100644 --- a/message/tests/search_sent_test.php +++ b/message/tests/search_sent_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_sent_test extends \advanced_testcase { +final class search_sent_test extends \advanced_testcase { /** * @var string Area id diff --git a/message/tests/task/migrate_message_data_test.php b/message/tests/task/migrate_message_data_test.php index 15b19de8fc4..814f34a8578 100644 --- a/message/tests/task/migrate_message_data_test.php +++ b/message/tests/task/migrate_message_data_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class migrate_message_data_test extends \advanced_testcase { +final class migrate_message_data_test extends \advanced_testcase { /** * Test set up. diff --git a/mnet/service/enrol/tests/privacy/provider_test.php b/mnet/service/enrol/tests/privacy/provider_test.php index 55b9239eacb..a265b27de5c 100644 --- a/mnet/service/enrol/tests/privacy/provider_test.php +++ b/mnet/service/enrol/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass the mnet host we are using to test. */ protected $mnethost; diff --git a/mnet/tests/event/events_test.php b/mnet/tests/event/events_test.php index d662d51e995..2398a582d09 100644 --- a/mnet/tests/event/events_test.php +++ b/mnet/tests/event/events_test.php @@ -31,7 +31,7 @@ global $CFG; require_once($CFG->dirroot . '/mnet/lib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass the mnet host we are using to test */ protected $mnethost; diff --git a/mod/assign/feedback/comments/tests/feedback_test.php b/mod/assign/feedback/comments/tests/feedback_test.php index fc67a5dece1..91f008139dd 100644 --- a/mod/assign/feedback/comments/tests/feedback_test.php +++ b/mod/assign/feedback/comments/tests/feedback_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/comments/tests/privacy/provider_test.php b/mod/assign/feedback/comments/tests/privacy/provider_test.php index 19685771315..8b0d2bf3a75 100644 --- a/mod/assign/feedback/comments/tests/privacy/provider_test.php +++ b/mod/assign/feedback/comments/tests/privacy/provider_test.php @@ -14,20 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Unit tests for assignfeedback_comments. - * - * @package assignfeedback_comments - * @copyright 2018 Adrian Greeve - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ namespace assignfeedback_comments\privacy; -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->dirroot . '/mod/assign/locallib.php'); -require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); +use mod_assign\tests\provider_testcase; /** * Unit tests for mod/assign/feedback/comments/classes/privacy/ @@ -35,8 +24,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { - +final class provider_test extends provider_testcase { /** * Convenience function for creating feedback data. * diff --git a/mod/assign/feedback/editpdf/tests/feedback_test.php b/mod/assign/feedback/editpdf/tests/feedback_test.php index a3e309c140c..aab860b44d9 100644 --- a/mod/assign/feedback/editpdf/tests/feedback_test.php +++ b/mod/assign/feedback/editpdf/tests/feedback_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/editpdf/tests/privacy/provider_test.php b/mod/assign/feedback/editpdf/tests/privacy/provider_test.php index 0b6f8b9d4ea..39cdaba1bf3 100644 --- a/mod/assign/feedback/editpdf/tests/privacy/provider_test.php +++ b/mod/assign/feedback/editpdf/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use mod_assign\privacy\assign_plugin_request_data; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { public function setUp(): void { // Skip this test if ghostscript is not supported. diff --git a/mod/assign/feedback/file/tests/feedback_test.php b/mod/assign/feedback/file/tests/feedback_test.php index 02881e2d694..f5aee3d85f3 100644 --- a/mod/assign/feedback/file/tests/feedback_test.php +++ b/mod/assign/feedback/file/tests/feedback_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/file/tests/importziplib_test.php b/mod/assign/feedback/file/tests/importziplib_test.php index 1c19d71d350..cf377d894f9 100644 --- a/mod/assign/feedback/file/tests/importziplib_test.php +++ b/mod/assign/feedback/file/tests/importziplib_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/feedback/file/importziplib.php'); * @copyright 2020 Eric Merrill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class importziplib_test extends \advanced_testcase { +final class importziplib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/file/tests/privacy/provider_test.php b/mod/assign/feedback/file/tests/privacy/provider_test.php index 96928247662..3b849dfed4f 100644 --- a/mod/assign/feedback/file/tests/privacy/provider_test.php +++ b/mod/assign/feedback/file/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use mod_assign\privacy\assign_plugin_request_data; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/comments/tests/event/events_test.php b/mod/assign/submission/comments/tests/event/events_test.php index da99dd3cb3a..312973ad529 100644 --- a/mod/assign/submission/comments/tests/event/events_test.php +++ b/mod/assign/submission/comments/tests/event/events_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/comments/tests/privacy/provider_test.php b/mod/assign/submission/comments/tests/privacy/provider_test.php index 3963c50b458..54f6aa75e7b 100644 --- a/mod/assign/submission/comments/tests/privacy/provider_test.php +++ b/mod/assign/submission/comments/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use mod_assign\privacy\useridlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/file/tests/event/events_test.php b/mod/assign/submission/file/tests/event/events_test.php index bb5739663da..03472c7f2d3 100644 --- a/mod/assign/submission/file/tests/event/events_test.php +++ b/mod/assign/submission/file/tests/event/events_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/file/tests/privacy/provider_test.php b/mod/assign/submission/file/tests/privacy/provider_test.php index 8b127bb95a2..ee2b1713286 100644 --- a/mod/assign/submission/file/tests/privacy/provider_test.php +++ b/mod/assign/submission/file/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/onlinetext/tests/event/events_test.php b/mod/assign/submission/onlinetext/tests/event/events_test.php index 15f6cc8106f..94abb5ac353 100644 --- a/mod/assign/submission/onlinetext/tests/event/events_test.php +++ b/mod/assign/submission/onlinetext/tests/event/events_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/onlinetext/tests/locallib_test.php b/mod/assign/submission/onlinetext/tests/locallib_test.php index 32c91b29394..ef00cb4d0cd 100644 --- a/mod/assign/submission/onlinetext/tests/locallib_test.php +++ b/mod/assign/submission/onlinetext/tests/locallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/onlinetext/tests/privacy/provider_test.php b/mod/assign/submission/onlinetext/tests/privacy/provider_test.php index 3535e23451d..41055fc0b64 100644 --- a/mod/assign/submission/onlinetext/tests/privacy/provider_test.php +++ b/mod/assign/submission/onlinetext/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/tests/backup/restore_date_test.php b/mod/assign/tests/backup/restore_date_test.php index 8bef5625a7a..22b20e917c4 100644 --- a/mod/assign/tests/backup/restore_date_test.php +++ b/mod/assign/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/fixtures/testable_assign.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/assign/tests/base_test.php b/mod/assign/tests/base_test.php index 6d97dfe2d24..ed09f5b37ae 100644 --- a/mod/assign/tests/base_test.php +++ b/mod/assign/tests/base_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/fixtures/testable_assign.php'); * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** @const Default number of students to create */ const DEFAULT_STUDENT_COUNT = 3; diff --git a/mod/assign/tests/classes/provider_testcase.php b/mod/assign/tests/classes/provider_testcase.php new file mode 100644 index 00000000000..f39d8fcadf9 --- /dev/null +++ b/mod/assign/tests/classes/provider_testcase.php @@ -0,0 +1,69 @@ +. + +namespace mod_assign\tests; + +/** + * TODO describe file provider_testcase + * + * @package mod_assign + * @copyright 2024 Andrew Lyons + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +abstract class provider_testcase extends \core_privacy\tests\provider_testcase { + #[\Override] + public static function setUpBeforeClass(): void { + global $CFG; + + parent::setUpBeforeClass(); + + require_once($CFG->dirroot . '/mod/assign/locallib.php'); + } + + /** + * Convenience method for creating a submission. + * + * @param assign $assign The assign object + * @param stdClass $user The user object + * @param string $submissiontext Submission text + * @param integer $attemptnumber The attempt number + * @return object A submission object. + */ + protected function create_submission($assign, $user, $submissiontext, $attemptnumber = 0) { + $submission = $assign->get_user_submission($user->id, true, $attemptnumber); + $submission->onlinetext_editor = ['text' => $submissiontext, + 'format' => FORMAT_MOODLE]; + + $this->setUser($user); + $notices = []; + $assign->save_submission($submission, $notices); + return $submission; + } + + /** + * Convenience function to create an instance of an assignment. + * + * @param array $params Array of parameters to pass to the generator + * @return assign The assign class. + */ + protected function create_instance($params = array()) { + $generator = $this->getDataGenerator()->get_plugin_generator('mod_assign'); + $instance = $generator->create_instance($params); + $cm = get_coursemodule_from_instance('assign', $instance->id); + $context = \context_module::instance($cm->id); + return new \assign($context, $cm, $params['course']); + } +} diff --git a/mod/assign/tests/custom_completion_test.php b/mod/assign/tests/custom_completion_test.php index 81362931719..f6ac006e9da 100644 --- a/mod/assign/tests/custom_completion_test.php +++ b/mod/assign/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { // Use the generator helper. use \mod_assign_test_generator; diff --git a/mod/assign/tests/dates_test.php b/mod/assign/tests/dates_test.php index 31b840c62b1..ba3f39db6ac 100644 --- a/mod/assign/tests/dates_test.php +++ b/mod/assign/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/assign/tests/downloader_test.php b/mod/assign/tests/downloader_test.php index 0340701d4c2..ac06a8c2904 100644 --- a/mod/assign/tests/downloader_test.php +++ b/mod/assign/tests/downloader_test.php @@ -28,7 +28,7 @@ use assign; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_assign\downloader */ -class downloader_test extends \advanced_testcase { +final class downloader_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/mod/assign/tests/event/events_test.php b/mod/assign/tests/event/events_test.php index c499948a296..25e939f2043 100644 --- a/mod/assign/tests/event/events_test.php +++ b/mod/assign/tests/event/events_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/mod/assign/locallib.php'); * @copyright 2014 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/external/start_submission_test.php b/mod/assign/tests/external/start_submission_test.php index 03b1fb355fd..dc04be4c061 100644 --- a/mod/assign/tests/external/start_submission_test.php +++ b/mod/assign/tests/external/start_submission_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/externallib_advanced_testcase.ph * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class start_submission_test extends \mod_assign\externallib_advanced_testcase { +final class start_submission_test extends \mod_assign\externallib_advanced_testcase { /** @var \stdClass $course New course created to hold the assignments */ protected $course = null; diff --git a/mod/assign/tests/externallib_test.php b/mod/assign/tests/externallib_test.php index bda52f2b5b9..3aaf5286b8f 100644 --- a/mod/assign/tests/externallib_test.php +++ b/mod/assign/tests/externallib_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/fixtures/testable_assign.php'); * @copyright 2012 Paul Charsley * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends \mod_assign\externallib_advanced_testcase { +final class externallib_test extends \mod_assign\externallib_advanced_testcase { /** * Test get_grades diff --git a/mod/assign/tests/feedback_test.php b/mod/assign/tests/feedback_test.php index 1196fbcfda7..ea5518eef22 100644 --- a/mod/assign/tests/feedback_test.php +++ b/mod/assign/tests/feedback_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2019 Ilya Tregubov ilyatregubov@catalyst-au.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/lib_test.php b/mod/assign/tests/lib_test.php index 0b97b37df0e..6845fb28f3d 100644 --- a/mod/assign/tests/lib_test.php +++ b/mod/assign/tests/lib_test.php @@ -41,7 +41,7 @@ use mod_assign_test_generator; * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/locallib_participants_test.php b/mod/assign/tests/locallib_participants_test.php index 7656238ac7f..eb7bb7fd190 100644 --- a/mod/assign/tests/locallib_participants_test.php +++ b/mod/assign/tests/locallib_participants_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_participants_test extends \advanced_testcase { +final class locallib_participants_test extends \advanced_testcase { use mod_assign_test_generator; public function test_list_participants_blind_marking() { diff --git a/mod/assign/tests/markerallocation_test.php b/mod/assign/tests/markerallocation_test.php index 41660dc2546..5a35aab3c4e 100644 --- a/mod/assign/tests/markerallocation_test.php +++ b/mod/assign/tests/markerallocation_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2017 Andrés Melo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class markerallocation_test extends \advanced_testcase { +final class markerallocation_test extends \advanced_testcase { /** * Create all the needed elements to test the difference between both functions. diff --git a/mod/assign/tests/portfolio_caller_test.php b/mod/assign/tests/portfolio_caller_test.php index 2d3bc9cd099..1f4149d6b92 100644 --- a/mod/assign/tests/portfolio_caller_test.php +++ b/mod/assign/tests/portfolio_caller_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/group/lib.php'); * @copyright Brendan Cox * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** * Test an assignment file is loaded for a user who submitted it. diff --git a/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php b/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php index 3189ba7b1c6..b363647bf6b 100644 --- a/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php +++ b/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/feedback/comments/locallib.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_legacy_polyfill_test extends \advanced_testcase { +final class feedback_legacy_polyfill_test extends \advanced_testcase { /** * Convenience function to create an instance of an assignment. diff --git a/mod/assign/tests/privacy/provider_test.php b/mod/assign/tests/privacy/provider_test.php index a3efabce75c..ca935aad238 100644 --- a/mod/assign/tests/privacy/provider_test.php +++ b/mod/assign/tests/privacy/provider_test.php @@ -24,15 +24,10 @@ namespace mod_assign\privacy; -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->dirroot . '/mod/assign/locallib.php'); - -use core_privacy\tests\provider_testcase; use core_privacy\local\request\writer; use core_privacy\local\request\approved_contextlist; use mod_assign\privacy\provider; +use mod_assign\tests\provider_testcase; /** * Unit tests for mod/assign/classes/privacy/ @@ -41,41 +36,6 @@ use mod_assign\privacy\provider; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider_test extends provider_testcase { - - /** - * Convenience method for creating a submission. - * - * @param assign $assign The assign object - * @param stdClass $user The user object - * @param string $submissiontext Submission text - * @param integer $attemptnumber The attempt number - * @return object A submission object. - */ - protected function create_submission($assign, $user, $submissiontext, $attemptnumber = 0) { - $submission = $assign->get_user_submission($user->id, true, $attemptnumber); - $submission->onlinetext_editor = ['text' => $submissiontext, - 'format' => FORMAT_MOODLE]; - - $this->setUser($user); - $notices = []; - $assign->save_submission($submission, $notices); - return $submission; - } - - /** - * Convenience function to create an instance of an assignment. - * - * @param array $params Array of parameters to pass to the generator - * @return assign The assign class. - */ - protected function create_instance($params = array()) { - $generator = $this->getDataGenerator()->get_plugin_generator('mod_assign'); - $instance = $generator->create_instance($params); - $cm = get_coursemodule_from_instance('assign', $instance->id); - $context = \context_module::instance($cm->id); - return new \assign($context, $cm, $params['course']); - } - /** * Test that getting the contexts for a user works. */ diff --git a/mod/assign/tests/privacy/submission_legacy_polyfill_test.php b/mod/assign/tests/privacy/submission_legacy_polyfill_test.php index 5a91de789b1..cacddd78cfe 100644 --- a/mod/assign/tests/privacy/submission_legacy_polyfill_test.php +++ b/mod/assign/tests/privacy/submission_legacy_polyfill_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/submission/comments/locallib.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class submission_legacy_polyfill_test extends \advanced_testcase { +final class submission_legacy_polyfill_test extends \advanced_testcase { /** * Convenience function to create an instance of an assignment. diff --git a/mod/assign/tests/search/search_test.php b/mod/assign/tests/search/search_test.php index d5e3cc8fb70..3950398ee54 100644 --- a/mod/assign/tests/search/search_test.php +++ b/mod/assign/tests/search/search_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/locallib.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test for assign file attachments. diff --git a/mod/bigbluebuttonbn/tests/backup_restore_test.php b/mod/bigbluebuttonbn/tests/backup_restore_test.php index 84bbf28ce28..9fcf4ae5c68 100644 --- a/mod/bigbluebuttonbn/tests/backup_restore_test.php +++ b/mod/bigbluebuttonbn/tests/backup_restore_test.php @@ -43,7 +43,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @covers \backup_bigbluebuttonbn_activity_task * @covers \restore_bigbluebuttonbn_activity_task */ -class backup_restore_test extends restore_date_testcase { +final class backup_restore_test extends restore_date_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/completion/completion_test.php b/mod/bigbluebuttonbn/tests/completion/completion_test.php index c39061400ef..3ec6a46bdfb 100644 --- a/mod/bigbluebuttonbn/tests/completion/completion_test.php +++ b/mod/bigbluebuttonbn/tests/completion/completion_test.php @@ -33,7 +33,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\completion\custom_completion */ -class completion_test extends \advanced_testcase { +final class completion_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/can_join_test.php b/mod/bigbluebuttonbn/tests/external/can_join_test.php index 477e1bf84c4..727b609cb32 100644 --- a/mod/bigbluebuttonbn/tests/external/can_join_test.php +++ b/mod/bigbluebuttonbn/tests/external/can_join_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_bigbluebuttonbn\external\can_join */ -class can_join_test extends \externallib_advanced_testcase { +final class can_join_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** * Setup for test diff --git a/mod/bigbluebuttonbn/tests/external/completion_validate_test.php b/mod/bigbluebuttonbn/tests/external/completion_validate_test.php index 1183a60eaec..c82168e2b67 100644 --- a/mod/bigbluebuttonbn/tests/external/completion_validate_test.php +++ b/mod/bigbluebuttonbn/tests/external/completion_validate_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\external\completion_validate */ -class completion_validate_test extends \externallib_advanced_testcase { +final class completion_validate_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/end_meeting_test.php b/mod/bigbluebuttonbn/tests/external/end_meeting_test.php index 491b8867468..bb56f67927a 100644 --- a/mod/bigbluebuttonbn/tests/external/end_meeting_test.php +++ b/mod/bigbluebuttonbn/tests/external/end_meeting_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_bigbluebuttonbn\external\end_meeting */ -class end_meeting_test extends \externallib_advanced_testcase { +final class end_meeting_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** * Setup for test diff --git a/mod/bigbluebuttonbn/tests/external/get_bigbluebuttons_by_courses_test.php b/mod/bigbluebuttonbn/tests/external/get_bigbluebuttons_by_courses_test.php index ac4f22ac4fe..5004e9878f3 100644 --- a/mod/bigbluebuttonbn/tests/external/get_bigbluebuttons_by_courses_test.php +++ b/mod/bigbluebuttonbn/tests/external/get_bigbluebuttons_by_courses_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\external\get_bigbluebuttonbns_by_courses */ -class get_bigbluebuttons_by_courses_test extends \externallib_advanced_testcase { +final class get_bigbluebuttons_by_courses_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/get_join_url_test.php b/mod/bigbluebuttonbn/tests/external/get_join_url_test.php index c7591ff7502..c04fb59806c 100644 --- a/mod/bigbluebuttonbn/tests/external/get_join_url_test.php +++ b/mod/bigbluebuttonbn/tests/external/get_join_url_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\external\get_join_url */ -class get_join_url_test extends \externallib_advanced_testcase { +final class get_join_url_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/get_recordings_test.php b/mod/bigbluebuttonbn/tests/external/get_recordings_test.php index 4d7ab3391c4..6de11e49fab 100644 --- a/mod/bigbluebuttonbn/tests/external/get_recordings_test.php +++ b/mod/bigbluebuttonbn/tests/external/get_recordings_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\external\get_recordings */ -class get_recordings_test extends \externallib_advanced_testcase { +final class get_recordings_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_test.php b/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_test.php index 3cfbb90efa0..116f8c2caf0 100644 --- a/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_test.php +++ b/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\external\view_bigbluebuttonbn */ -class view_bigbluebuttonbn_test extends \externallib_advanced_testcase { +final class view_bigbluebuttonbn_test extends \externallib_advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/instance_test.php b/mod/bigbluebuttonbn/tests/instance_test.php index 4af1cfd49f5..97c825ff584 100644 --- a/mod/bigbluebuttonbn/tests/instance_test.php +++ b/mod/bigbluebuttonbn/tests/instance_test.php @@ -34,7 +34,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_bigbluebuttonbn\instance */ -class instance_test extends advanced_testcase { +final class instance_test extends advanced_testcase { /** * Test get from diff --git a/mod/bigbluebuttonbn/tests/lib_test.php b/mod/bigbluebuttonbn/tests/lib_test.php index b54be9fee76..15c71c0a8f2 100644 --- a/mod/bigbluebuttonbn/tests/lib_test.php +++ b/mod/bigbluebuttonbn/tests/lib_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/bigbluebuttonbn/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Laurent David (laurent@call-learning.fr) */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php b/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php index 64a990f0cd9..22a7ed18a45 100644 --- a/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php +++ b/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php @@ -25,7 +25,7 @@ namespace mod_bigbluebuttonbn\local\bigbluebutton\recordings; * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) * @coversDefaultClass \mod_bigbluebuttonbn\local\bigbluebutton\recordings\recording_data */ -class recording_data_test extends \advanced_testcase { +final class recording_data_test extends \advanced_testcase { /** * Test for the type_text provider. diff --git a/mod/bigbluebuttonbn/tests/local/helpers/files_test.php b/mod/bigbluebuttonbn/tests/local/helpers/files_test.php index 7b543bdbd23..2c826d0c169 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/files_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/files_test.php @@ -43,7 +43,7 @@ use stored_file; * @covers \mod_bigbluebuttonbn\local\helpers\files * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\files */ -class files_test extends \advanced_testcase { +final class files_test extends \advanced_testcase { use testcase_helper_trait; /** @var string Filename used for the presentation */ diff --git a/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php b/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php index 6656a0897b0..bac3864d9ce 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php @@ -38,7 +38,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\mod_helper * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\mod_helper */ -class mod_helper_trait_test extends \advanced_testcase { +final class mod_helper_trait_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php b/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php index 56badc085fc..09fefe76d10 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php @@ -38,7 +38,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\reset * @covers \mod_bigbluebuttonbn\local\helpers\reset */ -class reset_test extends \advanced_testcase { +final class reset_test extends \advanced_testcase { use testcase_helper_trait; /** * Reset course item test diff --git a/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php b/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php index cd447e6eb70..5acdccbad99 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\roles * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\roles */ -class roles_test extends \advanced_testcase { +final class roles_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php b/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php index 1334a2d9863..68d950ffb27 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\user_info * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\user_info */ -class user_info_test extends \advanced_testcase { +final class user_info_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php b/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php index 789f80c457d..0d0b1fb3afc 100644 --- a/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php +++ b/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy * @coversDefaultClass \mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy */ -class bigbluebutton_proxy_test extends \advanced_testcase { +final class bigbluebutton_proxy_test extends \advanced_testcase { /** * Test poll interval value * diff --git a/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php b/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php index e50dd4a1c0e..834fecf3def 100644 --- a/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php +++ b/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\proxy\recording_proxy * @coversDefaultClass \mod_bigbluebuttonbn\local\proxy\recording_proxy */ -class recording_proxy_test extends \advanced_testcase { +final class recording_proxy_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/logger_test.php b/mod/bigbluebuttonbn/tests/logger_test.php index 51c8c63335e..595afab0b84 100644 --- a/mod/bigbluebuttonbn/tests/logger_test.php +++ b/mod/bigbluebuttonbn/tests/logger_test.php @@ -36,7 +36,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\logger * @coversDefaultClass \mod_bigbluebuttonbn\logger */ -class logger_test extends \advanced_testcase { +final class logger_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/meeting_test.php b/mod/bigbluebuttonbn/tests/meeting_test.php index f6fa0283767..cc567c191a5 100644 --- a/mod/bigbluebuttonbn/tests/meeting_test.php +++ b/mod/bigbluebuttonbn/tests/meeting_test.php @@ -37,7 +37,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\meeting * @coversDefaultClass \mod_bigbluebuttonbn\meeting */ -class meeting_test extends \advanced_testcase { +final class meeting_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php b/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php index e4e5a7044a0..9683a9670e1 100644 --- a/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php +++ b/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php @@ -28,7 +28,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Laurent David (laurent.david [at] call-learning [dt] fr) */ -class recording_row_playback_test extends \advanced_testcase { +final class recording_row_playback_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/plugin_test.php b/mod/bigbluebuttonbn/tests/plugin_test.php index 6e3fefbba60..22882fe964e 100644 --- a/mod/bigbluebuttonbn/tests/plugin_test.php +++ b/mod/bigbluebuttonbn/tests/plugin_test.php @@ -26,7 +26,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_bigbluebuttonbn\plugin */ -class plugin_test extends advanced_testcase { +final class plugin_test extends advanced_testcase { /** * Test html2text diff --git a/mod/bigbluebuttonbn/tests/privacy/provider_test.php b/mod/bigbluebuttonbn/tests/privacy/provider_test.php index ead70ad2930..7bdccd7830c 100644 --- a/mod/bigbluebuttonbn/tests/privacy/provider_test.php +++ b/mod/bigbluebuttonbn/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\userlist; * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) * @covers \mod_bigbluebuttonbn\privacy\provider */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_metadata(). diff --git a/mod/bigbluebuttonbn/tests/recording_test.php b/mod/bigbluebuttonbn/tests/recording_test.php index 8479a25cc1f..9f5657b6e9b 100644 --- a/mod/bigbluebuttonbn/tests/recording_test.php +++ b/mod/bigbluebuttonbn/tests/recording_test.php @@ -37,7 +37,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\recording * @coversDefaultClass \mod_bigbluebuttonbn\recording */ -class recording_test extends \advanced_testcase { +final class recording_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/search_test.php b/mod/bigbluebuttonbn/tests/search_test.php index 3e3dfaa0ebe..3b9917e2a57 100644 --- a/mod/bigbluebuttonbn/tests/search_test.php +++ b/mod/bigbluebuttonbn/tests/search_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @covers \mod_bigbluebuttonbn\search\tags * @covers \mod_bigbluebuttonbn\search\activity */ -class search_test extends advanced_testcase { +final class search_test extends advanced_testcase { use testcase_helper_trait; /** * @var string Area id diff --git a/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php b/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php index fd9320d6377..bf0a055a549 100644 --- a/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php +++ b/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php @@ -27,7 +27,7 @@ use advanced_testcase; * @covers \mod_bigbluebuttonbn\task\base_send_notification * @coversDefaultClass \mod_bigbluebuttonbn\task\base_send_notification */ -class base_send_notification_test extends advanced_testcase { +final class base_send_notification_test extends advanced_testcase { /** * Check if set instance ID works correctly * diff --git a/mod/bigbluebuttonbn/tests/task/check_recordings_task_test.php b/mod/bigbluebuttonbn/tests/task/check_recordings_task_test.php index 9ccea2b05bb..4783d57c02f 100644 --- a/mod/bigbluebuttonbn/tests/task/check_recordings_task_test.php +++ b/mod/bigbluebuttonbn/tests/task/check_recordings_task_test.php @@ -31,7 +31,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\task\check_pending_recordings * @covers \mod_bigbluebuttonbn\recording::sync_pending_recordings_from_server */ -class check_recordings_task_test extends advanced_testcase { +final class check_recordings_task_test extends advanced_testcase { use testcase_helper_trait; diff --git a/mod/bigbluebuttonbn/tests/task/send_guest_emails_test.php b/mod/bigbluebuttonbn/tests/task/send_guest_emails_test.php index 292f8d10614..46543578614 100644 --- a/mod/bigbluebuttonbn/tests/task/send_guest_emails_test.php +++ b/mod/bigbluebuttonbn/tests/task/send_guest_emails_test.php @@ -27,7 +27,7 @@ use advanced_testcase; * @covers \mod_bigbluebuttonbn\task\send_guest_emails * @coversDefaultClass \mod_bigbluebuttonbn\task\send_guest_emails */ -class send_guest_emails_test extends advanced_testcase { +final class send_guest_emails_test extends advanced_testcase { /** * Check if set instance ID works correctly * diff --git a/mod/bigbluebuttonbn/tests/task/send_recording_ready_notification_test.php b/mod/bigbluebuttonbn/tests/task/send_recording_ready_notification_test.php index 2675a6cd6c3..72b4bf03989 100644 --- a/mod/bigbluebuttonbn/tests/task/send_recording_ready_notification_test.php +++ b/mod/bigbluebuttonbn/tests/task/send_recording_ready_notification_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @covers \mod_bigbluebuttonbn\task\base_send_notification * @covers \mod_bigbluebuttonbn\task\send_recording_ready_notification */ -class send_recording_ready_notification_test extends advanced_testcase { +final class send_recording_ready_notification_test extends advanced_testcase { /** * Test the sending of messages. */ diff --git a/mod/bigbluebuttonbn/tests/task/upgrade_recordings_task_test.php b/mod/bigbluebuttonbn/tests/task/upgrade_recordings_task_test.php index 28c05e81252..81a61b62136 100644 --- a/mod/bigbluebuttonbn/tests/task/upgrade_recordings_task_test.php +++ b/mod/bigbluebuttonbn/tests/task/upgrade_recordings_task_test.php @@ -31,7 +31,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_bigbluebuttonbn\task\upgrade_recordings_task */ -class upgrade_recordings_task_test extends advanced_testcase { +final class upgrade_recordings_task_test extends advanced_testcase { use testcase_helper_trait; diff --git a/mod/book/tests/event/events_test.php b/mod/book/tests/event/events_test.php index 0e7258856b8..0ade89c41a9 100644 --- a/mod/book/tests/event/events_test.php +++ b/mod/book/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_book\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tests/externallib_test.php b/mod/book/tests/externallib_test.php index 9508f647e57..25dea7fa6e8 100644 --- a/mod/book/tests/externallib_test.php +++ b/mod/book/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_book diff --git a/mod/book/tests/generator_test.php b/mod/book/tests/generator_test.php index 0debdff5cd8..324b689ea0f 100644 --- a/mod/book/tests/generator_test.php +++ b/mod/book/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_book; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/book/tests/helper_test.php b/mod/book/tests/helper_test.php index ac392dfef84..eb6b01fa591 100644 --- a/mod/book/tests/helper_test.php +++ b/mod/book/tests/helper_test.php @@ -21,7 +21,7 @@ namespace mod_book; * @copyright 2023 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test view_book diff --git a/mod/book/tests/lib_test.php b/mod/book/tests/lib_test.php index b679aaa34e9..936bfd5f4b8 100644 --- a/mod/book/tests/lib_test.php +++ b/mod/book/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/book/lib.php'); * @copyright 2015 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tests/search/search_test.php b/mod/book/tests/search/search_test.php index 80dc5884999..27709e29449 100644 --- a/mod/book/tests/search/search_test.php +++ b/mod/book/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/book/tool/exportimscp/tests/event/events_test.php b/mod/book/tool/exportimscp/tests/event/events_test.php index b1c2f51bcb9..861c9c61aaf 100644 --- a/mod/book/tool/exportimscp/tests/event/events_test.php +++ b/mod/book/tool/exportimscp/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace booktool_exportimscp\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tool/importhtml/tests/locallib_test.php b/mod/book/tool/importhtml/tests/locallib_test.php index c5b73ef7747..9e3ae1e75cd 100644 --- a/mod/book/tool/importhtml/tests/locallib_test.php +++ b/mod/book/tool/importhtml/tests/locallib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot.'/mod/book/tool/importhtml/locallib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tool/print/tests/event/events_test.php b/mod/book/tool/print/tests/event/events_test.php index 23929f8c66a..b5468845992 100644 --- a/mod/book/tool/print/tests/event/events_test.php +++ b/mod/book/tool/print/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace booktool_print\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/chat/tests/backup/restore_date_test.php b/mod/chat/tests/backup/restore_date_test.php index 89c9e0e5459..244407c2a55 100644 --- a/mod/chat/tests/backup/restore_date_test.php +++ b/mod/chat/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/chat/tests/event/events_test.php b/mod/chat/tests/event/events_test.php index 00aa1ec501b..228b37748ac 100644 --- a/mod/chat/tests/event/events_test.php +++ b/mod/chat/tests/event/events_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function test_message_sent() { global $DB; diff --git a/mod/chat/tests/externallib_test.php b/mod/chat/tests/externallib_test.php index 3219c8da2cd..2647ae3156a 100644 --- a/mod/chat/tests/externallib_test.php +++ b/mod/chat/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test login user diff --git a/mod/chat/tests/format_message_test.php b/mod/chat/tests/format_message_test.php index 3a27b0ec689..ab2268524ab 100644 --- a/mod/chat/tests/format_message_test.php +++ b/mod/chat/tests/format_message_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @copyright 2016 Andrew NIcols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_message_test extends \advanced_testcase { +final class format_message_test extends \advanced_testcase { const USER_CURRENT = 1; const USER_OTHER = 2; diff --git a/mod/chat/tests/generator_test.php b/mod/chat/tests/generator_test.php index 6a4a7f37eaf..b43898ed9eb 100644 --- a/mod/chat/tests/generator_test.php +++ b/mod/chat/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_chat; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/chat/tests/lib_test.php b/mod/chat/tests/lib_test.php index 006ff81be04..145ab31cff8 100644 --- a/mod/chat/tests/lib_test.php +++ b/mod/chat/tests/lib_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/chat/tests/privacy/provider_test.php b/mod/chat/tests/privacy/provider_test.php index 6fe54806be1..d672b86a12d 100644 --- a/mod/chat/tests/privacy/provider_test.php +++ b/mod/chat/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/choice/tests/backup/restore_date_test.php b/mod/choice/tests/backup/restore_date_test.php index bafc2f2e7a5..9a648b39b7f 100644 --- a/mod/choice/tests/backup/restore_date_test.php +++ b/mod/choice/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/choice/tests/custom_completion_test.php b/mod/choice/tests/custom_completion_test.php index 120d3e2f400..25814ded060 100644 --- a/mod/choice/tests/custom_completion_test.php +++ b/mod/choice/tests/custom_completion_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/choice/tests/dates_test.php b/mod/choice/tests/dates_test.php index dd6eab7d692..595757039e1 100644 --- a/mod/choice/tests/dates_test.php +++ b/mod/choice/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/choice/tests/event/events_test.php b/mod/choice/tests/event/events_test.php index 8d21ffe1db5..fecec604622 100644 --- a/mod/choice/tests/event/events_test.php +++ b/mod/choice/tests/event/events_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/choice/lib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var choice_object */ protected $choice; diff --git a/mod/choice/tests/externallib_test.php b/mod/choice/tests/externallib_test.php index 561ec87fdb9..7baf118a059 100644 --- a/mod/choice/tests/externallib_test.php +++ b/mod/choice/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/choice/lib.php'); * @copyright 2015 Costantino Cito * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_choice_results diff --git a/mod/choice/tests/generator_test.php b/mod/choice/tests/generator_test.php index 1e092cfc29b..a82d9b35c73 100644 --- a/mod/choice/tests/generator_test.php +++ b/mod/choice/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_choice; * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/choice/tests/lib_test.php b/mod/choice/tests/lib_test.php index e5251ef377f..40527f19efc 100644 --- a/mod/choice/tests/lib_test.php +++ b/mod/choice/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/mod/choice/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \externallib_advanced_testcase { +final class lib_test extends \externallib_advanced_testcase { /** * Test choice_view diff --git a/mod/choice/tests/privacy/provider_test.php b/mod/choice/tests/privacy/provider_test.php index 6a27b7c27b9..6e84da89ce2 100644 --- a/mod/choice/tests/privacy/provider_test.php +++ b/mod/choice/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; diff --git a/mod/data/tests/backup/restore_date_test.php b/mod/data/tests/backup/restore_date_test.php index 354862a0262..9689723a84b 100644 --- a/mod/data/tests/backup/restore_date_test.php +++ b/mod/data/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/data/tests/backup/restore_type_test.php b/mod/data/tests/backup/restore_type_test.php index f22777d934a..147bc008163 100644 --- a/mod/data/tests/backup/restore_type_test.php +++ b/mod/data/tests/backup/restore_type_test.php @@ -24,7 +24,7 @@ namespace mod_data\backup; * @copyright 2024 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_type_test extends \advanced_testcase { +final class restore_type_test extends \advanced_testcase { /** * Data provider for test_duplicating_data_remove_unwanted_types. diff --git a/mod/data/tests/custom_completion_test.php b/mod/data/tests/custom_completion_test.php index 2f41dad7a5b..40f3fe49201 100644 --- a/mod/data/tests/custom_completion_test.php +++ b/mod/data/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/data/tests/dates_test.php b/mod/data/tests/dates_test.php index 2a769e7f169..91863c26f2a 100644 --- a/mod/data/tests/dates_test.php +++ b/mod/data/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/data/tests/event/events_test.php b/mod/data/tests/event/events_test.php index a8a2353f1b0..235c367c8e8 100644 --- a/mod/data/tests/event/events_test.php +++ b/mod/data/tests/event/events_test.php @@ -29,7 +29,7 @@ use mod_data\local\importer\preset_existing_importer; use mod_data\manager; use mod_data\preset; -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/mod/data/tests/external/delete_saved_preset_test.php b/mod/data/tests/external/delete_saved_preset_test.php index e36ae5e0364..726138b653b 100644 --- a/mod/data/tests/external/delete_saved_preset_test.php +++ b/mod/data/tests/external/delete_saved_preset_test.php @@ -35,7 +35,7 @@ use mod_data\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\external\delete_saved_preset */ -class delete_saved_preset_test extends externallib_advanced_testcase { +final class delete_saved_preset_test extends externallib_advanced_testcase { /** * Test the behaviour of delete_saved_preset(). diff --git a/mod/data/tests/external/get_mapping_information_test.php b/mod/data/tests/external/get_mapping_information_test.php index b41fb5718a0..16188dd7f5c 100644 --- a/mod/data/tests/external/get_mapping_information_test.php +++ b/mod/data/tests/external/get_mapping_information_test.php @@ -33,7 +33,7 @@ use mod_data\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\external\get_mapping_information */ -class get_mapping_information_test extends \advanced_testcase { +final class get_mapping_information_test extends \advanced_testcase { /** * Data provider for test_get_mapping_information(). diff --git a/mod/data/tests/externallib_test.php b/mod/data/tests/externallib_test.php index 11213856b7f..ad01e06224a 100644 --- a/mod/data/tests/externallib_test.php +++ b/mod/data/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @since Moodle 2.9 * @coversDefaultClass \mod_data_external */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** @var stdClass Test module context. */ protected $context; diff --git a/mod/data/tests/generator_test.php b/mod/data/tests/generator_test.php index 62b84bfdc81..497a083fd1f 100644 --- a/mod/data/tests/generator_test.php +++ b/mod/data/tests/generator_test.php @@ -27,7 +27,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * @covers ::create_instance */ diff --git a/mod/data/tests/lib_test.php b/mod/data/tests/lib_test.php index 799e9ccbc5a..60142a65ff3 100644 --- a/mod/data/tests/lib_test.php +++ b/mod/data/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/data/lib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var moodle_database diff --git a/mod/data/tests/locallib_test.php b/mod/data/tests/locallib_test.php index f52e2c740fd..9132283178e 100644 --- a/mod/data/tests/locallib_test.php +++ b/mod/data/tests/locallib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/data/locallib.php'); * @copyright 2022 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Confirms that search is working diff --git a/mod/data/tests/manager_test.php b/mod/data/tests/manager_test.php index 14d8067b961..33d16da8e71 100644 --- a/mod/data/tests/manager_test.php +++ b/mod/data/tests/manager_test.php @@ -30,7 +30,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\manager */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test for static create methods. diff --git a/mod/data/tests/preset_test.php b/mod/data/tests/preset_test.php index 018e6bdf3b6..275f34d12a8 100644 --- a/mod/data/tests/preset_test.php +++ b/mod/data/tests/preset_test.php @@ -29,7 +29,7 @@ use zip_archive; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\preset */ -class preset_test extends \advanced_testcase { +final class preset_test extends \advanced_testcase { /** * Test for static create_from_plugin method. diff --git a/mod/data/tests/privacy/provider_test.php b/mod/data/tests/privacy/provider_test.php index 5a7a4d530aa..c2ab63581ee 100644 --- a/mod/data/tests/privacy/provider_test.php +++ b/mod/data/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; /** @var stdClass The student object. */ diff --git a/mod/data/tests/search/search_test.php b/mod/data/tests/search/search_test.php index 5d2569d570d..59f7c89c8cc 100644 --- a/mod/data/tests/search/search_test.php +++ b/mod/data/tests/search/search_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/mod/data/tests/generator/lib.php'); * @copyright 2012 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var stdObject $recorddata An object that holds information from the table data. */ diff --git a/mod/data/tests/template_test.php b/mod/data/tests/template_test.php index ed27d746213..63b4348be00 100644 --- a/mod/data/tests/template_test.php +++ b/mod/data/tests/template_test.php @@ -29,7 +29,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\template */ -class template_test extends \advanced_testcase { +final class template_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/mod/feedback/tests/backup/restore_date_test.php b/mod/feedback/tests/backup/restore_date_test.php index 6a429ceb0e2..9c5e561c4fd 100644 --- a/mod/feedback/tests/backup/restore_date_test.php +++ b/mod/feedback/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/feedback/tests/completion_test.php b/mod/feedback/tests/completion_test.php index 2b322b2c26c..62894ca25b2 100644 --- a/mod/feedback/tests/completion_test.php +++ b/mod/feedback/tests/completion_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/feedback/classes/completion.php'); * @copyright 2019 Tobias Reischmann * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class completion_test extends \advanced_testcase { +final class completion_test extends \advanced_testcase { /** * Returns the number of pages with visible elements for the current state of the feedback completion. * @param mod_feedback_completion $completion diff --git a/mod/feedback/tests/custom_completion_test.php b/mod/feedback/tests/custom_completion_test.php index 630b063dc3a..84b33503707 100644 --- a/mod/feedback/tests/custom_completion_test.php +++ b/mod/feedback/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/feedback/tests/dates_test.php b/mod/feedback/tests/dates_test.php index b9c65282386..3243c65c3fc 100644 --- a/mod/feedback/tests/dates_test.php +++ b/mod/feedback/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/feedback/tests/event/events_test.php b/mod/feedback/tests/event/events_test.php index 79d91162021..daad0c5d26c 100644 --- a/mod/feedback/tests/event/events_test.php +++ b/mod/feedback/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_feedback\event; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass A user who likes to interact with feedback activity. */ private $eventuser; diff --git a/mod/feedback/tests/form/create_template_form_test.php b/mod/feedback/tests/form/create_template_form_test.php index ae56cce41f7..8fe4ab0547f 100644 --- a/mod/feedback/tests/form/create_template_form_test.php +++ b/mod/feedback/tests/form/create_template_form_test.php @@ -23,7 +23,7 @@ namespace mod_feedback\form; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package mod_feedback */ -class create_template_form_test extends \advanced_testcase { +final class create_template_form_test extends \advanced_testcase { /** * Run the basic setup for the test */ diff --git a/mod/feedback/tests/form/use_template_form_test.php b/mod/feedback/tests/form/use_template_form_test.php index d5637b8d21e..3d52e959e53 100644 --- a/mod/feedback/tests/form/use_template_form_test.php +++ b/mod/feedback/tests/form/use_template_form_test.php @@ -23,7 +23,7 @@ namespace mod_feedback\form; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package mod_feedback */ -class use_template_form_test extends \advanced_testcase { +final class use_template_form_test extends \advanced_testcase { /** * Run the basic setup for the test */ diff --git a/mod/feedback/tests/generator_test.php b/mod/feedback/tests/generator_test.php index 615ed3b3bec..0fba2a17ac0 100644 --- a/mod/feedback/tests/generator_test.php +++ b/mod/feedback/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_feedback; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/feedback/tests/lib_test.php b/mod/feedback/tests/lib_test.php index e5243d762c3..ceba9cd27ec 100644 --- a/mod/feedback/tests/lib_test.php +++ b/mod/feedback/tests/lib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/feedback/lib.php'); * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_feedback_initialise() { $this->resetAfterTest(); diff --git a/mod/feedback/tests/privacy/provider_test.php b/mod/feedback/tests/privacy/provider_test.php index de34617e633..573d70f3af6 100644 --- a/mod/feedback/tests/privacy/provider_test.php +++ b/mod/feedback/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/feedback/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/folder/tests/backup/restore_date_test.php b/mod/folder/tests/backup/restore_date_test.php index 47c7e80cc5d..e728dfb982b 100644 --- a/mod/folder/tests/backup/restore_date_test.php +++ b/mod/folder/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/folder/tests/event/events_test.php b/mod/folder/tests/event/events_test.php index cb6311844eb..d9b7827a5e3 100644 --- a/mod/folder/tests/event/events_test.php +++ b/mod/folder/tests/event/events_test.php @@ -25,7 +25,7 @@ namespace mod_folder\event; -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/mod/folder/tests/externallib_test.php b/mod/folder/tests/externallib_test.php index 1a0b0a63df5..46c006a0236 100644 --- a/mod/folder/tests/externallib_test.php +++ b/mod/folder/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_folder diff --git a/mod/folder/tests/generator_test.php b/mod/folder/tests/generator_test.php index 4744a8fb110..cecf2554dd8 100644 --- a/mod/folder/tests/generator_test.php +++ b/mod/folder/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_folder; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $USER; diff --git a/mod/folder/tests/lib_test.php b/mod/folder/tests/lib_test.php index b0b1c17adff..57234e5ab6d 100644 --- a/mod/folder/tests/lib_test.php +++ b/mod/folder/tests/lib_test.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Setup. diff --git a/mod/folder/tests/search/search_test.php b/mod/folder/tests/search/search_test.php index c41038aa17c..3ac71cde0b9 100644 --- a/mod/folder/tests/search/search_test.php +++ b/mod/folder/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/forum/report/summary/tests/event/events_test.php b/mod/forum/report/summary/tests/event/events_test.php index 5bf5ba82ee0..b04ae52c151 100644 --- a/mod/forum/report/summary/tests/event/events_test.php +++ b/mod/forum/report/summary/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace forumreport_summary\event; * @copyright 2019 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test report_downloaded event. */ diff --git a/mod/forum/tests/backup/restore_date_test.php b/mod/forum/tests/backup/restore_date_test.php index f0691daecd1..d55f3f206cf 100644 --- a/mod/forum/tests/backup/restore_date_test.php +++ b/mod/forum/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/forum/tests/backup_forum_activity_task_test.php b/mod/forum/tests/backup_forum_activity_task_test.php index 28c021717e5..355dbf55be8 100644 --- a/mod/forum/tests/backup_forum_activity_task_test.php +++ b/mod/forum/tests/backup_forum_activity_task_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_activity_ta * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_forum_activity_task_test extends \advanced_testcase { +final class backup_forum_activity_task_test extends \advanced_testcase { /** * Test the encoding of forum content links. diff --git a/mod/forum/tests/builders_exported_posts_test.php b/mod/forum/tests/builders_exported_posts_test.php index f321617cea9..9be57c37772 100644 --- a/mod/forum/tests/builders_exported_posts_test.php +++ b/mod/forum/tests/builders_exported_posts_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class builders_exported_posts_test extends \advanced_testcase { +final class builders_exported_posts_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/custom_completion_test.php b/mod/forum/tests/custom_completion_test.php index 1d5df101112..d4b99a8e541 100644 --- a/mod/forum/tests/custom_completion_test.php +++ b/mod/forum/tests/custom_completion_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/forum/tests/generator_trait.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { use \mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/dates_test.php b/mod/forum/tests/dates_test.php index 79a9a04a300..daa4a529d04 100644 --- a/mod/forum/tests/dates_test.php +++ b/mod/forum/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/forum/tests/entities_author_test.php b/mod/forum/tests/entities_author_test.php index 0fc19054aa9..fb59b67fa52 100644 --- a/mod/forum/tests/entities_author_test.php +++ b/mod/forum/tests/entities_author_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\author as author_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_author_test extends \advanced_testcase { +final class entities_author_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_discussion_summary_test.php b/mod/forum/tests/entities_discussion_summary_test.php index 9fed57a368d..8eef23835af 100644 --- a/mod/forum/tests/entities_discussion_summary_test.php +++ b/mod/forum/tests/entities_discussion_summary_test.php @@ -28,7 +28,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_discussion_summary_test extends \advanced_testcase { +final class entities_discussion_summary_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_discussion_test.php b/mod/forum/tests/entities_discussion_test.php index f4b448af8ce..14f7c916b39 100644 --- a/mod/forum/tests/entities_discussion_test.php +++ b/mod/forum/tests/entities_discussion_test.php @@ -26,7 +26,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_discussion_test extends \advanced_testcase { +final class entities_discussion_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_forum_test.php b/mod/forum/tests/entities_forum_test.php index 2d52ba37910..08e758a0545 100644 --- a/mod/forum/tests/entities_forum_test.php +++ b/mod/forum/tests/entities_forum_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_forum_test extends \advanced_testcase { +final class entities_forum_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_post_read_receipt_collection_test.php b/mod/forum/tests/entities_post_read_receipt_collection_test.php index 6bab5a2ade5..1e13ad823d8 100644 --- a/mod/forum/tests/entities_post_read_receipt_collection_test.php +++ b/mod/forum/tests/entities_post_read_receipt_collection_test.php @@ -26,7 +26,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_post_read_receipt_collection_test extends \advanced_testcase { +final class entities_post_read_receipt_collection_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_post_test.php b/mod/forum/tests/entities_post_test.php index 4c826bcceea..0a86a2d206a 100644 --- a/mod/forum/tests/entities_post_test.php +++ b/mod/forum/tests/entities_post_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_post_test extends \advanced_testcase { +final class entities_post_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_sorter_test.php b/mod/forum/tests/entities_sorter_test.php index 28e32e285a6..5b1f0d949a9 100644 --- a/mod/forum/tests/entities_sorter_test.php +++ b/mod/forum/tests/entities_sorter_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\sorter as sorter_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_sorter_test extends \advanced_testcase { +final class entities_sorter_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/event/events_test.php b/mod/forum/tests/event/events_test.php index 21208aba859..79b5cd66411 100644 --- a/mod/forum/tests/event/events_test.php +++ b/mod/forum/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_forum\event; * @copyright 2014 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/mod/forum/tests/exporters_author_test.php b/mod/forum/tests/exporters_author_test.php index 9ede08173ef..78d9b852c3d 100644 --- a/mod/forum/tests/exporters_author_test.php +++ b/mod/forum/tests/exporters_author_test.php @@ -26,7 +26,7 @@ use mod_forum\local\exporters\author as author_exporter; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_author_test extends \advanced_testcase { +final class exporters_author_test extends \advanced_testcase { /** * Test the export function returns expected values. */ diff --git a/mod/forum/tests/exporters_discussion_test.php b/mod/forum/tests/exporters_discussion_test.php index 6a2d294260e..ab8d42f0f3d 100644 --- a/mod/forum/tests/exporters_discussion_test.php +++ b/mod/forum/tests/exporters_discussion_test.php @@ -26,7 +26,10 @@ use mod_forum\local\exporters\discussion as discussion_exporter; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_discussion_test extends \advanced_testcase { +final class exporters_discussion_test extends \advanced_testcase { + /** @var \mod_forum\local\builders\exported_posts */ + private $builder; + /** * Test set up function. */ diff --git a/mod/forum/tests/exporters_forum_test.php b/mod/forum/tests/exporters_forum_test.php index b28f5e80608..f253f3362b7 100644 --- a/mod/forum/tests/exporters_forum_test.php +++ b/mod/forum/tests/exporters_forum_test.php @@ -26,7 +26,7 @@ use mod_forum\local\exporters\forum as forum_exporter; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_forum_test extends \advanced_testcase { +final class exporters_forum_test extends \advanced_testcase { /** * Test the export function returns expected values. */ diff --git a/mod/forum/tests/exporters_post_test.php b/mod/forum/tests/exporters_post_test.php index 8387b834b27..0c5f48c1af7 100644 --- a/mod/forum/tests/exporters_post_test.php +++ b/mod/forum/tests/exporters_post_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_post_test extends \advanced_testcase { +final class exporters_post_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/grade/forum_gradeitem_test.php b/mod/forum/tests/grade/forum_gradeitem_test.php index 3d62c316ea1..3a65196a860 100644 --- a/mod/forum/tests/grade/forum_gradeitem_test.php +++ b/mod/forum/tests/grade/forum_gradeitem_test.php @@ -41,7 +41,7 @@ require_once(__DIR__ . '/../generator_trait.php'); * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class forum_gradeitem_test extends \advanced_testcase { +final class forum_gradeitem_test extends \advanced_testcase { use \mod_forum_tests_generator_trait; /** diff --git a/mod/forum/tests/grade/gradeitems_test.php b/mod/forum/tests/grade/gradeitems_test.php index 1bbe060d919..139dc10e1c1 100644 --- a/mod/forum/tests/grade/gradeitems_test.php +++ b/mod/forum/tests/grade/gradeitems_test.php @@ -30,7 +30,7 @@ use coding_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gradeitems_test extends advanced_testcase { +final class gradeitems_test extends advanced_testcase { /** * Ensure that the mappings are present and correct. diff --git a/mod/forum/tests/h5p/canedit_test.php b/mod/forum/tests/h5p/canedit_test.php index 2602f615fd3..7fcaff17a38 100644 --- a/mod/forum/tests/h5p/canedit_test.php +++ b/mod/forum/tests/h5p/canedit_test.php @@ -28,7 +28,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\h5p\canedit */ -class canedit_test extends \advanced_testcase { +final class canedit_test extends \advanced_testcase { /** * Test the behaviour of can_edit_content(). diff --git a/mod/forum/tests/lib_test.php b/mod/forum/tests/lib_test.php index d2d70243861..6706f28ec95 100644 --- a/mod/forum/tests/lib_test.php +++ b/mod/forum/tests/lib_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function setUp(): void { // We must clear the subscription caches. This has to be done both before each test, and after in case of other diff --git a/mod/forum/tests/local_container_test.php b/mod/forum/tests/local_container_test.php index 24032076057..99763af39a6 100644 --- a/mod/forum/tests/local_container_test.php +++ b/mod/forum/tests/local_container_test.php @@ -24,7 +24,7 @@ namespace mod_forum; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\container */ -class local_container_test extends \advanced_testcase { +final class local_container_test extends \advanced_testcase { /** * Ensure that a renderer factory is returned. * diff --git a/mod/forum/tests/locallib_test.php b/mod/forum/tests/locallib_test.php index 4de0de8999e..cdbce396d42 100644 --- a/mod/forum/tests/locallib_test.php +++ b/mod/forum/tests/locallib_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/mod/forum/lib.php'); * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { - public function test_forum_update_calendar() { +final class locallib_test extends \advanced_testcase { + public function test_forum_update_calendar(): void { global $DB; $this->resetAfterTest(); diff --git a/mod/forum/tests/mail_group_test.php b/mod/forum/tests/mail_group_test.php index e32dd2ea672..8373e7c153b 100644 --- a/mod/forum/tests/mail_group_test.php +++ b/mod/forum/tests/mail_group_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2013 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mail_group_test extends \advanced_testcase { +final class mail_group_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/mail_test.php b/mod/forum/tests/mail_test.php index ac8ea0576f9..e3548c9e9f6 100644 --- a/mod/forum/tests/mail_test.php +++ b/mod/forum/tests/mail_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * */ -class mail_test extends \advanced_testcase { +final class mail_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/maildigest_test.php b/mod/forum/tests/maildigest_test.php index 139c9a0b96f..7e1a940e5a5 100644 --- a/mod/forum/tests/maildigest_test.php +++ b/mod/forum/tests/maildigest_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2013 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class maildigest_test extends \advanced_testcase { +final class maildigest_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/managers_capability_test.php b/mod/forum/tests/managers_capability_test.php index 87a9a0bd4fe..a4fa3d6dd92 100644 --- a/mod/forum/tests/managers_capability_test.php +++ b/mod/forum/tests/managers_capability_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\managers\capability */ -class managers_capability_test extends \advanced_testcase { +final class managers_capability_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/output_email_test.php b/mod/forum/tests/output_email_test.php index 1c997632677..3c617a51484 100644 --- a/mod/forum/tests/output_email_test.php +++ b/mod/forum/tests/output_email_test.php @@ -25,7 +25,7 @@ use mod_forum\output\forum_post_email; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class output_email_test extends \advanced_testcase { +final class output_email_test extends \advanced_testcase { /** * Data provider for the postdate function tests. */ diff --git a/mod/forum/tests/portfolio_caller_test.php b/mod/forum/tests/portfolio_caller_test.php index 03e91fea125..ed346de0eba 100644 --- a/mod/forum/tests/portfolio_caller_test.php +++ b/mod/forum/tests/portfolio_caller_test.php @@ -26,7 +26,7 @@ namespace mod_forum; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Brendan Cox */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** * Ensure that a file will be loaded in an instance of the caller when supplied valid and diff --git a/mod/forum/tests/privacy/provider_test.php b/mod/forum/tests/privacy/provider_test.php index f60af987559..fb1906e98ae 100644 --- a/mod/forum/tests/privacy/provider_test.php +++ b/mod/forum/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use mod_forum\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy subcontext_info trait. // This includes the subcontext builders. diff --git a/mod/forum/tests/private_replies_test.php b/mod/forum/tests/private_replies_test.php index a09b788cc1a..fd6348b03f0 100644 --- a/mod/forum/tests/private_replies_test.php +++ b/mod/forum/tests/private_replies_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class private_replies_test extends \advanced_testcase { +final class private_replies_test extends \advanced_testcase { use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/qanda_test.php b/mod/forum/tests/qanda_test.php index 16d85805ed3..ea3b9569d13 100644 --- a/mod/forum/tests/qanda_test.php +++ b/mod/forum/tests/qanda_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2013 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qanda_test extends \advanced_testcase { +final class qanda_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/rsslib_test.php b/mod/forum/tests/rsslib_test.php index a3ee0cbb7e3..1f8f93e5816 100644 --- a/mod/forum/tests/rsslib_test.php +++ b/mod/forum/tests/rsslib_test.php @@ -29,7 +29,7 @@ require_once("{$CFG->dirroot}/mod/forum/rsslib.php"); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rsslib_test extends \advanced_testcase { +final class rsslib_test extends \advanced_testcase { // Include the mod_forum test helpers. // This includes functions to create forums, users, discussions, and posts. use \mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/search/search_test.php b/mod/forum/tests/search/search_test.php index 7d26221f42e..74d1cc18114 100644 --- a/mod/forum/tests/search/search_test.php +++ b/mod/forum/tests/search/search_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/mod/forum/lib.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/forum/tests/subscriptions_test.php b/mod/forum/tests/subscriptions_test.php index 0bab898dff0..e955cbebb43 100644 --- a/mod/forum/tests/subscriptions_test.php +++ b/mod/forum/tests/subscriptions_test.php @@ -31,7 +31,7 @@ require_once("{$CFG->dirroot}/mod/forum/lib.php"); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscriptions_test extends \advanced_testcase { +final class subscriptions_test extends \advanced_testcase { // Include the mod_forum test helpers. // This includes functions to create forums, users, discussions, and posts. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_author_test.php b/mod/forum/tests/vaults_author_test.php index a96696e1eaa..f8390f11d8d 100644 --- a/mod/forum/tests/vaults_author_test.php +++ b/mod/forum/tests/vaults_author_test.php @@ -23,7 +23,7 @@ namespace mod_forum; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_author_test extends \advanced_testcase { +final class vaults_author_test extends \advanced_testcase { /** * Test get_from_id. */ diff --git a/mod/forum/tests/vaults_discussion_list_test.php b/mod/forum/tests/vaults_discussion_list_test.php index 22b822b18c0..f8955ee72b8 100644 --- a/mod/forum/tests/vaults_discussion_list_test.php +++ b/mod/forum/tests/vaults_discussion_list_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_discussion_list_test extends \advanced_testcase { +final class vaults_discussion_list_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_discussion_test.php b/mod/forum/tests/vaults_discussion_test.php index cf982494336..9aa9a67ae6b 100644 --- a/mod/forum/tests/vaults_discussion_test.php +++ b/mod/forum/tests/vaults_discussion_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_discussion_test extends \advanced_testcase { +final class vaults_discussion_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_forum_test.php b/mod/forum/tests/vaults_forum_test.php index 7141d8607fc..1a77d99993d 100644 --- a/mod/forum/tests/vaults_forum_test.php +++ b/mod/forum/tests/vaults_forum_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\vaults\forum */ -class vaults_forum_test extends \advanced_testcase { +final class vaults_forum_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_attachment_test.php b/mod/forum/tests/vaults_post_attachment_test.php index 8745485f3d5..0fac57a1a68 100644 --- a/mod/forum/tests/vaults_post_attachment_test.php +++ b/mod/forum/tests/vaults_post_attachment_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_post_attachment_test extends \advanced_testcase { +final class vaults_post_attachment_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_read_receipt_collection_test.php b/mod/forum/tests/vaults_post_read_receipt_collection_test.php index 56db40a17b4..31db3a2770b 100644 --- a/mod/forum/tests/vaults_post_read_receipt_collection_test.php +++ b/mod/forum/tests/vaults_post_read_receipt_collection_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_post_read_receipt_collection_test extends \advanced_testcase { +final class vaults_post_read_receipt_collection_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_test.php b/mod/forum/tests/vaults_post_test.php index ab7f7f9abf7..6c7f73f439b 100644 --- a/mod/forum/tests/vaults_post_test.php +++ b/mod/forum/tests/vaults_post_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\vaults\post */ -class vaults_post_test extends \advanced_testcase { +final class vaults_post_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/glossary/tests/backup/restore_date_test.php b/mod/glossary/tests/backup/restore_date_test.php index 8bb82a33ff1..f7f6f4e72e6 100644 --- a/mod/glossary/tests/backup/restore_date_test.php +++ b/mod/glossary/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/glossary/tests/concept_cache_test.php b/mod/glossary/tests/concept_cache_test.php index 63745d5b48e..b67c2a1cc50 100644 --- a/mod/glossary/tests/concept_cache_test.php +++ b/mod/glossary/tests/concept_cache_test.php @@ -24,7 +24,7 @@ namespace mod_glossary; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class concept_cache_test extends \advanced_testcase { +final class concept_cache_test extends \advanced_testcase { /** * Test convect fetching. */ diff --git a/mod/glossary/tests/custom_completion_test.php b/mod/glossary/tests/custom_completion_test.php index 87d7cd2ec70..1b2e0462874 100644 --- a/mod/glossary/tests/custom_completion_test.php +++ b/mod/glossary/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/glossary/tests/event/events_test.php b/mod/glossary/tests/event/events_test.php index b039a6b230e..bc72cfb2113 100644 --- a/mod/glossary/tests/event/events_test.php +++ b/mod/glossary/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_glossary\event; * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/glossary/tests/external/external_test.php b/mod/glossary/tests/external/external_test.php index 181cc074d77..ee7e72209c1 100644 --- a/mod/glossary/tests/external/external_test.php +++ b/mod/glossary/tests/external/external_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Costantino Cito * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test get_glossaries_by_courses diff --git a/mod/glossary/tests/generator_test.php b/mod/glossary/tests/generator_test.php index 5b8d8d9fa50..b86de7497a7 100644 --- a/mod/glossary/tests/generator_test.php +++ b/mod/glossary/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_glossary; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/glossary/tests/lib_test.php b/mod/glossary/tests/lib_test.php index 9d78bed6c33..594005cb999 100644 --- a/mod/glossary/tests/lib_test.php +++ b/mod/glossary/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/glossary/locallib.php'); * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_glossary_view() { global $CFG; diff --git a/mod/glossary/tests/privacy/provider_test.php b/mod/glossary/tests/privacy/provider_test.php index 9acb2ee7bb2..110190990e9 100644 --- a/mod/glossary/tests/privacy/provider_test.php +++ b/mod/glossary/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2018 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; diff --git a/mod/glossary/tests/search/search_test.php b/mod/glossary/tests/search/search_test.php index 4601d2c3d1b..ccb100f3378 100644 --- a/mod/glossary/tests/search/search_test.php +++ b/mod/glossary/tests/search/search_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/glossary/tests/generator/lib.php'); * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php b/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php index f587a7a8a13..ff4b83d1b4c 100644 --- a/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php +++ b/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php @@ -35,7 +35,7 @@ use context_module; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_module_instance_list_viewed_test extends advanced_testcase { +final class course_module_instance_list_viewed_test extends advanced_testcase { /** * Test course_module_instance_list_viewed event. diff --git a/mod/h5pactivity/tests/event/course_module_viewed_test.php b/mod/h5pactivity/tests/event/course_module_viewed_test.php index 8426db7dcc6..6fb3b3db193 100644 --- a/mod/h5pactivity/tests/event/course_module_viewed_test.php +++ b/mod/h5pactivity/tests/event/course_module_viewed_test.php @@ -35,7 +35,7 @@ use context_module; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_module_viewed_test extends advanced_testcase { +final class course_module_viewed_test extends advanced_testcase { /** * Test course_module_viewed event. diff --git a/mod/h5pactivity/tests/event/report_viewed_test.php b/mod/h5pactivity/tests/event/report_viewed_test.php index a5de5faf978..d44776de7ab 100644 --- a/mod/h5pactivity/tests/event/report_viewed_test.php +++ b/mod/h5pactivity/tests/event/report_viewed_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_viewed_test extends advanced_testcase { +final class report_viewed_test extends advanced_testcase { /** * Test report_viewed event. diff --git a/mod/h5pactivity/tests/event/statement_received_test.php b/mod/h5pactivity/tests/event/statement_received_test.php index 72439b9ff89..dcb2fb89b14 100644 --- a/mod/h5pactivity/tests/event/statement_received_test.php +++ b/mod/h5pactivity/tests/event/statement_received_test.php @@ -34,7 +34,7 @@ use context_module; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statement_received_test extends advanced_testcase { +final class statement_received_test extends advanced_testcase { /** * Test statement_recieved event. diff --git a/mod/h5pactivity/tests/external/get_attempts_test.php b/mod/h5pactivity/tests/external/get_attempts_test.php index 170da5c827b..4a40f9c1f92 100644 --- a/mod/h5pactivity/tests/external/get_attempts_test.php +++ b/mod/h5pactivity/tests/external/get_attempts_test.php @@ -42,7 +42,7 @@ use externallib_advanced_testcase; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_attempts_test extends externallib_advanced_testcase { +final class get_attempts_test extends externallib_advanced_testcase { /** * Test the behaviour of get_attempts. diff --git a/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php b/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php index 36787079342..269e768fb55 100644 --- a/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php +++ b/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php @@ -44,7 +44,7 @@ use context_module; * @copyright 2020 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_h5pactivities_by_courses_test extends externallib_advanced_testcase { +final class get_h5pactivities_by_courses_test extends externallib_advanced_testcase { /** * Test test_get_h5pactivities_by_courses user student. diff --git a/mod/h5pactivity/tests/external/get_h5pactivity_access_information_test.php b/mod/h5pactivity/tests/external/get_h5pactivity_access_information_test.php index 816b3ee05f4..84a455938a8 100644 --- a/mod/h5pactivity/tests/external/get_h5pactivity_access_information_test.php +++ b/mod/h5pactivity/tests/external/get_h5pactivity_access_information_test.php @@ -42,7 +42,7 @@ use externallib_advanced_testcase; * @copyright 2020 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_h5pactivity_access_information_test extends externallib_advanced_testcase { +final class get_h5pactivity_access_information_test extends externallib_advanced_testcase { /** * Test the behaviour of get_h5pactivity_access_information(). diff --git a/mod/h5pactivity/tests/external/get_results_test.php b/mod/h5pactivity/tests/external/get_results_test.php index 031a724ae4f..83db8ef0b48 100644 --- a/mod/h5pactivity/tests/external/get_results_test.php +++ b/mod/h5pactivity/tests/external/get_results_test.php @@ -43,7 +43,7 @@ use dml_missing_record_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_results_test extends externallib_advanced_testcase { +final class get_results_test extends externallib_advanced_testcase { /** * Test the behaviour of get_results. diff --git a/mod/h5pactivity/tests/external/get_user_attempts_test.php b/mod/h5pactivity/tests/external/get_user_attempts_test.php index e76b868d519..36da2dd4eae 100644 --- a/mod/h5pactivity/tests/external/get_user_attempts_test.php +++ b/mod/h5pactivity/tests/external/get_user_attempts_test.php @@ -42,7 +42,7 @@ use externallib_advanced_testcase; * @copyright 2020 Ilya Tregubov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_user_attempts_test extends externallib_advanced_testcase { +final class get_user_attempts_test extends externallib_advanced_testcase { /** * Test the behaviour of get_user_attempts getting more than one user at once. diff --git a/mod/h5pactivity/tests/external/view_h5pactivity_test.php b/mod/h5pactivity/tests/external/view_h5pactivity_test.php index 487f7538f60..6352649fb9e 100644 --- a/mod/h5pactivity/tests/external/view_h5pactivity_test.php +++ b/mod/h5pactivity/tests/external/view_h5pactivity_test.php @@ -45,7 +45,7 @@ use course_modinfo; * @copyright 2020 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class view_h5pactivity_test extends externallib_advanced_testcase { +final class view_h5pactivity_test extends externallib_advanced_testcase { /** * Test test_view_h5pactivity invalid id. diff --git a/mod/h5pactivity/tests/local/attempt_test.php b/mod/h5pactivity/tests/local/attempt_test.php index 8278ae1165d..02b40571274 100644 --- a/mod/h5pactivity/tests/local/attempt_test.php +++ b/mod/h5pactivity/tests/local/attempt_test.php @@ -42,7 +42,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class attempt_test extends \advanced_testcase { +final class attempt_test extends \advanced_testcase { /** * Generate a scenario to run all tests. diff --git a/mod/h5pactivity/tests/local/grader_test.php b/mod/h5pactivity/tests/local/grader_test.php index 870a5119c97..0b96a5e59a2 100644 --- a/mod/h5pactivity/tests/local/grader_test.php +++ b/mod/h5pactivity/tests/local/grader_test.php @@ -36,7 +36,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grader_test extends \advanced_testcase { +final class grader_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/mod/h5pactivity/tests/local/manager_test.php b/mod/h5pactivity/tests/local/manager_test.php index 77bdce412cf..8671766ba11 100644 --- a/mod/h5pactivity/tests/local/manager_test.php +++ b/mod/h5pactivity/tests/local/manager_test.php @@ -28,7 +28,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test for static create methods. diff --git a/mod/h5pactivity/tests/output/result/result_test.php b/mod/h5pactivity/tests/output/result/result_test.php index 64184abd78f..31a66d3accb 100644 --- a/mod/h5pactivity/tests/output/result/result_test.php +++ b/mod/h5pactivity/tests/output/result/result_test.php @@ -27,7 +27,7 @@ use mod_h5pactivity\local\manager; * @copyright 2023 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class result_test extends \advanced_testcase { +final class result_test extends \advanced_testcase { /** * Data provider for result export_options test * diff --git a/mod/h5pactivity/tests/privacy/provider_test.php b/mod/h5pactivity/tests/privacy/provider_test.php index e39f1623e89..062cac6ead8 100644 --- a/mod/h5pactivity/tests/privacy/provider_test.php +++ b/mod/h5pactivity/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use \core_privacy\tests\provider_testcase; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass User without any attempt. */ protected $student0; diff --git a/mod/h5pactivity/tests/restore_test.php b/mod/h5pactivity/tests/restore_test.php index a060b1f08a5..3b854976603 100644 --- a/mod/h5pactivity/tests/restore_test.php +++ b/mod/h5pactivity/tests/restore_test.php @@ -41,7 +41,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_test extends advanced_testcase { +final class restore_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/mod/imscp/tests/backup/restore_date_test.php b/mod/imscp/tests/backup/restore_date_test.php index 7b186735ea6..0d721e7bccb 100644 --- a/mod/imscp/tests/backup/restore_date_test.php +++ b/mod/imscp/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/imscp/tests/externallib_test.php b/mod/imscp/tests/externallib_test.php index 3900a4e6872..4840f75583a 100644 --- a/mod/imscp/tests/externallib_test.php +++ b/mod/imscp/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_imscp diff --git a/mod/imscp/tests/generator_test.php b/mod/imscp/tests/generator_test.php index 2d45d376469..6503872f1f9 100644 --- a/mod/imscp/tests/generator_test.php +++ b/mod/imscp/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_imscp; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $CFG, $USER; diff --git a/mod/imscp/tests/lib_test.php b/mod/imscp/tests/lib_test.php index 71a073a6dea..ce1c3046ba0 100644 --- a/mod/imscp/tests/lib_test.php +++ b/mod/imscp/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/imscp/lib.php'); * @copyright 2015 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_export_contents() { global $DB, $USER; diff --git a/mod/label/tests/externallib_test.php b/mod/label/tests/externallib_test.php index 0a36608c076..542d342d21c 100644 --- a/mod/label/tests/externallib_test.php +++ b/mod/label/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.3 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test test_mod_label_get_labels_by_courses diff --git a/mod/label/tests/generator_test.php b/mod/label/tests/generator_test.php index fdb8a197b6a..fdbc578928c 100644 --- a/mod/label/tests/generator_test.php +++ b/mod/label/tests/generator_test.php @@ -24,8 +24,8 @@ namespace mod_label; * @copyright 2013 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/mod/label/tests/lib_test.php b/mod/label/tests/lib_test.php index 911651554ab..3ee2314e5d7 100644 --- a/mod/label/tests/lib_test.php +++ b/mod/label/tests/lib_test.php @@ -24,7 +24,7 @@ namespace mod_label; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Set up. diff --git a/mod/lesson/tests/backup/restore_date_test.php b/mod/lesson/tests/backup/restore_date_test.php index 08bf6f6f594..da7832b53a8 100644 --- a/mod/lesson/tests/backup/restore_date_test.php +++ b/mod/lesson/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Creates an attempt for the given userwith a correct or incorrect answer and optionally finishes it. diff --git a/mod/lesson/tests/backup/restore_override_test.php b/mod/lesson/tests/backup/restore_override_test.php index 15e3332137f..9234f352fe3 100644 --- a/mod/lesson/tests/backup/restore_override_test.php +++ b/mod/lesson/tests/backup/restore_override_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_override_test extends \restore_date_testcase { +final class restore_override_test extends \restore_date_testcase { /** * Test restore overrides. diff --git a/mod/lesson/tests/dates_test.php b/mod/lesson/tests/dates_test.php index 0d2b676ff40..a0520f1e00b 100644 --- a/mod/lesson/tests/dates_test.php +++ b/mod/lesson/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/lesson/tests/event/events_test.php b/mod/lesson/tests/event/events_test.php index e753b8abf67..7d32ef92f88 100644 --- a/mod/lesson/tests/event/events_test.php +++ b/mod/lesson/tests/event/events_test.php @@ -33,7 +33,7 @@ global $CFG; require_once($CFG->dirroot.'/mod/lesson/locallib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass the course used for testing */ private $course; diff --git a/mod/lesson/tests/external/external_test.php b/mod/lesson/tests/external/external_test.php index 74a369650d6..803ea8d4d26 100644 --- a/mod/lesson/tests/external/external_test.php +++ b/mod/lesson/tests/external/external_test.php @@ -70,7 +70,7 @@ class testable_mod_lesson_external extends mod_lesson_external { * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.3 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/mod/lesson/tests/generator_test.php b/mod/lesson/tests/generator_test.php index b1cff3f3e80..1875a524739 100644 --- a/mod/lesson/tests/generator_test.php +++ b/mod/lesson/tests/generator_test.php @@ -25,7 +25,7 @@ namespace mod_lesson; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_lesson_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/lesson/tests/lib_test.php b/mod/lesson/tests/lib_test.php index ba965693e00..55cc4570619 100644 --- a/mod/lesson/tests/lib_test.php +++ b/mod/lesson/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/lesson/lib.php'); * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test for lesson_get_group_override_priorities(). */ diff --git a/mod/lesson/tests/locallib_test.php b/mod/lesson/tests/locallib_test.php index 7571ed7a1f4..0119ec5c387 100644 --- a/mod/lesson/tests/locallib_test.php +++ b/mod/lesson/tests/locallib_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Test duplicating a lesson page element. diff --git a/mod/lesson/tests/numeric_helper_test.php b/mod/lesson/tests/numeric_helper_test.php index f72e32ded46..a1613df0c44 100644 --- a/mod/lesson/tests/numeric_helper_test.php +++ b/mod/lesson/tests/numeric_helper_test.php @@ -26,7 +26,7 @@ use mod_lesson\local\numeric\helper; * @copyright 2020 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class numeric_helper_test extends \advanced_testcase { +final class numeric_helper_test extends \advanced_testcase { /** * Test the lesson_unformat_numeric_value function. * diff --git a/mod/lesson/tests/pagetypes_test.php b/mod/lesson/tests/pagetypes_test.php index 5fe3a0db371..3e131d3ae93 100644 --- a/mod/lesson/tests/pagetypes_test.php +++ b/mod/lesson/tests/pagetypes_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/lesson/pagetypes/essay.php'); * @copyright 2015 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class pagetypes_test extends \advanced_testcase { - public function test_lesson_essay_extract_useranswer() { +final class pagetypes_test extends \advanced_testcase { + public function test_lesson_essay_extract_useranswer(): void { // Test that reponseformat is added when not present. $answer = 'O:8:"stdClass":6:{s:4:"sent";i:1;s:6:"graded";i:1;s:5:"score";s:1:"1";' . 's:6:"answer";s:64:"

This is my answer with bold and italics

";' diff --git a/mod/lesson/tests/privacy/provider_test.php b/mod/lesson/tests/privacy/provider_test.php index 9a94eae7526..e0c95322516 100644 --- a/mod/lesson/tests/privacy/provider_test.php +++ b/mod/lesson/tests/privacy/provider_test.php @@ -44,7 +44,7 @@ use mod_lesson\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php index 50b5479dc96..08fb1a5554d 100644 --- a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php +++ b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php @@ -27,7 +27,14 @@ use ltiservice_gradebookservices\local\service\gradebookservices; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_lti\service\gradebookservices\local\gradebookservices */ -class gradebookservices_test extends \advanced_testcase { +final class gradebookservices_test extends \advanced_testcase { + /** + * Load the necessary libs for the tests. + */ + public static function setUpBeforeClass(): void { + global $CFG; + require_once($CFG->dirroot . '/mod/lti/locallib.php'); + } /** * @covers ::instance_added diff --git a/mod/lti/service/gradebookservices/tests/lineitem_test.php b/mod/lti/service/gradebookservices/tests/lineitem_test.php index 01e5493f68b..f6cb38dce63 100644 --- a/mod/lti/service/gradebookservices/tests/lineitem_test.php +++ b/mod/lti/service/gradebookservices/tests/lineitem_test.php @@ -28,7 +28,7 @@ use ltiservice_gradebookservices\local\service\gradebookservices; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_lti\service\gradebookservices\local\resources\lineitem */ -class lineitem_test extends \advanced_testcase { +final class lineitem_test extends \advanced_testcase { /** * @covers ::execute diff --git a/mod/lti/service/gradebookservices/tests/privacy/provider_test.php b/mod/lti/service/gradebookservices/tests/privacy/provider_test.php index 398aeb71d9f..ea4a58a7db7 100644 --- a/mod/lti/service/gradebookservices/tests/privacy/provider_test.php +++ b/mod/lti/service/gradebookservices/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/mod/lti/service/gradebookservices/tests/task/cleanup_test.php b/mod/lti/service/gradebookservices/tests/task/cleanup_test.php index 16564b40325..d1b8b8ed0c6 100644 --- a/mod/lti/service/gradebookservices/tests/task/cleanup_test.php +++ b/mod/lti/service/gradebookservices/tests/task/cleanup_test.php @@ -24,7 +24,7 @@ namespace ltiservice_gradebookservices\task; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cleanup_test extends \advanced_testcase { +final class cleanup_test extends \advanced_testcase { /** * Test set up. diff --git a/mod/lti/service/memberships/tests/privacy/provider_test.php b/mod/lti/service/memberships/tests/privacy/provider_test.php index 3f8ae108bbd..fcf7f2c6cd5 100644 --- a/mod/lti/service/memberships/tests/privacy/provider_test.php +++ b/mod/lti/service/memberships/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/mod/lti/tests/event/unknown_service_api_called_test.php b/mod/lti/tests/event/unknown_service_api_called_test.php index ec87886d986..9786fc026b2 100644 --- a/mod/lti/tests/event/unknown_service_api_called_test.php +++ b/mod/lti/tests/event/unknown_service_api_called_test.php @@ -23,7 +23,7 @@ namespace mod_lti\event; * @copyright Copyright (c) 2012 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class unknown_service_api_called_test extends \advanced_testcase { +final class unknown_service_api_called_test extends \advanced_testcase { /* * Ensure create event works. */ diff --git a/mod/lti/tests/external/get_tool_types_and_proxies_count_test.php b/mod/lti/tests/external/get_tool_types_and_proxies_count_test.php index 41b308bb753..9c6dcd273ae 100644 --- a/mod/lti/tests/external/get_tool_types_and_proxies_count_test.php +++ b/mod/lti/tests/external/get_tool_types_and_proxies_count_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/lti/tests/mod_lti_testcase.php'); * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_tool_types_and_proxies_count_test extends \mod_lti_testcase { +final class get_tool_types_and_proxies_count_test extends \mod_lti_testcase { /** * This method runs before every test. diff --git a/mod/lti/tests/external/get_tool_types_and_proxies_test.php b/mod/lti/tests/external/get_tool_types_and_proxies_test.php index f38068fe82a..b1d48107bbe 100644 --- a/mod/lti/tests/external/get_tool_types_and_proxies_test.php +++ b/mod/lti/tests/external/get_tool_types_and_proxies_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/lti/tests/mod_lti_testcase.php'); * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_tool_types_and_proxies_test extends \mod_lti_testcase { +final class get_tool_types_and_proxies_test extends \mod_lti_testcase { /** * This method runs before every test. diff --git a/mod/lti/tests/externallib_test.php b/mod/lti/tests/externallib_test.php index 62fa2f692d7..f806f141353 100644 --- a/mod/lti/tests/externallib_test.php +++ b/mod/lti/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/lti/tests/mod_lti_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends mod_lti_testcase { +final class externallib_test extends mod_lti_testcase { /** * Set up for every test diff --git a/mod/lti/tests/generator_test.php b/mod/lti/tests/generator_test.php index 66418f39c64..05a7b15b57b 100644 --- a/mod/lti/tests/generator_test.php +++ b/mod/lti/tests/generator_test.php @@ -25,8 +25,8 @@ namespace mod_lti; * @author Mark Nielsen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/mod/lti/tests/lib_test.php b/mod/lti/tests/lib_test.php index 4b84a153b64..c26b6726393 100644 --- a/mod/lti/tests/lib_test.php +++ b/mod/lti/tests/lib_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/lti/tests/local/ltiopenid/jwks_helper_test.php b/mod/lti/tests/local/ltiopenid/jwks_helper_test.php index 8fcac76df8c..a76da8f3560 100644 --- a/mod/lti/tests/local/ltiopenid/jwks_helper_test.php +++ b/mod/lti/tests/local/ltiopenid/jwks_helper_test.php @@ -42,7 +42,7 @@ namespace mod_lti\local\ltiopenid; * @copyright 2023 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class jwks_helper_test extends \basic_testcase { +final class jwks_helper_test extends \basic_testcase { /** * Test the fix_jwks_alg method with a range of inputs. diff --git a/mod/lti/tests/local/ltiopenid/registration_test.php b/mod/lti/tests/local/ltiopenid/registration_test.php index d700a6570f6..8951ea262a7 100644 --- a/mod/lti/tests/local/ltiopenid/registration_test.php +++ b/mod/lti/tests/local/ltiopenid/registration_test.php @@ -42,7 +42,7 @@ namespace mod_lti\local\ltiopenid; * @author Claude Vervoort * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class registration_test extends \advanced_testcase { +final class registration_test extends \advanced_testcase { /** * @var string A has-it-all client registration. diff --git a/mod/lti/tests/locallib_test.php b/mod/lti/tests/locallib_test.php index a3f0d35e9fe..119a1e3b3a3 100644 --- a/mod/lti/tests/locallib_test.php +++ b/mod/lti/tests/locallib_test.php @@ -65,7 +65,7 @@ require_once($CFG->dirroot . '/mod/lti/tests/mod_lti_testcase.php'); * @copyright Copyright (c) 2012 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends mod_lti_testcase { +final class locallib_test extends mod_lti_testcase { /** * @covers ::lti_split_parameters() diff --git a/mod/lti/tests/privacy/provider_test.php b/mod/lti/tests/privacy/provider_test.php index 9a4732bdc4c..f9b46a53d9c 100644 --- a/mod/lti/tests/privacy/provider_test.php +++ b/mod/lti/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_metadata(). diff --git a/mod/lti/tests/service_exception_handler_test.php b/mod/lti/tests/service_exception_handler_test.php index 28ad8b9b791..618f8761533 100644 --- a/mod/lti/tests/service_exception_handler_test.php +++ b/mod/lti/tests/service_exception_handler_test.php @@ -23,7 +23,7 @@ namespace mod_lti; * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class service_exception_handler_test extends \advanced_testcase { +final class service_exception_handler_test extends \advanced_testcase { /** * Testing service error handling. */ diff --git a/mod/lti/tests/servicelib_test.php b/mod/lti/tests/servicelib_test.php index 1fd5c321a1a..401f33e0883 100644 --- a/mod/lti/tests/servicelib_test.php +++ b/mod/lti/tests/servicelib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/mod/lti/servicelib.php'); * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class servicelib_test extends \basic_testcase { +final class servicelib_test extends \basic_testcase { /** * Test that lti_parse_message_id never fails with good and bad XML. * diff --git a/mod/lti/tests/task/clean_access_tokens_test.php b/mod/lti/tests/task/clean_access_tokens_test.php index ccc1a08c1a0..598407e4063 100644 --- a/mod/lti/tests/task/clean_access_tokens_test.php +++ b/mod/lti/tests/task/clean_access_tokens_test.php @@ -24,7 +24,7 @@ namespace mod_lti\task; * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class clean_access_tokens_test extends \advanced_testcase { +final class clean_access_tokens_test extends \advanced_testcase { /** * Test set up. diff --git a/mod/page/tests/externallib_test.php b/mod/page/tests/externallib_test.php index 92fdad82468..3360f7e55be 100644 --- a/mod/page/tests/externallib_test.php +++ b/mod/page/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_page diff --git a/mod/page/tests/generator_test.php b/mod/page/tests/generator_test.php index a96cab55584..64d7e781b36 100644 --- a/mod/page/tests/generator_test.php +++ b/mod/page/tests/generator_test.php @@ -24,8 +24,8 @@ namespace mod_page; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB, $SITE; $this->resetAfterTest(true); diff --git a/mod/page/tests/lib_test.php b/mod/page/tests/lib_test.php index 96712c0d232..ff32ae8c669 100644 --- a/mod/page/tests/lib_test.php +++ b/mod/page/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php b/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php index 812bc9228ac..72919e7e0a6 100644 --- a/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/delaybetweenattempts/rule.php * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_just_first_delay() { +final class rule_test extends \basic_testcase { + public function test_just_first_delay(): void { $quiz = new \stdClass(); $quiz->attempts = 3; $quiz->timelimit = 0; diff --git a/mod/quiz/accessrule/ipaddress/tests/rule_test.php b/mod/quiz/accessrule/ipaddress/tests/rule_test.php index c5ff7a6eec8..08ac5aec1a9 100644 --- a/mod/quiz/accessrule/ipaddress/tests/rule_test.php +++ b/mod/quiz/accessrule/ipaddress/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/ipaddress/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_ipaddress_access_rule() { +final class rule_test extends \basic_testcase { + public function test_ipaddress_access_rule(): void { $quiz = new \stdClass(); $attempt = new \stdClass(); $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/numattempts/tests/rule_test.php b/mod/quiz/accessrule/numattempts/tests/rule_test.php index c500b0a792e..49c68e91ff7 100644 --- a/mod/quiz/accessrule/numattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/numattempts/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/numattempts/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_num_attempts_access_rule() { +final class rule_test extends \basic_testcase { + public function test_num_attempts_access_rule(): void { $quiz = new \stdClass(); $quiz->attempts = 3; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php index ea314b37d5a..0247974e7b2 100644 --- a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/offlineattempts/rule.php'); * @copyright 2016 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_offlineattempts_access_rule() { +final class rule_test extends \basic_testcase { + public function test_offlineattempts_access_rule(): void { $quiz = new \stdClass(); $quiz->allowofflineattempts = 1; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/openclosedate/tests/rule_test.php b/mod/quiz/accessrule/openclosedate/tests/rule_test.php index 5cfd2801db0..662908eb989 100644 --- a/mod/quiz/accessrule/openclosedate/tests/rule_test.php +++ b/mod/quiz/accessrule/openclosedate/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/openclosedate/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_no_dates() { +final class rule_test extends \basic_testcase { + public function test_no_dates(): void { $quiz = new \stdClass(); $quiz->timeopen = 0; $quiz->timeclose = 0; diff --git a/mod/quiz/accessrule/password/tests/rule_test.php b/mod/quiz/accessrule/password/tests/rule_test.php index 0c5b6eace19..2e250bcdb71 100644 --- a/mod/quiz/accessrule/password/tests/rule_test.php +++ b/mod/quiz/accessrule/password/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/password/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_password_access_rule() { +final class rule_test extends \basic_testcase { + public function test_password_access_rule(): void { $quiz = new \stdClass(); $quiz->password = 'frog'; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/seb/tests/access_manager_test.php b/mod/quiz/accessrule/seb/tests/access_manager_test.php index 8fd5e308349..85d7410d734 100644 --- a/mod/quiz/accessrule/seb/tests/access_manager_test.php +++ b/mod/quiz/accessrule/seb/tests/access_manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quizaccess_seb\access_manager */ -class access_manager_test extends \advanced_testcase { +final class access_manager_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/backup_restore_test.php b/mod/quiz/accessrule/seb/tests/backup_restore_test.php index aa8abe3ed95..151350aeb46 100644 --- a/mod/quiz/accessrule/seb/tests/backup_restore_test.php +++ b/mod/quiz/accessrule/seb/tests/backup_restore_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_restore_test extends \advanced_testcase { +final class backup_restore_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; diff --git a/mod/quiz/accessrule/seb/tests/config_key_test.php b/mod/quiz/accessrule/seb/tests/config_key_test.php index 1e4f2f7572d..2a6dc85ea37 100644 --- a/mod/quiz/accessrule/seb/tests/config_key_test.php +++ b/mod/quiz/accessrule/seb/tests/config_key_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class config_key_test extends \advanced_testcase { +final class config_key_test extends \advanced_testcase { /** * Test that trying to generate the hash key with bad xml will result in an error. diff --git a/mod/quiz/accessrule/seb/tests/event/events_test.php b/mod/quiz/accessrule/seb/tests/event/events_test.php index f96c951d974..97f3113c432 100644 --- a/mod/quiz/accessrule/seb/tests/event/events_test.php +++ b/mod/quiz/accessrule/seb/tests/event/events_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/..//test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/external/validate_quiz_access_test.php b/mod/quiz/accessrule/seb/tests/external/validate_quiz_access_test.php index ec765772125..2ef41f1ebef 100644 --- a/mod/quiz/accessrule/seb/tests/external/validate_quiz_access_test.php +++ b/mod/quiz/accessrule/seb/tests/external/validate_quiz_access_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quizaccess_seb\external\validate_quiz_access */ -class validate_quiz_access_test extends \advanced_testcase { +final class validate_quiz_access_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/helper_test.php b/mod/quiz/accessrule/seb/tests/helper_test.php index 96f23e37045..0ca3184f62b 100644 --- a/mod/quiz/accessrule/seb/tests/helper_test.php +++ b/mod/quiz/accessrule/seb/tests/helper_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/hideif_rule_test.php b/mod/quiz/accessrule/seb/tests/hideif_rule_test.php index 69214a913ca..215f833eeaa 100644 --- a/mod/quiz/accessrule/seb/tests/hideif_rule_test.php +++ b/mod/quiz/accessrule/seb/tests/hideif_rule_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class hideif_rule_test extends \advanced_testcase { +final class hideif_rule_test extends \advanced_testcase { /** * Test that can get rule data. diff --git a/mod/quiz/accessrule/seb/tests/link_generator_test.php b/mod/quiz/accessrule/seb/tests/link_generator_test.php index 57ff94f2c81..a0db9bd3403 100644 --- a/mod/quiz/accessrule/seb/tests/link_generator_test.php +++ b/mod/quiz/accessrule/seb/tests/link_generator_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class link_generator_test extends \advanced_testcase { +final class link_generator_test extends \advanced_testcase { /** * Called before every test. diff --git a/mod/quiz/accessrule/seb/tests/privacy/provider_test.php b/mod/quiz/accessrule/seb/tests/privacy/provider_test.php index c817df65e1c..0a201304f2f 100644 --- a/mod/quiz/accessrule/seb/tests/privacy/provider_test.php +++ b/mod/quiz/accessrule/seb/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once(__DIR__ . '/../test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/property_list_test.php b/mod/quiz/accessrule/seb/tests/property_list_test.php index b6def63d989..e0dc5440f61 100644 --- a/mod/quiz/accessrule/seb/tests/property_list_test.php +++ b/mod/quiz/accessrule/seb/tests/property_list_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class property_list_test extends \advanced_testcase { +final class property_list_test extends \advanced_testcase { /** * Test that an empty PList with a root dictionary is created. diff --git a/mod/quiz/accessrule/seb/tests/quiz_settings_test.php b/mod/quiz/accessrule/seb/tests/quiz_settings_test.php index 7fa0ba32a45..ce1bcf6f80e 100644 --- a/mod/quiz/accessrule/seb/tests/quiz_settings_test.php +++ b/mod/quiz/accessrule/seb/tests/quiz_settings_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_settings_test extends \advanced_testcase { +final class quiz_settings_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** @var context_module $context Test context. */ diff --git a/mod/quiz/accessrule/seb/tests/rule_test.php b/mod/quiz/accessrule/seb/tests/rule_test.php index 307bb2c6182..319abc49c6a 100644 --- a/mod/quiz/accessrule/seb/tests/rule_test.php +++ b/mod/quiz/accessrule/seb/tests/rule_test.php @@ -31,7 +31,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quizaccess_seb */ -class rule_test extends \advanced_testcase { +final class rule_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/settings_provider_test.php b/mod/quiz/accessrule/seb/tests/settings_provider_test.php index a87afffb818..79608f4a51d 100644 --- a/mod/quiz/accessrule/seb/tests/settings_provider_test.php +++ b/mod/quiz/accessrule/seb/tests/settings_provider_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class settings_provider_test extends \advanced_testcase { +final class settings_provider_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/template_test.php b/mod/quiz/accessrule/seb/tests/template_test.php index dbc8f62a8bd..e55c1f8c66b 100644 --- a/mod/quiz/accessrule/seb/tests/template_test.php +++ b/mod/quiz/accessrule/seb/tests/template_test.php @@ -24,8 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class template_test extends \advanced_testcase { - +final class template_test extends \advanced_testcase { /** * Called before every test. */ diff --git a/mod/quiz/accessrule/securewindow/tests/rule_test.php b/mod/quiz/accessrule/securewindow/tests/rule_test.php index 0b0c3e3c60f..903c5952219 100644 --- a/mod/quiz/accessrule/securewindow/tests/rule_test.php +++ b/mod/quiz/accessrule/securewindow/tests/rule_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/securewindow/rule.php'); * @covers \quiz_access_rule_base * @covers \quizaccess_securewindow */ -class rule_test extends \basic_testcase { +final class rule_test extends \basic_testcase { // Nothing very testable in this class, just test that it obeys the general access rule contact. public function test_securewindow_access_rule() { $quiz = new \stdClass(); diff --git a/mod/quiz/accessrule/timelimit/tests/rule_test.php b/mod/quiz/accessrule/timelimit/tests/rule_test.php index a2b4ff77d5c..7fc48750f3a 100644 --- a/mod/quiz/accessrule/timelimit/tests/rule_test.php +++ b/mod/quiz/accessrule/timelimit/tests/rule_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/timelimit/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_time_limit_access_rule() { +final class rule_test extends \basic_testcase { + public function test_time_limit_access_rule(): void { $quiz = new \stdClass(); $quiz->timeclose = 0; $quiz->timelimit = 3600; diff --git a/mod/quiz/report/grading/tests/privacy/provider_test.php b/mod/quiz/report/grading/tests/privacy/provider_test.php index cce967d1749..ee9cac009ca 100644 --- a/mod/quiz/report/grading/tests/privacy/provider_test.php +++ b/mod/quiz/report/grading/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/questionattempt.php'); /** * Privacy provider tests class. */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/overview/tests/privacy/provider_test.php b/mod/quiz/report/overview/tests/privacy/provider_test.php index 289edd58499..a16be7079f8 100644 --- a/mod/quiz/report/overview/tests/privacy/provider_test.php +++ b/mod/quiz/report/overview/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/overview/tests/report_test.php b/mod/quiz/report/overview/tests/report_test.php index e040be3331b..d483c7d5e9d 100644 --- a/mod/quiz/report/overview/tests/report_test.php +++ b/mod/quiz/report/overview/tests/report_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_test extends \advanced_testcase { +final class report_test extends \advanced_testcase { use \quiz_question_helper_test_trait; /** diff --git a/mod/quiz/report/responses/tests/privacy/provider_test.php b/mod/quiz/report/responses/tests/privacy/provider_test.php index 6801cd59b8e..09e9609570a 100644 --- a/mod/quiz/report/responses/tests/privacy/provider_test.php +++ b/mod/quiz/report/responses/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/question/engine/questionattempt.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php b/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php index 796f5f08edf..3f8f1057cdd 100644 --- a/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php +++ b/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php @@ -34,7 +34,7 @@ use quiz_statistics\tests\statistics_test_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics\event\observer\attempt_submitted */ -class attempt_submitted_test extends \advanced_testcase { +final class quiz_attempt_submitted_test extends \advanced_testcase { use \quiz_question_helper_test_trait; use statistics_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php b/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php index 6b1ca956e3a..a2f9b2d57be 100644 --- a/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php +++ b/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php @@ -34,7 +34,7 @@ use quiz_statistics\tests\statistics_test_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics\quiz_attempt_deleted */ -class quiz_attempt_deleted_test extends \advanced_testcase { +final class quiz_attempt_deleted_test extends \advanced_testcase { use \quiz_question_helper_test_trait; use statistics_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php b/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php index 0170a3769fe..472f49eeee3 100644 --- a/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php +++ b/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics_report */ -class quiz_statistics_report_test extends \advanced_testcase { +final class quiz_statistics_report_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php b/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php index 18da5a9a95f..65c451f35b7 100644 --- a/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php +++ b/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php @@ -33,7 +33,7 @@ use mod_quiz\quiz_settings; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics\quiz_structure_modified */ -class quiz_structure_modified_test extends \advanced_testcase { +final class quiz_structure_modified_test extends \advanced_testcase { use \quiz_question_helper_test_trait; /** diff --git a/mod/quiz/report/statistics/tests/statistics_table_test.php b/mod/quiz/report/statistics/tests/statistics_table_test.php index 1169112d545..645705f7742 100644 --- a/mod/quiz/report/statistics/tests/statistics_table_test.php +++ b/mod/quiz/report/statistics/tests/statistics_table_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/quiz/report/statistics/statistics_table.php') * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statistics_table_test extends \advanced_testcase { +final class statistics_table_test extends \advanced_testcase { public function test_format_percentage() { $table = new quiz_statistics_table(); diff --git a/mod/quiz/report/statistics/tests/statistics_test.php b/mod/quiz/report/statistics/tests/statistics_test.php index 0706c6d3931..7b4bdd93bca 100644 --- a/mod/quiz/report/statistics/tests/statistics_test.php +++ b/mod/quiz/report/statistics/tests/statistics_test.php @@ -101,7 +101,7 @@ class testable_question_statistics extends \core_question\statistics\questions\c * @copyright 2008 Jamie Pratt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statistics_test extends \basic_testcase { +final class statistics_test extends \basic_testcase { /** @var testable_all_calculated_for_qubaid_condition object created to test class. */ protected $qstats; diff --git a/mod/quiz/tests/attempt_test.php b/mod/quiz/tests/attempt_test.php index f321ea5db92..9eed3d71a2c 100644 --- a/mod/quiz/tests/attempt_test.php +++ b/mod/quiz/tests/attempt_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @copyright 2014 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class attempt_test extends \advanced_testcase { +final class attempt_test extends \advanced_testcase { /** * Create quiz and attempt data with layout. diff --git a/mod/quiz/tests/attempts_test.php b/mod/quiz/tests/attempts_test.php index 52abb662895..2f64b1b0c50 100644 --- a/mod/quiz/tests/attempts_test.php +++ b/mod/quiz/tests/attempts_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/group/lib.php'); * @copyright 2012 Matt Petro * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class attempts_test extends \advanced_testcase { +final class attempts_test extends \advanced_testcase { /** * Test the functions quiz_update_open_attempts(), get_list_of_overdue_attempts() and diff --git a/mod/quiz/tests/backup/restore_date_test.php b/mod/quiz/tests/backup/restore_date_test.php index f2f700de814..a4515fdc282 100644 --- a/mod/quiz/tests/backup/restore_date_test.php +++ b/mod/quiz/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/quiz/tests/calendar_event_modified_test.php b/mod/quiz/tests/calendar_event_modified_test.php index 542040123c7..9428435effd 100644 --- a/mod/quiz/tests/calendar_event_modified_test.php +++ b/mod/quiz/tests/calendar_event_modified_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/quiz/lib.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class calendar_event_modified_test extends \advanced_testcase { +final class calendar_event_modified_test extends \advanced_testcase { /** * Create an instance of the quiz activity. diff --git a/mod/quiz/tests/custom_completion_test.php b/mod/quiz/tests/custom_completion_test.php index 0420ffad606..d3f549efe55 100644 --- a/mod/quiz/tests/custom_completion_test.php +++ b/mod/quiz/tests/custom_completion_test.php @@ -40,7 +40,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_quiz\completion\custom_completion */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Setup function for all tests. diff --git a/mod/quiz/tests/dates_test.php b/mod/quiz/tests/dates_test.php index 5b0c135612c..e657b31527d 100644 --- a/mod/quiz/tests/dates_test.php +++ b/mod/quiz/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/quiz/tests/event/events_test.php b/mod/quiz/tests/event/events_test.php index cce2d0fb7a3..4589dbd1986 100644 --- a/mod/quiz/tests/event/events_test.php +++ b/mod/quiz/tests/event/events_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/mod/quiz/attemptlib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup a quiz. diff --git a/mod/quiz/tests/external/external_test.php b/mod/quiz/tests/external/external_test.php index e97b047aa01..7e27b2b0773 100644 --- a/mod/quiz/tests/external/external_test.php +++ b/mod/quiz/tests/external/external_test.php @@ -81,7 +81,7 @@ class testable_mod_quiz_external extends mod_quiz_external { * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/mod/quiz/tests/generator_test.php b/mod/quiz/tests/generator_test.php index 6d8c0ead5e3..a2024e20337 100644 --- a/mod/quiz/tests/generator_test.php +++ b/mod/quiz/tests/generator_test.php @@ -25,8 +25,8 @@ namespace mod_quiz; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz_generator */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB, $SITE; $this->resetAfterTest(true); diff --git a/mod/quiz/tests/lib_test.php b/mod/quiz/tests/lib_test.php index 0ccd0ac1dff..42428a66340 100644 --- a/mod/quiz/tests/lib_test.php +++ b/mod/quiz/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/quiz/lib.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_quiz_has_grades() { $quiz = new \stdClass(); $quiz->grade = '100.0000'; diff --git a/mod/quiz/tests/local_structure_slot_random_test.php b/mod/quiz/tests/local_structure_slot_random_test.php index 82334b4b22b..206802e4c0e 100644 --- a/mod/quiz/tests/local_structure_slot_random_test.php +++ b/mod/quiz/tests/local_structure_slot_random_test.php @@ -27,7 +27,7 @@ use mod_quiz\question\bank\qbank_helper; * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class local_structure_slot_random_test extends \advanced_testcase { +final class local_structure_slot_random_test extends \advanced_testcase { /** * Constructor test. */ diff --git a/mod/quiz/tests/locallib_test.php b/mod/quiz/tests/locallib_test.php index a3c9f687a8d..249b012f7c9 100644 --- a/mod/quiz/tests/locallib_test.php +++ b/mod/quiz/tests/locallib_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @copyright 2008 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { public function test_quiz_rescale_grade() { $quiz = new \stdClass(); diff --git a/mod/quiz/tests/privacy/provider_test.php b/mod/quiz/tests/privacy/provider_test.php index a7292e7170e..08dd17d5e17 100644 --- a/mod/quiz/tests/privacy/provider_test.php +++ b/mod/quiz/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/tests/privacy_helper.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { use \core_question_privacy_helper; diff --git a/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php b/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php index a908760957d..2efe80db470 100644 --- a/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php +++ b/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/quiz/attemptlib.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class privacy_legacy_quizaccess_polyfill_test extends \advanced_testcase { +final class privacy_legacy_quizaccess_polyfill_test extends \advanced_testcase { /** * Test that the core_quizaccess\privacy\legacy_polyfill works and that the static _export_quizaccess_user_data can * be called. diff --git a/mod/quiz/tests/qbank_helper_test.php b/mod/quiz/tests/qbank_helper_test.php index d5784639efb..30044978b79 100644 --- a/mod/quiz/tests/qbank_helper_test.php +++ b/mod/quiz/tests/qbank_helper_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/quiz_question_helper_test_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_quiz\question\bank\qbank_helper */ -class qbank_helper_test extends \advanced_testcase { +final class qbank_helper_test extends \advanced_testcase { use \quiz_question_helper_test_trait; /** diff --git a/mod/quiz/tests/quiz_notify_attempt_manual_grading_completed_test.php b/mod/quiz/tests/quiz_notify_attempt_manual_grading_completed_test.php index 44c189dfb9e..b2897e142b1 100644 --- a/mod/quiz/tests/quiz_notify_attempt_manual_grading_completed_test.php +++ b/mod/quiz/tests/quiz_notify_attempt_manual_grading_completed_test.php @@ -43,7 +43,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_notify_attempt_manual_grading_completed_test extends advanced_testcase { +final class quiz_notify_attempt_manual_grading_completed_test extends advanced_testcase { /** @var \stdClass $course Test course to contain quiz. */ protected $course; diff --git a/mod/quiz/tests/quiz_question_bank_view_test.php b/mod/quiz/tests/quiz_question_bank_view_test.php index 7058ea33203..263d738e45d 100644 --- a/mod/quiz/tests/quiz_question_bank_view_test.php +++ b/mod/quiz/tests/quiz_question_bank_view_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @copyright 2018 the Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_question_bank_view_test extends \advanced_testcase { +final class quiz_question_bank_view_test extends \advanced_testcase { public function test_viewing_question_bank_should_not_load_individual_questions() { $this->resetAfterTest(); diff --git a/mod/quiz/tests/quiz_question_restore_test.php b/mod/quiz/tests/quiz_question_restore_test.php index b4f7d8b4d6d..dae45f9a3e9 100644 --- a/mod/quiz/tests/quiz_question_restore_test.php +++ b/mod/quiz/tests/quiz_question_restore_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @author Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_question_restore_test extends \advanced_testcase { +final class quiz_question_restore_test extends \advanced_testcase { use \quiz_question_helper_test_trait; /** diff --git a/mod/quiz/tests/quiz_question_version_test.php b/mod/quiz/tests/quiz_question_version_test.php index c59250c28d9..4a0195477eb 100644 --- a/mod/quiz/tests/quiz_question_version_test.php +++ b/mod/quiz/tests/quiz_question_version_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/quiz_question_helper_test_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_quiz\question\bank\qbank_helper */ -class quiz_question_version_test extends \advanced_testcase { +final class quiz_question_version_test extends \advanced_testcase { use \quiz_question_helper_test_trait; /** diff --git a/mod/quiz/tests/quizobj_test.php b/mod/quiz/tests/quizobj_test.php index fa141b2a4d8..ae172a546fd 100644 --- a/mod/quiz/tests/quizobj_test.php +++ b/mod/quiz/tests/quizobj_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quizobj_test extends \basic_testcase { +final class quizobj_test extends \basic_testcase { public function test_cannot_review_message() { $quiz = new \stdClass(); $quiz->reviewattempt = 0x10010; diff --git a/mod/quiz/tests/repaginate_test.php b/mod/quiz/tests/repaginate_test.php index 51422068c56..11d65b9e9d1 100644 --- a/mod/quiz/tests/repaginate_test.php +++ b/mod/quiz/tests/repaginate_test.php @@ -64,7 +64,7 @@ class mod_quiz_repaginate_testable extends repaginate { * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repaginate_test extends \advanced_testcase { +final class repaginate_test extends \advanced_testcase { /** @var array stores the slots. */ private $quizslots; diff --git a/mod/quiz/tests/reportlib_test.php b/mod/quiz/tests/reportlib_test.php index fafa19b33e2..df3b94186f1 100644 --- a/mod/quiz/tests/reportlib_test.php +++ b/mod/quiz/tests/reportlib_test.php @@ -32,9 +32,9 @@ require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); * @copyright 2008 Jamie Pratt me@jamiep.org * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class reportlib_test extends \advanced_testcase { - public function test_quiz_report_index_by_keys() { - $datum = array(); +final class reportlib_test extends \advanced_testcase { + public function test_quiz_report_index_by_keys(): void { + $datum = []; $object = new \stdClass(); $object->qid = 3; $object->aid = 101; diff --git a/mod/quiz/tests/restore_attempt_test.php b/mod/quiz/tests/restore_attempt_test.php index 5fd21c18c9b..46512a33366 100644 --- a/mod/quiz/tests/restore_attempt_test.php +++ b/mod/quiz/tests/restore_attempt_test.php @@ -28,7 +28,7 @@ use restore_dbops; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_attempt_test extends \advanced_testcase { +final class restore_attempt_test extends \advanced_testcase { /** * Load required libraries diff --git a/mod/quiz/tests/restore_override_test.php b/mod/quiz/tests/restore_override_test.php index 6234639c561..a915b5e3639 100644 --- a/mod/quiz/tests/restore_override_test.php +++ b/mod/quiz/tests/restore_override_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_override_test extends \restore_date_testcase { +final class restore_override_test extends \restore_date_testcase { /** * Test restore overrides. diff --git a/mod/quiz/tests/structure_test.php b/mod/quiz/tests/structure_test.php index 5a1c83d28ab..90f5af89edb 100644 --- a/mod/quiz/tests/structure_test.php +++ b/mod/quiz/tests/structure_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/quiz/attemptlib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class structure_test extends \advanced_testcase { +final class structure_test extends \advanced_testcase { /** * Create a course with an empty quiz. diff --git a/mod/quiz/tests/tags_test.php b/mod/quiz/tests/tags_test.php index 386d0dcc2d3..ccb5ecaff80 100644 --- a/mod/quiz/tests/tags_test.php +++ b/mod/quiz/tests/tags_test.php @@ -28,8 +28,8 @@ use quiz; * @author 2021 Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tags_test extends \advanced_testcase { - public function test_restore_random_question_by_tag() { +final class tags_test extends \advanced_testcase { + public function test_restore_random_question_by_tag(): void { global $CFG, $USER, $DB; require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); diff --git a/mod/resource/tests/backup/restore_date_test.php b/mod/resource/tests/backup/restore_date_test.php index 40d311fe714..5dec86f155f 100644 --- a/mod/resource/tests/backup/restore_date_test.php +++ b/mod/resource/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/resource/tests/event/events_test.php b/mod/resource/tests/event/events_test.php index 8ddb9acbf00..b080e9627d0 100644 --- a/mod/resource/tests/event/events_test.php +++ b/mod/resource/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace mod_resource\event; * @copyright 2014 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/mod/resource/tests/externallib_test.php b/mod/resource/tests/externallib_test.php index 946ffbeefb6..dbe966070c7 100644 --- a/mod/resource/tests/externallib_test.php +++ b/mod/resource/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_resource diff --git a/mod/resource/tests/generator_test.php b/mod/resource/tests/generator_test.php index af6016a958d..0c0536d16bf 100644 --- a/mod/resource/tests/generator_test.php +++ b/mod/resource/tests/generator_test.php @@ -25,7 +25,7 @@ namespace mod_resource; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_generator() { global $DB, $SITE; diff --git a/mod/resource/tests/lib_test.php b/mod/resource/tests/lib_test.php index 5d314c2aaa2..ad75260235b 100644 --- a/mod/resource/tests/lib_test.php +++ b/mod/resource/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/resource/tests/search/search_test.php b/mod/resource/tests/search/search_test.php index 7bbd6cf29dc..5490f2b54b3 100644 --- a/mod/resource/tests/search/search_test.php +++ b/mod/resource/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/scorm/report/basic/tests/privacy/provider_test.php b/mod/scorm/report/basic/tests/privacy/provider_test.php index da05406c1e7..c6500fca92b 100644 --- a/mod/scorm/report/basic/tests/privacy/provider_test.php +++ b/mod/scorm/report/basic/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use scormreport_basic\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/mod/scorm/report/interactions/tests/privacy/provider_test.php b/mod/scorm/report/interactions/tests/privacy/provider_test.php index 6add72fe501..0c76de95856 100644 --- a/mod/scorm/report/interactions/tests/privacy/provider_test.php +++ b/mod/scorm/report/interactions/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use scormreport_interactions\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/mod/scorm/report/objectives/tests/privacy/provider_test.php b/mod/scorm/report/objectives/tests/privacy/provider_test.php index 25d4d35e48b..00a887a66f2 100644 --- a/mod/scorm/report/objectives/tests/privacy/provider_test.php +++ b/mod/scorm/report/objectives/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use scormreport_objectives\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/mod/scorm/tests/backup/restore_date_test.php b/mod/scorm/tests/backup/restore_date_test.php index 55075b7cacf..b5263aae3c1 100644 --- a/mod/scorm/tests/backup/restore_date_test.php +++ b/mod/scorm/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/scorm/tests/custom_completion_test.php b/mod/scorm/tests/custom_completion_test.php index fdb083d4282..7bf2af5be72 100644 --- a/mod/scorm/tests/custom_completion_test.php +++ b/mod/scorm/tests/custom_completion_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot.'/mod/scorm/locallib.php'); * @copyright 2021 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/scorm/tests/dates_test.php b/mod/scorm/tests/dates_test.php index f9cf79c1dcc..878bcbd091f 100644 --- a/mod/scorm/tests/dates_test.php +++ b/mod/scorm/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/scorm/tests/event/events_test.php b/mod/scorm/tests/event/events_test.php index db1a90fd771..a9ee198ccc4 100644 --- a/mod/scorm/tests/event/events_test.php +++ b/mod/scorm/tests/event/events_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); * @copyright 2013 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass store course object */ protected $eventcourse; diff --git a/mod/scorm/tests/externallib_test.php b/mod/scorm/tests/externallib_test.php index f26ee06e804..b29ecfdc5c0 100644 --- a/mod/scorm/tests/externallib_test.php +++ b/mod/scorm/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/mod/scorm/tests/formatduration_test.php b/mod/scorm/tests/formatduration_test.php index 606a346d0de..8d655a8e90a 100644 --- a/mod/scorm/tests/formatduration_test.php +++ b/mod/scorm/tests/formatduration_test.php @@ -30,8 +30,8 @@ require_once($CFG->dirroot . '/mod/scorm/locallib.php'); // Include the code to * @copyright 2009 Dan Marsden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formatduration_test extends \basic_testcase { - public function test_scorm2004_format() { +final class formatduration_test extends \basic_testcase { + public function test_scorm2004_format(): void { $stryears = get_string('years'); $strmonths = trim(get_string('nummonths')); $strdays = get_string('days'); diff --git a/mod/scorm/tests/generator_test.php b/mod/scorm/tests/generator_test.php index 7ba6cefba43..ae67c0a64f9 100644 --- a/mod/scorm/tests/generator_test.php +++ b/mod/scorm/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_scorm; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $CFG, $USER; diff --git a/mod/scorm/tests/lib_test.php b/mod/scorm/tests/lib_test.php index 961f9a2d555..dc7998cad69 100644 --- a/mod/scorm/tests/lib_test.php +++ b/mod/scorm/tests/lib_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Set up for every test diff --git a/mod/scorm/tests/locallib_test.php b/mod/scorm/tests/locallib_test.php index 6f7093a50c4..928d7474ac7 100644 --- a/mod/scorm/tests/locallib_test.php +++ b/mod/scorm/tests/locallib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/scorm/tests/privacy/provider_test.php b/mod/scorm/tests/privacy/provider_test.php index 69318090898..7a2892c4b50 100644 --- a/mod/scorm/tests/privacy/provider_test.php +++ b/mod/scorm/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass User without any AICC/SCORM attempt. */ protected $student0; diff --git a/mod/scorm/tests/validatepackage_test.php b/mod/scorm/tests/validatepackage_test.php index 69bb4e723c3..5bc7871d962 100644 --- a/mod/scorm/tests/validatepackage_test.php +++ b/mod/scorm/tests/validatepackage_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/scorm/locallib.php'); * @copyright 2013 Dan Marsden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class validatepackage_test extends \advanced_testcase { +final class validatepackage_test extends \advanced_testcase { /** * Convenience to take a fixture test file and create a stored_file. diff --git a/mod/survey/tests/backup/restore_date_test.php b/mod/survey/tests/backup/restore_date_test.php index c8720d929e0..4adaab8e975 100644 --- a/mod/survey/tests/backup/restore_date_test.php +++ b/mod/survey/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/survey/tests/custom_completion_test.php b/mod/survey/tests/custom_completion_test.php index 98373d8e05b..a9562b70341 100644 --- a/mod/survey/tests/custom_completion_test.php +++ b/mod/survey/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/survey/tests/event/events_test.php b/mod/survey/tests/event/events_test.php index 74e169892d6..b057750f20f 100644 --- a/mod/survey/tests/event/events_test.php +++ b/mod/survey/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace mod_survey\event; * @copyright 2014 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup. diff --git a/mod/survey/tests/externallib_test.php b/mod/survey/tests/externallib_test.php index 95fba651303..84cfe3bf1e0 100644 --- a/mod/survey/tests/externallib_test.php +++ b/mod/survey/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/survey/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/mod/survey/tests/generator_test.php b/mod/survey/tests/generator_test.php index 841c497db3e..c8dc47000bf 100644 --- a/mod/survey/tests/generator_test.php +++ b/mod/survey/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_survey; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/survey/tests/lib_test.php b/mod/survey/tests/lib_test.php index 8b874b2e7ac..8b2499040b3 100644 --- a/mod/survey/tests/lib_test.php +++ b/mod/survey/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/survey/tests/privacy/provider_test.php b/mod/survey/tests/privacy/provider_test.php index ef3e32c035f..c5763a106d1 100644 --- a/mod/survey/tests/privacy/provider_test.php +++ b/mod/survey/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/survey/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/survey/tests/search/search_test.php b/mod/survey/tests/search/search_test.php index 709be295a8a..999524b3d6c 100644 --- a/mod/survey/tests/search/search_test.php +++ b/mod/survey/tests/search/search_test.php @@ -37,7 +37,7 @@ namespace mod_survey\search; * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test survey_view diff --git a/mod/url/tests/externallib_test.php b/mod/url/tests/externallib_test.php index d361c3d21ca..f42bcb138b3 100644 --- a/mod/url/tests/externallib_test.php +++ b/mod/url/tests/externallib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test view_url diff --git a/mod/url/tests/generator_test.php b/mod/url/tests/generator_test.php index ecb983d2464..70cfa0b81b3 100644 --- a/mod/url/tests/generator_test.php +++ b/mod/url/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_url; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/url/tests/lib_test.php b/mod/url/tests/lib_test.php index f23e121b2e1..30203ceff36 100644 --- a/mod/url/tests/lib_test.php +++ b/mod/url/tests/lib_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/wiki/tests/backup/restore_date_test.php b/mod/wiki/tests/backup/restore_date_test.php index 5de3d6c8a60..e8abb132127 100644 --- a/mod/wiki/tests/backup/restore_date_test.php +++ b/mod/wiki/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/wiki/tests/backup/restore_format_test.php b/mod/wiki/tests/backup/restore_format_test.php index 0c4ff22f62a..c27cc5eae58 100644 --- a/mod/wiki/tests/backup/restore_format_test.php +++ b/mod/wiki/tests/backup/restore_format_test.php @@ -24,7 +24,7 @@ namespace mod_wiki\backup; * * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_format_test extends \advanced_testcase { +final class restore_format_test extends \advanced_testcase { /** * Data provider for test_duplicating_wiki_removes_unwanted_formats. diff --git a/mod/wiki/tests/event/events_test.php b/mod/wiki/tests/event/events_test.php index 1d9fd3a6ec1..cfdb77293aa 100644 --- a/mod/wiki/tests/event/events_test.php +++ b/mod/wiki/tests/event/events_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot.'/mod/wiki/locallib.php'); * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { private $course; private $wiki; private $wikigenerator; diff --git a/mod/wiki/tests/externallib_test.php b/mod/wiki/tests/externallib_test.php index 4e728f4c2b3..2f56f4d7e86 100644 --- a/mod/wiki/tests/externallib_test.php +++ b/mod/wiki/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/wiki/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/mod/wiki/tests/generator_test.php b/mod/wiki/tests/generator_test.php index 601b2d1bdcb..444c1327b0a 100644 --- a/mod/wiki/tests/generator_test.php +++ b/mod/wiki/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_wiki; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/wiki/tests/lib_test.php b/mod/wiki/tests/lib_test.php index 88aa4105d4a..625b6e1aae4 100644 --- a/mod/wiki/tests/lib_test.php +++ b/mod/wiki/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test wiki_view. diff --git a/mod/wiki/tests/privacy/provider_test.php b/mod/wiki/tests/privacy/provider_test.php index be61e2e21b6..ac26818dfe2 100644 --- a/mod/wiki/tests/privacy/provider_test.php +++ b/mod/wiki/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot.'/mod/wiki/locallib.php'); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var array */ protected $users = []; diff --git a/mod/wiki/tests/search/search_test.php b/mod/wiki/tests/search/search_test.php index 29d97934c04..14ab1a62e36 100644 --- a/mod/wiki/tests/search/search_test.php +++ b/mod/wiki/tests/search/search_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/wiki/tests/wikiparser_test.php b/mod/wiki/tests/wikiparser_test.php index d878a9e4338..8b35c578a12 100644 --- a/mod/wiki/tests/wikiparser_test.php +++ b/mod/wiki/tests/wikiparser_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/wiki/parser/parser.php'); * * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class wikiparser_test extends \advanced_testcase { +final class wikiparser_test extends \advanced_testcase { /** * URL inside the clickable text of some link should not be turned into a new link via the url_tag_rule. diff --git a/mod/workshop/allocation/manual/tests/privacy/provider_test.php b/mod/workshop/allocation/manual/tests/privacy/provider_test.php index c3a05324daa..024bd8fb744 100644 --- a/mod/workshop/allocation/manual/tests/privacy/provider_test.php +++ b/mod/workshop/allocation/manual/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. diff --git a/mod/workshop/allocation/random/tests/allocator_test.php b/mod/workshop/allocation/random/tests/allocator_test.php index b8d3914e0f6..f1d1386093e 100644 --- a/mod/workshop/allocation/random/tests/allocator_test.php +++ b/mod/workshop/allocation/random/tests/allocator_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/mod/workshop/allocation/random/lib.php'); * @copyright 2009 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class allocator_test extends \advanced_testcase { +final class allocator_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php b/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php index cd031a34b94..9c19fa8dbcd 100644 --- a/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php +++ b/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php @@ -23,7 +23,7 @@ namespace workshopallocation_scheduled; * @copyright 2020 Jaume I University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scheduled_allocator_test extends \advanced_testcase { +final class scheduled_allocator_test extends \advanced_testcase { /** @var \stdClass $course The course where the tests will be run */ private $course; diff --git a/mod/workshop/eval/best/tests/lib_test.php b/mod/workshop/eval/best/tests/lib_test.php index 21208ce662a..bd24e68d097 100644 --- a/mod/workshop/eval/best/tests/lib_test.php +++ b/mod/workshop/eval/best/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->libdir . '/gradelib.php'); /** * Unit tests for grading evaluation lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/accumulative/tests/lib_test.php b/mod/workshop/form/accumulative/tests/lib_test.php index 5c609de73fd..e1d9d73ea39 100644 --- a/mod/workshop/form/accumulative/tests/lib_test.php +++ b/mod/workshop/form/accumulative/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/accumulative/lib.php'); /** * Unit tests for Accumulative grading strategy lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/accumulative/tests/privacy/provider_test.php b/mod/workshop/form/accumulative/tests/privacy/provider_test.php index 2cd05e9dcc9..2a7bda2af79 100644 --- a/mod/workshop/form/accumulative/tests/privacy/provider_test.php +++ b/mod/workshop/form/accumulative/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test {@link workshopform_accumulative\privacy\provider::export_assessment_form()} implementation. diff --git a/mod/workshop/form/comments/tests/privacy/provider_test.php b/mod/workshop/form/comments/tests/privacy/provider_test.php index bfc37b773dc..34a6e2bf93a 100644 --- a/mod/workshop/form/comments/tests/privacy/provider_test.php +++ b/mod/workshop/form/comments/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test {@link workshopform_comments\privacy\provider::export_assessment_form()} implementation. diff --git a/mod/workshop/form/numerrors/tests/lib_test.php b/mod/workshop/form/numerrors/tests/lib_test.php index 931c4649759..8f10b5ba9de 100644 --- a/mod/workshop/form/numerrors/tests/lib_test.php +++ b/mod/workshop/form/numerrors/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/numerrors/lib.php'); /** * Unit tests for Number of errors grading lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/numerrors/tests/privacy/provider_test.php b/mod/workshop/form/numerrors/tests/privacy/provider_test.php index a2f5b2b886d..ff23776f698 100644 --- a/mod/workshop/form/numerrors/tests/privacy/provider_test.php +++ b/mod/workshop/form/numerrors/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test {@link workshopform_numerrors\privacy\provider::export_assessment_form()} implementation. diff --git a/mod/workshop/form/rubric/tests/lib_test.php b/mod/workshop/form/rubric/tests/lib_test.php index 803e8ef0be1..78b19151d4a 100644 --- a/mod/workshop/form/rubric/tests/lib_test.php +++ b/mod/workshop/form/rubric/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/rubric/lib.php'); /** * Unit tests for Rubric grading strategy lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/rubric/tests/privacy/provider_test.php b/mod/workshop/form/rubric/tests/privacy/provider_test.php index e0359e74aec..b925c14af6b 100644 --- a/mod/workshop/form/rubric/tests/privacy/provider_test.php +++ b/mod/workshop/form/rubric/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test {@link workshopform_rubric\privacy\provider::export_assessment_form()} implementation. diff --git a/mod/workshop/tests/backup/restore_date_test.php b/mod/workshop/tests/backup/restore_date_test.php index 2c58be0a81f..261e337b0a7 100644 --- a/mod/workshop/tests/backup/restore_date_test.php +++ b/mod/workshop/tests/backup/restore_date_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . "/mod/workshop/tests/fixtures/testable.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/workshop/tests/dates_test.php b/mod/workshop/tests/dates_test.php index 3c49437bf81..b3c8c112f78 100644 --- a/mod/workshop/tests/dates_test.php +++ b/mod/workshop/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/workshop/tests/event/events_test.php b/mod/workshop/tests/event/events_test.php index ea4c8ae89b6..ae2ffc75ffa 100644 --- a/mod/workshop/tests/event/events_test.php +++ b/mod/workshop/tests/event/events_test.php @@ -39,7 +39,7 @@ require_once(__DIR__ . '/../fixtures/testable.php'); /** * Test cases for the internal workshop api */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var \stdClass $workshop Basic workshop data stored in an object. */ protected $workshop; diff --git a/mod/workshop/tests/external/external_test.php b/mod/workshop/tests/external/external_test.php index e8906a0ed72..ebbcec93f32 100644 --- a/mod/workshop/tests/external/external_test.php +++ b/mod/workshop/tests/external/external_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/mod/workshop/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.4 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** @var stdClass course object */ private $course; diff --git a/mod/workshop/tests/generator_test.php b/mod/workshop/tests/generator_test.php index efa2b7ca8b5..bc82786352a 100644 --- a/mod/workshop/tests/generator_test.php +++ b/mod/workshop/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_workshop; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/workshop/tests/lib_test.php b/mod/workshop/tests/lib_test.php index eddb14b9c53..7be1fa9564b 100644 --- a/mod/workshop/tests/lib_test.php +++ b/mod/workshop/tests/lib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/workshop/lib.php'); * @copyright 2017 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test calendar event provide action open. diff --git a/mod/workshop/tests/locallib_test.php b/mod/workshop/tests/locallib_test.php index 802163fcf58..3ee885e37a0 100644 --- a/mod/workshop/tests/locallib_test.php +++ b/mod/workshop/tests/locallib_test.php @@ -39,7 +39,7 @@ require_once(__DIR__ . '/fixtures/testable.php'); /** * Test cases for the internal workshop api */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** @var object */ protected $course; diff --git a/mod/workshop/tests/portfolio_caller_test.php b/mod/workshop/tests/portfolio_caller_test.php index 195f9101eb2..ff4da301f9a 100644 --- a/mod/workshop/tests/portfolio_caller_test.php +++ b/mod/workshop/tests/portfolio_caller_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/workshop/classes/portfolio_caller.php'); * @copyright 2016 An Pham Van * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** @var \stdClass $workshop Basic workshop data stored in an object. */ protected $workshop; diff --git a/mod/workshop/tests/privacy/provider_test.php b/mod/workshop/tests/privacy/provider_test.php index a33272fab4e..99e630297d8 100644 --- a/mod/workshop/tests/privacy/provider_test.php +++ b/mod/workshop/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var testing_data_generator */ protected $generator; diff --git a/mod/workshop/tests/task/cron_task_test.php b/mod/workshop/tests/task/cron_task_test.php index 2de236b8e87..699a026a8c7 100644 --- a/mod/workshop/tests/task/cron_task_test.php +++ b/mod/workshop/tests/task/cron_task_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/mod/workshop/lib.php'); * @copyright 2019 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cron_task_test extends \advanced_testcase { +final class cron_task_test extends \advanced_testcase { /** * Test that the phase is automatically switched after the submissions deadline. diff --git a/my/tests/event/events_test.php b/my/tests/event/events_test.php index 3b7c486a6f4..0697e68c906 100644 --- a/my/tests/event/events_test.php +++ b/my/tests/event/events_test.php @@ -27,7 +27,7 @@ use context_user; * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var user cobject */ protected $user; diff --git a/my/tests/privacy/provider_test.php b/my/tests/privacy/provider_test.php index 88feb2f3862..eec73504b9b 100644 --- a/my/tests/privacy/provider_test.php +++ b/my/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_my\privacy\provider; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::test_export_user_preferences(). diff --git a/notes/tests/event/events_test.php b/notes/tests/event/events_test.php index a0425b6cb68..48f3097ffb7 100644 --- a/notes/tests/event/events_test.php +++ b/notes/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace core_notes\event; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass A note object. */ private $eventnote; diff --git a/notes/tests/externallib_test.php b/notes/tests/externallib_test.php index 61ca6245a73..5ac7295fc77 100644 --- a/notes/tests/externallib_test.php +++ b/notes/tests/externallib_test.php @@ -35,7 +35,7 @@ global $CFG; require_once($CFG->dirroot . '/webservice/tests/helpers.php'); require_once($CFG->dirroot . '/notes/externallib.php'); -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test create_notes diff --git a/notes/tests/generator_test.php b/notes/tests/generator_test.php index b8eafd0f6b5..3516212e497 100644 --- a/notes/tests/generator_test.php +++ b/notes/tests/generator_test.php @@ -31,7 +31,7 @@ namespace core_notes; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** Test create_instance method */ public function test_create_instance() { diff --git a/notes/tests/lib_test.php b/notes/tests/lib_test.php index 2ec419bfdd0..b9bb4e3d52f 100644 --- a/notes/tests/lib_test.php +++ b/notes/tests/lib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/notes/lib.php'); * @copyright 2015 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/notes/tests/privacy/provider_test.php b/notes/tests/privacy/provider_test.php index e6832d18c84..954495a79de 100644 --- a/notes/tests/privacy/provider_test.php +++ b/notes/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_contexts_for_userid(). diff --git a/notes/tests/reportbuilder/datasource/notes_test.php b/notes/tests/reportbuilder/datasource/notes_test.php index 28e8ea37183..8be97213e9f 100644 --- a/notes/tests/reportbuilder/datasource/notes_test.php +++ b/notes/tests/reportbuilder/datasource/notes_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class notes_test extends core_reportbuilder_testcase { +final class notes_test extends core_reportbuilder_testcase { /** * Load required test libraries diff --git a/payment/tests/generator_test.php b/payment/tests/generator_test.php index afd03dcfee7..b09657576c4 100644 --- a/payment/tests/generator_test.php +++ b/payment/tests/generator_test.php @@ -33,7 +33,7 @@ namespace core_payment; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_account() { global $DB; diff --git a/payment/tests/helper_test.php b/payment/tests/helper_test.php index bb66e0716cf..1137ec5d9a4 100644 --- a/payment/tests/helper_test.php +++ b/payment/tests/helper_test.php @@ -36,7 +36,7 @@ use core\plugininfo\paygw; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends advanced_testcase { +final class helper_test extends advanced_testcase { protected function enable_paypal_gateway(): bool { if (!array_key_exists('paypal', \core_component::get_plugin_list('paygw'))) { diff --git a/plagiarism/tests/privacy/legacy_polyfill_test.php b/plagiarism/tests/privacy/legacy_polyfill_test.php index 9072b28ea32..b7a1697572a 100644 --- a/plagiarism/tests/privacy/legacy_polyfill_test.php +++ b/plagiarism/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_plagiarism\privacy\legacy_polyfill works and that the static _export_plagiarism_user_data can be called. */ diff --git a/portfolio/flickr/tests/privacy/provider_test.php b/portfolio/flickr/tests/privacy/provider_test.php index 99fac592a19..2c40697f6ef 100644 --- a/portfolio/flickr/tests/privacy/provider_test.php +++ b/portfolio/flickr/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/googledocs/tests/plugin_test.php b/portfolio/googledocs/tests/plugin_test.php index faedd4073fe..6be051e284e 100644 --- a/portfolio/googledocs/tests/plugin_test.php +++ b/portfolio/googledocs/tests/plugin_test.php @@ -32,7 +32,7 @@ require_once($CFG->libdir . '/portfolio/forms.php'); * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var string name of the portfolio plugin */ protected $pluginname = 'googledocs'; diff --git a/portfolio/googledocs/tests/privacy/provider_test.php b/portfolio/googledocs/tests/privacy/provider_test.php index e5e7e5d9934..3fdba63c1bb 100644 --- a/portfolio/googledocs/tests/privacy/provider_test.php +++ b/portfolio/googledocs/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/mahara/tests/privacy/provider_test.php b/portfolio/mahara/tests/privacy/provider_test.php index 5b7e8c18907..b130b0132b8 100644 --- a/portfolio/mahara/tests/privacy/provider_test.php +++ b/portfolio/mahara/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/tests/privacy/legacy_polyfill_test.php b/portfolio/tests/privacy/legacy_polyfill_test.php index 621f7432e33..4839e7cd560 100644 --- a/portfolio/tests/privacy/legacy_polyfill_test.php +++ b/portfolio/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_portfolio\privacy\legacy_polyfill works and that the static _export_portfolio_user_data can be called. */ diff --git a/portfolio/tests/privacy/provider_test.php b/portfolio/tests/privacy/provider_test.php index b654da1efd9..c29464bd908 100644 --- a/portfolio/tests/privacy/provider_test.php +++ b/portfolio/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { protected function create_portfolio_data($plugin, $name, $user, $preference, $value) { global $DB; diff --git a/privacy/tests/approved_contextlist_test.php b/privacy/tests/approved_contextlist_test.php index a5057f0232d..ba2d33f01d9 100644 --- a/privacy/tests/approved_contextlist_test.php +++ b/privacy/tests/approved_contextlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\approved_contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\approved_contextlist */ -class approved_contextlist_test extends advanced_testcase { +final class approved_contextlist_test extends advanced_testcase { /** * The approved contextlist should not be modifiable once set. diff --git a/privacy/tests/approved_userlist_test.php b/privacy/tests/approved_userlist_test.php index f78e4414507..2a17ad02d7a 100644 --- a/privacy/tests/approved_userlist_test.php +++ b/privacy/tests/approved_userlist_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\approved_userlist */ -class approved_userlist_test extends advanced_testcase { +final class approved_userlist_test extends advanced_testcase { /** * The approved userlist should not be modifiable once set. * diff --git a/privacy/tests/collection_test.php b/privacy/tests/collection_test.php index 9a7c482c706..ee308616eba 100644 --- a/privacy/tests/collection_test.php +++ b/privacy/tests/collection_test.php @@ -32,7 +32,7 @@ use core_privacy\local\metadata\types; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\collection */ -class collection_test extends \advanced_testcase { +final class collection_test extends \advanced_testcase { /** * Test that adding an unknown type causes the type to be added to the collection. diff --git a/privacy/tests/contextlist_base_test.php b/privacy/tests/contextlist_base_test.php index bdef2e312c4..5e7b83d860e 100644 --- a/privacy/tests/contextlist_base_test.php +++ b/privacy/tests/contextlist_base_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\contextlist_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist_base */ -class contextlist_base_test extends advanced_testcase { +final class contextlist_base_test extends advanced_testcase { /** * Ensure that get_contextids returns the list of unique contextids. * diff --git a/privacy/tests/contextlist_collection_test.php b/privacy/tests/contextlist_collection_test.php index 2d75eb8f360..0b221a25c29 100644 --- a/privacy/tests/contextlist_collection_test.php +++ b/privacy/tests/contextlist_collection_test.php @@ -38,7 +38,7 @@ use \core_privacy\local\request\approved_contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist_collection */ -class contextlist_collection_test extends advanced_testcase { +final class contextlist_collection_test extends advanced_testcase { /** * A contextlist_collection should support the contextlist type. * diff --git a/privacy/tests/contextlist_test.php b/privacy/tests/contextlist_test.php index a7038d0066c..d77a66c580d 100644 --- a/privacy/tests/contextlist_test.php +++ b/privacy/tests/contextlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist */ -class contextlist_test extends advanced_testcase { +final class contextlist_test extends advanced_testcase { /** * Ensure that valid SQL results in the relevant contexts being added. diff --git a/privacy/tests/legacy_polyfill_test.php b/privacy/tests/legacy_polyfill_test.php index a56d5545ab6..8b37e1ca2eb 100644 --- a/privacy/tests/legacy_polyfill_test.php +++ b/privacy/tests/legacy_polyfill_test.php @@ -42,7 +42,7 @@ global $CFG; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\legacy_polyfill */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the null_provider polyfill works and that the static _get_reason can be * successfully called. diff --git a/privacy/tests/manager_test.php b/privacy/tests/manager_test.php index c91002e8ab8..06924339dca 100644 --- a/privacy/tests/manager_test.php +++ b/privacy/tests/manager_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/privacy/tests/fixtures/provider_throwing_exceptio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\manager */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test tearDown. */ diff --git a/privacy/tests/moodle_content_writer_test.php b/privacy/tests/moodle_content_writer_test.php index 939ef1dd546..2ee9c756e91 100644 --- a/privacy/tests/moodle_content_writer_test.php +++ b/privacy/tests/moodle_content_writer_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\moodle_content_writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\moodle_content_writer */ -class moodle_content_writer_test extends advanced_testcase { +final class moodle_content_writer_test extends advanced_testcase { /** * Test that exported data is saved correctly within the system context. diff --git a/privacy/tests/privacy/provider_test.php b/privacy/tests/privacy/provider_test.php index 87125bba89c..44de755e5a5 100644 --- a/privacy/tests/privacy/provider_test.php +++ b/privacy/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\metadata\types\user_preference; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \advanced_testcase { +final class provider_test extends \advanced_testcase { /** * Returns a list of frankenstyle names of core components (plugins and subsystems). * diff --git a/privacy/tests/request_helper_test.php b/privacy/tests/request_helper_test.php index 62f100960d1..dfc1d7d02fb 100644 --- a/privacy/tests/request_helper_test.php +++ b/privacy/tests/request_helper_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\helper */ -class request_helper_test extends advanced_testcase { +final class request_helper_test extends advanced_testcase { /** * Test that basic module data is returned. * diff --git a/privacy/tests/request_transform_test.php b/privacy/tests/request_transform_test.php index da5505a7768..a97eb63c8c9 100644 --- a/privacy/tests/request_transform_test.php +++ b/privacy/tests/request_transform_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\transform; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\transform */ -class request_transform_test extends advanced_testcase { +final class request_transform_test extends advanced_testcase { /** * Test that user translation currently does nothing. * diff --git a/privacy/tests/sitepolicy_test.php b/privacy/tests/sitepolicy_test.php index 157d62a36b2..06bc69b5cc5 100644 --- a/privacy/tests/sitepolicy_test.php +++ b/privacy/tests/sitepolicy_test.php @@ -35,7 +35,7 @@ global $CFG; * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sitepolicy_test extends advanced_testcase { +final class sitepolicy_test extends advanced_testcase { /** diff --git a/privacy/tests/tests_content_writer_test.php b/privacy/tests/tests_content_writer_test.php index f3a86984995..8c3f181be62 100644 --- a/privacy/tests/tests_content_writer_test.php +++ b/privacy/tests/tests_content_writer_test.php @@ -36,7 +36,7 @@ use \core_privacy\tests\request\content_writer; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tests_content_writer_test extends advanced_testcase { +final class tests_content_writer_test extends advanced_testcase { /** * It should be possible to store and retrieve data. diff --git a/privacy/tests/types_database_table_test.php b/privacy/tests/types_database_table_test.php index 714a6b5faf9..e92a7a219e2 100644 --- a/privacy/tests/types_database_table_test.php +++ b/privacy/tests/types_database_table_test.php @@ -31,7 +31,7 @@ global $CFG; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\database_table */ -class types_database_table_test extends \advanced_testcase { +final class types_database_table_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_external_location_test.php b/privacy/tests/types_external_location_test.php index 34bfa71e52d..f0d40004e8c 100644 --- a/privacy/tests/types_external_location_test.php +++ b/privacy/tests/types_external_location_test.php @@ -31,7 +31,7 @@ use core_privacy\local\metadata\types\external_location; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\external_location */ -class types_external_location_test extends \advanced_testcase { +final class types_external_location_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_plugintype_link_test.php b/privacy/tests/types_plugintype_link_test.php index e268941a19b..6f6c37494f1 100644 --- a/privacy/tests/types_plugintype_link_test.php +++ b/privacy/tests/types_plugintype_link_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\plugintype_link; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\plugintype_link */ -class types_plugintype_link_test extends \advanced_testcase { +final class types_plugintype_link_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_subsystem_link_test.php b/privacy/tests/types_subsystem_link_test.php index aaace71ae41..c4b022e7fa4 100644 --- a/privacy/tests/types_subsystem_link_test.php +++ b/privacy/tests/types_subsystem_link_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\subsystem_link; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\subsystem_link */ -class types_subsystem_link_test extends \advanced_testcase { +final class types_subsystem_link_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_user_preference_test.php b/privacy/tests/types_user_preference_test.php index c0c12b4a64b..3b08b582060 100644 --- a/privacy/tests/types_user_preference_test.php +++ b/privacy/tests/types_user_preference_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\user_preference; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\user_preference */ -class types_user_preference_test extends \advanced_testcase { +final class types_user_preference_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/userlist_base_test.php b/privacy/tests/userlist_base_test.php index 9e8ffaf39d1..dc9be852415 100644 --- a/privacy/tests/userlist_base_test.php +++ b/privacy/tests/userlist_base_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\userlist_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\userlist_base */ -class userlist_base_test extends advanced_testcase { +final class userlist_base_test extends advanced_testcase { /** * Ensure that get_userids returns the list of unique userids. * diff --git a/privacy/tests/userlist_test.php b/privacy/tests/userlist_test.php index 8df9c97c82a..4b9322818c7 100644 --- a/privacy/tests/userlist_test.php +++ b/privacy/tests/userlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\userlist */ -class userlist_test extends advanced_testcase { +final class userlist_test extends advanced_testcase { /** * Ensure that valid SQL results in the relevant users being added. diff --git a/privacy/tests/writer_test.php b/privacy/tests/writer_test.php index 47960afd270..7991d2a8e14 100644 --- a/privacy/tests/writer_test.php +++ b/privacy/tests/writer_test.php @@ -40,7 +40,7 @@ use \core_privacy\local\request\writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\writer */ -class writer_test extends advanced_testcase { +final class writer_test extends advanced_testcase { /** * Ensure that the writer is cleared away as appropriate after each * test. diff --git a/question/bank/bulkmove/tests/helper_test.php b/question/bank/bulkmove/tests/helper_test.php index a94c46fa85d..54425f3f8c1 100644 --- a/question/bank/bulkmove/tests/helper_test.php +++ b/question/bank/bulkmove/tests/helper_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_bulkmove\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var false|object|\stdClass|null $cat diff --git a/question/bank/columnsortorder/tests/column_manager_test.php b/question/bank/columnsortorder/tests/column_manager_test.php index 4c71365ce6a..b17076e86f4 100644 --- a/question/bank/columnsortorder/tests/column_manager_test.php +++ b/question/bank/columnsortorder/tests/column_manager_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/classes/external.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_columnsortorder\column_manager */ -class column_manager_test extends advanced_testcase { +final class column_manager_test extends advanced_testcase { /** * Setup testcase. diff --git a/question/bank/columnsortorder/tests/external/columnsortorder_external_test.php b/question/bank/columnsortorder/tests/external/columnsortorder_external_test.php index 3c2020c07fc..f6cb984346e 100644 --- a/question/bank/columnsortorder/tests/external/columnsortorder_external_test.php +++ b/question/bank/columnsortorder/tests/external/columnsortorder_external_test.php @@ -33,8 +33,7 @@ require_once($CFG->dirroot . '/question/classes/external.php'); * @author 2021, Ghaly Marc-Alexandre * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class columnsortorder_external_test extends advanced_testcase { - +final class columnsortorder_external_test extends advanced_testcase { /** * Test that external call core_question_external::set_columnbank_order($oldorder) sets proper * data in config_plugins table. diff --git a/question/bank/comment/tests/backup_test.php b/question/bank/comment/tests/backup_test.php index 6c5f303ed03..bd83d04aaff 100644 --- a/question/bank/comment/tests/backup_test.php +++ b/question/bank/comment/tests/backup_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot. '/comment/lib.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * @var array Data object for generating a question. diff --git a/question/bank/comment/tests/event/comment_created_deleted_test.php b/question/bank/comment/tests/event/comment_created_deleted_test.php index 16007badad3..ada80d78469 100644 --- a/question/bank/comment/tests/event/comment_created_deleted_test.php +++ b/question/bank/comment/tests/event/comment_created_deleted_test.php @@ -32,7 +32,7 @@ use stdClass; * @author Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class comment_created_deleted_test extends advanced_testcase { +final class comment_created_deleted_test extends advanced_testcase { /** @var stdClass Keeps course object */ private $course; diff --git a/question/bank/comment/tests/lib_test.php b/question/bank/comment/tests/lib_test.php index f1dcc8098da..63fc564578e 100644 --- a/question/bank/comment/tests/lib_test.php +++ b/question/bank/comment/tests/lib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/bank/comment/lib.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test the comment validation callback. diff --git a/question/bank/comment/tests/privacy/provider_test.php b/question/bank/comment/tests/privacy/provider_test.php index c80e4939a63..4b02af8cfdb 100644 --- a/question/bank/comment/tests/privacy/provider_test.php +++ b/question/bank/comment/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use stdClass; * @author Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass A teacher who is only enrolled in course1. */ protected $teacher1; diff --git a/question/bank/customfields/tests/customfield_test.php b/question/bank/customfields/tests/customfield_test.php index 962ba0c8f6a..852def1058a 100644 --- a/question/bank/customfields/tests/customfield_test.php +++ b/question/bank/customfields/tests/customfield_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class customfield_test extends \advanced_testcase { +final class customfield_test extends \advanced_testcase { /** * @var array Data object for generating a question. diff --git a/question/bank/customfields/tests/question_handler_test.php b/question/bank/customfields/tests/question_handler_test.php index 9ebd0e559e8..1486dcaf878 100644 --- a/question/bank/customfields/tests/question_handler_test.php +++ b/question/bank/customfields/tests/question_handler_test.php @@ -24,7 +24,7 @@ namespace qbank_customfields; * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_handler_test extends \advanced_testcase { +final class question_handler_test extends \advanced_testcase { /** * Question setup helper method. diff --git a/question/bank/deletequestion/tests/helper_test.php b/question/bank/deletequestion/tests/helper_test.php index 3af3f6d42b5..508c5bc1a69 100644 --- a/question/bank/deletequestion/tests/helper_test.php +++ b/question/bank/deletequestion/tests/helper_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2023 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var \context_module module context. diff --git a/question/bank/editquestion/tests/external/update_question_version_status_test.php b/question/bank/editquestion/tests/external/update_question_version_status_test.php index 7e4aeaccf00..d851f07f412 100644 --- a/question/bank/editquestion/tests/external/update_question_version_status_test.php +++ b/question/bank/editquestion/tests/external/update_question_version_status_test.php @@ -30,7 +30,7 @@ use qbank_editquestion\external\update_question_version_status; * @covers \core_question\local\bank\question_version_status * @coversDefaultClass \qbank_editquestion\external\update_question_version_status */ -class update_question_version_status_test extends \advanced_testcase { +final class update_question_version_status_test extends \advanced_testcase { /** * Called before every test. diff --git a/question/bank/exporttoxml/tests/helper_test.php b/question/bank/exporttoxml/tests/helper_test.php index fde535a2d13..15aed236a80 100644 --- a/question/bank/exporttoxml/tests/helper_test.php +++ b/question/bank/exporttoxml/tests/helper_test.php @@ -30,7 +30,7 @@ use question_bank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_exporttoxml\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test the export single question url. diff --git a/question/bank/history/tests/helper_test.php b/question/bank/history/tests/helper_test.php index cdc37dd823f..8e862d7b0ad 100644 --- a/question/bank/history/tests/helper_test.php +++ b/question/bank/history/tests/helper_test.php @@ -27,7 +27,7 @@ use question_bank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_history\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var bool|\context|\context_course $context */ diff --git a/question/bank/history/tests/question_history_view_test.php b/question/bank/history/tests/question_history_view_test.php index 5c5c561c968..70156c7371c 100644 --- a/question/bank/history/tests/question_history_view_test.php +++ b/question/bank/history/tests/question_history_view_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_history\question_history_view */ -class question_history_view_test extends \advanced_testcase { +final class question_history_view_test extends \advanced_testcase { /** * Test that the history page shows all the versions of a question. diff --git a/question/bank/managecategories/tests/question_category_object_test.php b/question/bank/managecategories/tests/question_category_object_test.php index 8b6efbaacd7..25188ed4697 100644 --- a/question/bank/managecategories/tests/question_category_object_test.php +++ b/question/bank/managecategories/tests/question_category_object_test.php @@ -37,7 +37,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_managecategories\question_category_object */ -class question_category_object_test extends \advanced_testcase { +final class question_category_object_test extends \advanced_testcase { /** * @var question_category_object used in the tests. diff --git a/question/bank/previewquestion/tests/qbank_preview_helper_test.php b/question/bank/previewquestion/tests/qbank_preview_helper_test.php index dbb4d509d13..dc4545ee848 100644 --- a/question/bank/previewquestion/tests/qbank_preview_helper_test.php +++ b/question/bank/previewquestion/tests/qbank_preview_helper_test.php @@ -32,7 +32,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_previewquestion\helper */ -class qbank_preview_helper_test extends \advanced_testcase { +final class qbank_preview_helper_test extends \advanced_testcase { /** * @var bool|\context|\context_course $context diff --git a/question/bank/statistics/tests/helper_test.php b/question/bank/statistics/tests/helper_test.php index e5719ad2dbf..5784c1a798c 100644 --- a/question/bank/statistics/tests/helper_test.php +++ b/question/bank/statistics/tests/helper_test.php @@ -30,7 +30,7 @@ use quiz_attempt; * @author Nathan Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test quizzes that contain a specified question. diff --git a/question/bank/tagquestion/tests/external/submit_tags_test.php b/question/bank/tagquestion/tests/external/submit_tags_test.php index ced1fbd2613..2f79360aa9e 100644 --- a/question/bank/tagquestion/tests/external/submit_tags_test.php +++ b/question/bank/tagquestion/tests/external/submit_tags_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @author 2021 Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class submit_tags_test extends \externallib_advanced_testcase { +final class submit_tags_test extends \externallib_advanced_testcase { /** * Set up for every test diff --git a/question/bank/usage/tests/helper_test.php b/question/bank/usage/tests/helper_test.php index f337fc31caa..248f232394f 100644 --- a/question/bank/usage/tests/helper_test.php +++ b/question/bank/usage/tests/helper_test.php @@ -25,7 +25,7 @@ namespace qbank_usage; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_usage\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var \stdClass $quiz diff --git a/question/bank/usage/tests/question_usage_test.php b/question/bank/usage/tests/question_usage_test.php index 3994c82d224..a72749e850d 100644 --- a/question/bank/usage/tests/question_usage_test.php +++ b/question/bank/usage/tests/question_usage_test.php @@ -26,7 +26,7 @@ namespace qbank_usage; * @coversDefaultClass \qbank_usage\tables\question_usage_table * @covers \qbank_usage_output_fragment_question_usage */ -class question_usage_test extends \advanced_testcase { +final class question_usage_test extends \advanced_testcase { /** * Test question usage data. diff --git a/question/behaviour/adaptive/tests/behaviour_type_test.php b/question/behaviour/adaptive/tests/behaviour_type_test.php index ffc5badf4bc..45d683b6bed 100644 --- a/question/behaviour/adaptive/tests/behaviour_type_test.php +++ b/question/behaviour/adaptive/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_adaptive_type */ protected $behaviourtype; diff --git a/question/behaviour/adaptive/tests/mark_display_test.php b/question/behaviour/adaptive/tests/mark_display_test.php index 1a6678b7c75..8a4da207a3e 100644 --- a/question/behaviour/adaptive/tests/mark_display_test.php +++ b/question/behaviour/adaptive/tests/mark_display_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../behaviour.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mark_display_test extends \basic_testcase { +final class mark_display_test extends \basic_testcase { /** @var qbehaviour_adaptive_renderer the renderer to test. */ protected $renderer; diff --git a/question/behaviour/adaptive/tests/walkthrough_test.php b/question/behaviour/adaptive/tests/walkthrough_test.php index f91e26d6fd5..c81fd21e5d5 100644 --- a/question/behaviour/adaptive/tests/walkthrough_test.php +++ b/question/behaviour/adaptive/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_penalty_info_expectation($penalty) { $penaltyinfo = get_string('gradingdetailspenalty', 'qbehaviour_adaptive', format_float($penalty, $this->displayoptions->markdp)); diff --git a/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php b/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php index 24a9687670b..7c0f4ecf40c 100644 --- a/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php +++ b/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_does_not_contain_gradingdetails_expectation() { return new \question_no_pattern_expectation('/class="gradingdetails"/'); diff --git a/question/behaviour/deferredcbm/tests/behaviour_type_test.php b/question/behaviour/deferredcbm/tests/behaviour_type_test.php index 6cff5fef789..b39bdcfb68e 100644 --- a/question/behaviour/deferredcbm/tests/behaviour_type_test.php +++ b/question/behaviour/deferredcbm/tests/behaviour_type_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_deferredcbm_type */ protected $behaviourtype; diff --git a/question/behaviour/deferredcbm/tests/question_cbm_test.php b/question/behaviour/deferredcbm/tests/question_cbm_test.php index d098606c0f7..db20d5c2330 100644 --- a/question/behaviour/deferredcbm/tests/question_cbm_test.php +++ b/question/behaviour/deferredcbm/tests/question_cbm_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/../../../engine/lib.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_cbm_test extends \basic_testcase { +final class question_cbm_test extends \basic_testcase { public function test_adjust_fraction() { $this->assertEqualsWithDelta( 1, question_cbm::adjust_fraction( 1, question_cbm::LOW), 0.0000001); diff --git a/question/behaviour/deferredcbm/tests/walkthrough_test.php b/question/behaviour/deferredcbm/tests/walkthrough_test.php index c5a3bad1b9b..c7b599bb957 100644 --- a/question/behaviour/deferredcbm/tests/walkthrough_test.php +++ b/question/behaviour/deferredcbm/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferred_cbm_truefalse_high_certainty() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferred_cbm_truefalse_high_certainty(): void { // Create a true-false question with correct answer true. $tf = \test_question_maker::make_question('truefalse', 'true'); diff --git a/question/behaviour/deferredfeedback/tests/behaviour_type_test.php b/question/behaviour/deferredfeedback/tests/behaviour_type_test.php index 858a3908946..577ddcbb0cc 100644 --- a/question/behaviour/deferredfeedback/tests/behaviour_type_test.php +++ b/question/behaviour/deferredfeedback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_deferredfeedback_type */ protected $behaviourtype; diff --git a/question/behaviour/deferredfeedback/tests/walkthrough_test.php b/question/behaviour/deferredfeedback/tests/walkthrough_test.php index 8441574e3e1..bbfaee170ec 100644 --- a/question/behaviour/deferredfeedback/tests/walkthrough_test.php +++ b/question/behaviour/deferredfeedback/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferredfeedback_feedback_truefalse() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferredfeedback_feedback_truefalse(): void { // Create a true-false question with correct answer true. $tf = \test_question_maker::make_question('truefalse', 'true'); diff --git a/question/behaviour/immediatecbm/tests/behaviour_type_test.php b/question/behaviour/immediatecbm/tests/behaviour_type_test.php index 237a91471dd..f8c6dda7ea7 100644 --- a/question/behaviour/immediatecbm/tests/behaviour_type_test.php +++ b/question/behaviour/immediatecbm/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_immediatecbm_type */ protected $behaviourtype; diff --git a/question/behaviour/immediatecbm/tests/walkthrough_test.php b/question/behaviour/immediatecbm/tests/walkthrough_test.php index 790b5583d5b..b02bc9793a4 100644 --- a/question/behaviour/immediatecbm/tests/walkthrough_test.php +++ b/question/behaviour/immediatecbm/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_immediatecbm_feedback_multichoice_right() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_immediatecbm_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/behaviour/immediatefeedback/tests/behaviour_type_test.php b/question/behaviour/immediatefeedback/tests/behaviour_type_test.php index 8f4e8b807d2..84e3f389b82 100644 --- a/question/behaviour/immediatefeedback/tests/behaviour_type_test.php +++ b/question/behaviour/immediatefeedback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_immediatefeedback_type */ protected $behaviourtype; diff --git a/question/behaviour/immediatefeedback/tests/walkthrough_test.php b/question/behaviour/immediatefeedback/tests/walkthrough_test.php index b48047cb4c0..d64497a5603 100644 --- a/question/behaviour/immediatefeedback/tests/walkthrough_test.php +++ b/question/behaviour/immediatefeedback/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_immediatefeedback_feedback_multichoice_right() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_immediatefeedback_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/behaviour/informationitem/tests/behaviour_type_test.php b/question/behaviour/informationitem/tests/behaviour_type_test.php index ddcca899e9e..2f8a28e9041 100644 --- a/question/behaviour/informationitem/tests/behaviour_type_test.php +++ b/question/behaviour/informationitem/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_informationitem_type */ protected $behaviourtype; diff --git a/question/behaviour/informationitem/tests/walkthrough_test.php b/question/behaviour/informationitem/tests/walkthrough_test.php index 575b0e63c53..58377938551 100644 --- a/question/behaviour/informationitem/tests/walkthrough_test.php +++ b/question/behaviour/informationitem/tests/walkthrough_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbehaviour_informationitem */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_informationitem_feedback_description() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_informationitem_feedback_description(): void { // Create a true-false question with correct answer true. $description = \test_question_maker::make_question('description'); diff --git a/question/behaviour/interactive/tests/behaviour_type_test.php b/question/behaviour/interactive/tests/behaviour_type_test.php index 2298059e8e4..7ad997c28ac 100644 --- a/question/behaviour/interactive/tests/behaviour_type_test.php +++ b/question/behaviour/interactive/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_interactive_type */ protected $behaviourtype; diff --git a/question/behaviour/interactive/tests/walkthrough_test.php b/question/behaviour/interactive/tests/walkthrough_test.php index 5cb0145540b..7ee0c1f66f0 100644 --- a/question/behaviour/interactive/tests/walkthrough_test.php +++ b/question/behaviour/interactive/tests/walkthrough_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_feedback_multichoice_right() { diff --git a/question/behaviour/interactivecountback/tests/behaviour_type_test.php b/question/behaviour/interactivecountback/tests/behaviour_type_test.php index 83aea488e0e..edbff4c93aa 100644 --- a/question/behaviour/interactivecountback/tests/behaviour_type_test.php +++ b/question/behaviour/interactivecountback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_interactivecountback_type */ protected $behaviourtype; diff --git a/question/behaviour/interactivecountback/tests/walkthrough_test.php b/question/behaviour/interactivecountback/tests/walkthrough_test.php index 291567c3acc..e9740b619f4 100644 --- a/question/behaviour/interactivecountback/tests/walkthrough_test.php +++ b/question/behaviour/interactivecountback/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_feedback_match_reset() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_feedback_match_reset(): void { // Create a matching question. $m = \test_question_maker::make_question('match'); diff --git a/question/behaviour/manualgraded/tests/behaviour_type_test.php b/question/behaviour/manualgraded/tests/behaviour_type_test.php index f7a26b0b5db..cb315a0525a 100644 --- a/question/behaviour/manualgraded/tests/behaviour_type_test.php +++ b/question/behaviour/manualgraded/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_manualgraded_type */ protected $behaviourtype; diff --git a/question/behaviour/manualgraded/tests/walkthrough_test.php b/question/behaviour/manualgraded/tests/walkthrough_test.php index f829c3ce689..90fa54bc796 100644 --- a/question/behaviour/manualgraded/tests/walkthrough_test.php +++ b/question/behaviour/manualgraded/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_manual_graded_essay() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_manual_graded_essay(): void { global $PAGE; // The current text editor depends on the users profile setting - so it needs a valid user. diff --git a/question/behaviour/missing/tests/behaviour_type_test.php b/question/behaviour/missing/tests/behaviour_type_test.php index fb47958c4d0..e7aad105b31 100644 --- a/question/behaviour/missing/tests/behaviour_type_test.php +++ b/question/behaviour/missing/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_missing_type */ protected $behaviourtype; diff --git a/question/behaviour/missing/tests/missingbehaviour_test.php b/question/behaviour/missing/tests/missingbehaviour_test.php index cc20b64b666..ddc95c57a56 100644 --- a/question/behaviour/missing/tests/missingbehaviour_test.php +++ b/question/behaviour/missing/tests/missingbehaviour_test.php @@ -40,7 +40,7 @@ require_once(__DIR__ . '/../behaviour.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class missingbehaviour_test extends \advanced_testcase { +final class missingbehaviour_test extends \advanced_testcase { public function test_missing_cannot_start() { $qa = new question_attempt(\test_question_maker::make_question('truefalse', 'true'), 0); diff --git a/question/engine/tests/datalib_reporting_queries_test.php b/question/engine/tests/datalib_reporting_queries_test.php index 703f942371b..e0daf87fff4 100644 --- a/question/engine/tests/datalib_reporting_queries_test.php +++ b/question/engine/tests/datalib_reporting_queries_test.php @@ -39,7 +39,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datalib_reporting_queries_test extends \qbehaviour_walkthrough_test_base { +final class datalib_reporting_queries_test extends \qbehaviour_walkthrough_test_base { /** @var question_engine_data_mapper */ protected $dm; diff --git a/question/engine/tests/datalib_test.php b/question/engine/tests/datalib_test.php index 3e46cb6bb65..632ff26ffbc 100644 --- a/question/engine/tests/datalib_test.php +++ b/question/engine/tests/datalib_test.php @@ -42,7 +42,7 @@ require_once(__DIR__ . '/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \question_engine_data_mapper */ -class datalib_test extends \qbehaviour_walkthrough_test_base { +final class datalib_test extends \qbehaviour_walkthrough_test_base { /** * We create two usages, each with two questions, a short-answer marked diff --git a/question/engine/tests/qubaid_condition_test.php b/question/engine/tests/qubaid_condition_test.php index 5852c7804a5..757e5307858 100644 --- a/question/engine/tests/qubaid_condition_test.php +++ b/question/engine/tests/qubaid_condition_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qubaid_condition_test extends \advanced_testcase { +final class qubaid_condition_test extends \advanced_testcase { protected function normalize_sql($sql, $params) { $newparams = array(); diff --git a/question/engine/tests/question_display_options_test.php b/question/engine/tests/question_display_options_test.php index ece6c30f22a..6d888ccd62c 100644 --- a/question/engine/tests/question_display_options_test.php +++ b/question/engine/tests/question_display_options_test.php @@ -25,7 +25,7 @@ namespace core_question; * @copyright 2023 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_display_options_test extends \advanced_testcase { +final class question_display_options_test extends \advanced_testcase { /** * Data provider for {@see self::test_has_question_identifier()} diff --git a/question/engine/tests/question_engine_test.php b/question/engine/tests/question_engine_test.php index 6bc38bd6b55..84a6e7132b5 100644 --- a/question/engine/tests/question_engine_test.php +++ b/question/engine/tests/question_engine_test.php @@ -36,7 +36,7 @@ use question_engine; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \question_engine */ -class question_engine_test extends advanced_testcase { +final class question_engine_test extends advanced_testcase { /** * Load required libraries. diff --git a/question/engine/tests/question_reference_manager_test.php b/question/engine/tests/question_reference_manager_test.php index 69d104aa157..cc2175c41fb 100644 --- a/question/engine/tests/question_reference_manager_test.php +++ b/question/engine/tests/question_reference_manager_test.php @@ -30,7 +30,7 @@ use core_question_generator; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_question\question_reference_manager */ -class question_reference_manager_test extends advanced_testcase { +final class question_reference_manager_test extends advanced_testcase { public function test_questions_with_references() { global $DB; diff --git a/question/engine/tests/questionattempt_db_test.php b/question/engine/tests/questionattempt_db_test.php index 779b0efad62..8e60bd6cd3e 100644 --- a/question/engine/tests/questionattempt_db_test.php +++ b/question/engine/tests/questionattempt_db_test.php @@ -41,8 +41,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_db_test extends \data_loading_method_test_base { - public function test_load() { +final class questionattempt_db_test extends \data_loading_method_test_base { + public function test_load(): void { $records = new question_test_recordset(array( array('questionattemptid', 'contextid', 'questionusageid', 'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction', 'maxfraction', 'flagged', diff --git a/question/engine/tests/questionattempt_test.php b/question/engine/tests/questionattempt_test.php index 13b11e45785..fa2e2823899 100644 --- a/question/engine/tests/questionattempt_test.php +++ b/question/engine/tests/questionattempt_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_test extends \advanced_testcase { +final class questionattempt_test extends \advanced_testcase { /** @var question_definition a question that can be used in the tests. */ private $question; /** @var int fake question_usage id used in some tests. */ diff --git a/question/engine/tests/questionattempt_with_steps_test.php b/question/engine/tests/questionattempt_with_steps_test.php index e0cc0c7f20c..500e794bb6b 100644 --- a/question/engine/tests/questionattempt_with_steps_test.php +++ b/question/engine/tests/questionattempt_with_steps_test.php @@ -38,7 +38,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_with_steps_test extends \advanced_testcase { +final class questionattempt_with_steps_test extends \advanced_testcase { private $question; private $qa; diff --git a/question/engine/tests/questionattemptiterator_test.php b/question/engine/tests/questionattemptiterator_test.php index d979be80013..94a2023d9d7 100644 --- a/question/engine/tests/questionattemptiterator_test.php +++ b/question/engine/tests/questionattemptiterator_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptiterator_test extends \advanced_testcase { +final class questionattemptiterator_test extends \advanced_testcase { private $quba; private $qas = array(); private $iterator; diff --git a/question/engine/tests/questionattemptstep_db_test.php b/question/engine/tests/questionattemptstep_db_test.php index e7982b61ad6..fb1d1613065 100644 --- a/question/engine/tests/questionattemptstep_db_test.php +++ b/question/engine/tests/questionattemptstep_db_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstep_db_test extends \data_loading_method_test_base { - public function test_load_with_data() { +final class questionattemptstep_db_test extends \data_loading_method_test_base { + public function test_load_with_data(): void { $records = new question_test_recordset(array( array('attemptstepid', 'questionattemptid', 'sequencenumber', 'state', 'fraction', 'timecreated', 'userid', 'name', 'value', 'qtype', 'contextid'), array( 1, 1, 0, 'todo', null, 1256228502, 13, null, null, 'description', 1), diff --git a/question/engine/tests/questionattemptstep_test.php b/question/engine/tests/questionattemptstep_test.php index 4b9e149abb1..dde90e599bd 100644 --- a/question/engine/tests/questionattemptstep_test.php +++ b/question/engine/tests/questionattemptstep_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstep_test extends \advanced_testcase { - public function test_initial_state_unprocessed() { +final class questionattemptstep_test extends \advanced_testcase { + public function test_initial_state_unprocessed(): void { $step = new question_attempt_step(); $this->assertEquals(question_state::$unprocessed, $step->get_state()); } diff --git a/question/engine/tests/questionattemptstepiterator_test.php b/question/engine/tests/questionattemptstepiterator_test.php index 8ebacfa30ac..b6ddb3b485c 100644 --- a/question/engine/tests/questionattemptstepiterator_test.php +++ b/question/engine/tests/questionattemptstepiterator_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstepiterator_test extends \advanced_testcase { +final class questionattemptstepiterator_test extends \advanced_testcase { private $qa; private $iterator; diff --git a/question/engine/tests/questionbank_test.php b/question/engine/tests/questionbank_test.php index ac95340379f..03917b326ad 100644 --- a/question/engine/tests/questionbank_test.php +++ b/question/engine/tests/questionbank_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionbank_test extends \advanced_testcase { +final class questionbank_test extends \advanced_testcase { public function test_sort_qtype_array() { $config = new \stdClass(); diff --git a/question/engine/tests/questionstate_test.php b/question/engine/tests/questionstate_test.php index 332fac84fa0..9367df4b68d 100644 --- a/question/engine/tests/questionstate_test.php +++ b/question/engine/tests/questionstate_test.php @@ -33,8 +33,8 @@ require_once($CFG->libdir . '/questionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \question_state */ -class questionstate_test extends \advanced_testcase { - public function test_is_active() { +final class questionstate_test extends \advanced_testcase { + public function test_is_active(): void { $this->assertFalse(question_state::$notstarted->is_active()); $this->assertFalse(question_state::$unprocessed->is_active()); $this->assertTrue(question_state::$todo->is_active()); diff --git a/question/engine/tests/questionusage_autosave_test.php b/question/engine/tests/questionusage_autosave_test.php index 660744cbd63..053b60d9178 100644 --- a/question/engine/tests/questionusage_autosave_test.php +++ b/question/engine/tests/questionusage_autosave_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusage_autosave_test extends \qbehaviour_walkthrough_test_base { +final class questionusage_autosave_test extends \qbehaviour_walkthrough_test_base { public function test_autosave_then_display() { $this->resetAfterTest(); diff --git a/question/engine/tests/questionusagebyactivity_data_test.php b/question/engine/tests/questionusagebyactivity_data_test.php index 0ee53471d70..fbf4440f57f 100644 --- a/question/engine/tests/questionusagebyactivity_data_test.php +++ b/question/engine/tests/questionusagebyactivity_data_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusagebyactivity_data_test extends \data_loading_method_test_base { - public function test_load() { +final class questionusagebyactivity_data_test extends \data_loading_method_test_base { + public function test_load(): void { $scid = \context_system::instance()->id; $records = new question_test_recordset(array( array('qubaid', 'contextid', 'component', 'preferredbehaviour', diff --git a/question/engine/tests/questionusagebyactivity_test.php b/question/engine/tests/questionusagebyactivity_test.php index 476e11abc85..f8c428c9565 100644 --- a/question/engine/tests/questionusagebyactivity_test.php +++ b/question/engine/tests/questionusagebyactivity_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusagebyactivity_test extends \advanced_testcase { +final class questionusagebyactivity_test extends \advanced_testcase { public function test_set_get_preferred_model() { // Set up diff --git a/question/engine/tests/questionutils_test.php b/question/engine/tests/questionutils_test.php index cb8fa7e3270..5a845f0e3c9 100644 --- a/question/engine/tests/questionutils_test.php +++ b/question/engine/tests/questionutils_test.php @@ -31,8 +31,8 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionutils_test extends \advanced_testcase { - public function test_arrays_have_same_keys_and_values() { +final class questionutils_test extends \advanced_testcase { + public function test_arrays_have_same_keys_and_values(): void { $this->assertTrue(question_utils::arrays_have_same_keys_and_values( array(), array())); diff --git a/question/engine/tests/unitofwork_test.php b/question/engine/tests/unitofwork_test.php index 7c85f348aa9..c50c65193ea 100644 --- a/question/engine/tests/unitofwork_test.php +++ b/question/engine/tests/unitofwork_test.php @@ -36,7 +36,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class unitofwork_test extends \data_loading_method_test_base { +final class unitofwork_test extends \data_loading_method_test_base { /** @var question_usage_by_activity the test question usage. */ protected $quba; diff --git a/question/engine/tests/walkthrough_test.php b/question/engine/tests/walkthrough_test.php index a834b003aa4..40ebf3d0788 100644 --- a/question/engine/tests/walkthrough_test.php +++ b/question/engine/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_regrade_does_not_lose_flag() { diff --git a/question/format/aiken/tests/aikenformat_test.php b/question/format/aiken/tests/aikenformat_test.php index 9f8fc0538c9..1bee9832ea6 100644 --- a/question/format/aiken/tests/aikenformat_test.php +++ b/question/format/aiken/tests/aikenformat_test.php @@ -38,8 +38,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2018 Eric Merrill (eric.a.merrill@gmail.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class aikenformat_test extends question_testcase { - public function test_readquestions() { +final class aikenformat_test extends question_testcase { + public function test_readquestions(): void { global $CFG; $lines = file($CFG->dirroot.'/question/format/aiken/tests/fixtures/aiken_errors.txt'); diff --git a/question/format/aiken/tests/qformat_aiken_export_test.php b/question/format/aiken/tests/qformat_aiken_export_test.php index ac0eb13d841..637651aa164 100644 --- a/question/format/aiken/tests/qformat_aiken_export_test.php +++ b/question/format/aiken/tests/qformat_aiken_export_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @copyright 2018 Jean-Michel vedrine) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qformat_aiken_export_test extends advanced_testcase { +final class qformat_aiken_export_test extends advanced_testcase { /** * Assert that 2 strings are the same, ignoring ends of line. * We need to override this function because we don't want any output diff --git a/question/format/blackboard_six/tests/blackboardformatpool_test.php b/question/format/blackboard_six/tests/blackboardformatpool_test.php index 9917ebadec6..6df3b2db976 100644 --- a/question/format/blackboard_six/tests/blackboardformatpool_test.php +++ b/question/format/blackboard_six/tests/blackboardformatpool_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blackboardformatpool_test extends \question_testcase { +final class blackboardformatpool_test extends \question_testcase { public function make_test_xml() { $xmlfile = new qformat_blackboard_six_file(); diff --git a/question/format/blackboard_six/tests/blackboardsixformatqti_test.php b/question/format/blackboard_six/tests/blackboardsixformatqti_test.php index 6573b50e989..924921fb016 100644 --- a/question/format/blackboard_six/tests/blackboardsixformatqti_test.php +++ b/question/format/blackboard_six/tests/blackboardsixformatqti_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blackboardsixformatqti_test extends \question_testcase { +final class blackboardsixformatqti_test extends \question_testcase { public function make_test_xml() { $xmlfile = new qformat_blackboard_six_file(); diff --git a/question/format/gift/tests/giftformat_test.php b/question/format/gift/tests/giftformat_test.php index 52924ae6730..a2170b85dbc 100644 --- a/question/format/gift/tests/giftformat_test.php +++ b/question/format/gift/tests/giftformat_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class giftformat_test extends \question_testcase { +final class giftformat_test extends \question_testcase { public function assert_same_gift($expectedtext, $text) { $this->assertEquals(str_replace("\r\n", "\n", $expectedtext), str_replace("\r\n", "\n", $text)); diff --git a/question/format/multianswer/tests/multianswerformat_test.php b/question/format/multianswer/tests/multianswerformat_test.php index debf40d0d55..7255a4a7a56 100644 --- a/question/format/multianswer/tests/multianswerformat_test.php +++ b/question/format/multianswer/tests/multianswerformat_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class multianswerformat_test extends \question_testcase { +final class multianswerformat_test extends \question_testcase { public function test_import() { $lines = file(__DIR__ . '/fixtures/questions.multianswer.txt'); diff --git a/question/format/xml/tests/qformat_xml_import_export_test.php b/question/format/xml/tests/qformat_xml_import_export_test.php index f8d671c3348..741b2447534 100644 --- a/question/format/xml/tests/qformat_xml_import_export_test.php +++ b/question/format/xml/tests/qformat_xml_import_export_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @copyright 2014 Nikita Nikitsky, Volgograd State Technical University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qformat_xml_import_export_test extends advanced_testcase { +final class qformat_xml_import_export_test extends advanced_testcase { /** * Create object qformat_xml for test. * @param string $filename with name for testing file. diff --git a/question/format/xml/tests/xmlformat_test.php b/question/format/xml/tests/xmlformat_test.php index fd8138819c7..b6f6606af78 100644 --- a/question/format/xml/tests/xmlformat_test.php +++ b/question/format/xml/tests/xmlformat_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xmlformat_test extends \question_testcase { +final class xmlformat_test extends \question_testcase { public function assert_same_xml($expectedxml, $xml) { $this->assertEquals(str_replace("\r\n", "\n", $expectedxml), str_replace("\r\n", "\n", $xml)); diff --git a/question/tests/backup_test.php b/question/tests/backup_test.php index e7d954efd76..854678286b0 100644 --- a/question/tests/backup_test.php +++ b/question/tests/backup_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * Makes a backup of the course. diff --git a/question/tests/calculated_question_summary_test.php b/question/tests/calculated_question_summary_test.php index 2d536e7b709..ad3416eb781 100644 --- a/question/tests/calculated_question_summary_test.php +++ b/question/tests/calculated_question_summary_test.php @@ -26,7 +26,7 @@ use core_question\statistics\questions\calculated_question_summary; * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calculated_question_summary_test extends \advanced_testcase { +final class calculated_question_summary_test extends \advanced_testcase { /** * Provider for test_get_min_max_of. diff --git a/question/tests/event/events_test.php b/question/tests/event/events_test.php index 9e99976791c..f6137f741d7 100644 --- a/question/tests/event/events_test.php +++ b/question/tests/event/events_test.php @@ -36,7 +36,7 @@ global $CFG; require_once($CFG->dirroot . '/question/editlib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/question/tests/externallib_test.php b/question/tests/externallib_test.php index 2c69ffb1469..49c9d7ca5b4 100644 --- a/question/tests/externallib_test.php +++ b/question/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Set up for every test diff --git a/question/tests/generator_test.php b/question/tests/generator_test.php index 67de12f442e..5fe304a51ea 100644 --- a/question/tests/generator_test.php +++ b/question/tests/generator_test.php @@ -31,8 +31,8 @@ namespace core_question; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_create() { +final class generator_test extends \advanced_testcase { + public function test_create(): void { global $DB; $this->resetAfterTest(); diff --git a/question/tests/importexport_test.php b/question/tests/importexport_test.php index a3cd0e064d4..52e2cc12bac 100644 --- a/question/tests/importexport_test.php +++ b/question/tests/importexport_test.php @@ -55,8 +55,8 @@ class testable_qformat extends qformat_default { * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class importexport_test extends \advanced_testcase { - public function test_assemble_category_path() { +final class importexport_test extends \advanced_testcase { + public function test_assemble_category_path(): void { $format = new testable_qformat(); $pathsections = [ '$course$', diff --git a/question/tests/least_used_variant_strategy_test.php b/question/tests/least_used_variant_strategy_test.php index 4a76d11e65f..fac49f3b331 100644 --- a/question/tests/least_used_variant_strategy_test.php +++ b/question/tests/least_used_variant_strategy_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class least_used_variant_strategy_test extends \advanced_testcase { +final class least_used_variant_strategy_test extends \advanced_testcase { public function test_question_with_one_variant_always_picks_that() { $question = \test_question_maker::make_question('shortanswer'); diff --git a/question/tests/local/bank/context_to_string_translator_test.php b/question/tests/local/bank/context_to_string_translator_test.php index d761861d752..9e09dbb0f9a 100644 --- a/question/tests/local/bank/context_to_string_translator_test.php +++ b/question/tests/local/bank/context_to_string_translator_test.php @@ -31,7 +31,7 @@ use context_user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_question\local\bank\context_to_string_translator */ -class context_to_string_translator_test extends \advanced_testcase { +final class context_to_string_translator_test extends \advanced_testcase { public function test_context_to_string_translator_test_good_case() { $this->resetAfterTest(); diff --git a/question/tests/privacy/provider_test.php b/question/tests/privacy/provider_test.php index 0e6a3c883a0..2b99eaca0e8 100644 --- a/question/tests/privacy/provider_test.php +++ b/question/tests/privacy/provider_test.php @@ -42,7 +42,7 @@ require_once(__DIR__ . '/../../engine/tests/helpers.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. use \core_question_privacy_helper; diff --git a/question/tests/question_bank_column_test.php b/question/tests/question_bank_column_test.php index ea8bfce8445..bf274d303ec 100644 --- a/question/tests/question_bank_column_test.php +++ b/question/tests/question_bank_column_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/tests/fixtures/testable_core_question_co * @copyright 2018 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_bank_column_test extends \advanced_testcase { +final class question_bank_column_test extends \advanced_testcase { /** * Test function display_header multiple sorts with no custom tooltips. diff --git a/question/tests/version_test.php b/question/tests/version_test.php index 363af81e20e..781fcded9d5 100644 --- a/question/tests/version_test.php +++ b/question/tests/version_test.php @@ -28,7 +28,7 @@ use question_bank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \question_bank */ -class version_test extends \advanced_testcase { +final class version_test extends \advanced_testcase { /** * @var \context_module module context. diff --git a/question/type/calculated/tests/formula_validation_test.php b/question/type/calculated/tests/formula_validation_test.php index a0bbc88460b..4c69d47ec1c 100644 --- a/question/type/calculated/tests/formula_validation_test.php +++ b/question/type/calculated/tests/formula_validation_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/question/type/calculated/questiontype.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formula_validation_test extends \basic_testcase { +final class formula_validation_test extends \basic_testcase { protected function assert_nonempty_string($actual) { $this->assertIsString($actual); $this->assertNotEquals('', $actual); diff --git a/question/type/calculated/tests/question_test.php b/question/type/calculated/tests/question_test.php index 0d6db2f3c28..87099e3de15 100644 --- a/question/type/calculated/tests/question_test.php +++ b/question/type/calculated/tests/question_test.php @@ -35,8 +35,13 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + /** + * Test is complete response + * + * @covers \qtype_calculated + */ + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculated'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/calculated/tests/question_type_test.php b/question/type/calculated/tests/question_type_test.php index d1504b535d7..56be0f1a02c 100644 --- a/question/type/calculated/tests/question_type_test.php +++ b/question/type/calculated/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/calculated/tests/helper.php'); * @covers \question_type * @covers \qtype_calculated */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $tolerance = 0.00000001; protected $qtype; diff --git a/question/type/calculated/tests/upgrade_old_attempt_data_test.php b/question/type/calculated/tests/upgrade_old_attempt_data_test.php index 7a0a3586e2e..4afd0a6d73f 100644 --- a/question/type/calculated/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculated/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculated_adaptive_qsession97() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculated_adaptive_qsession97(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculated/tests/variablesubstituter_test.php b/question/type/calculated/tests/variablesubstituter_test.php index 453f8b490ef..4953ce26d64 100644 --- a/question/type/calculated/tests/variablesubstituter_test.php +++ b/question/type/calculated/tests/variablesubstituter_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/question/type/calculated/questiontype.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class variablesubstituter_test extends \advanced_testcase { - public function test_simple_expression() { +final class variablesubstituter_test extends \advanced_testcase { + public function test_simple_expression(): void { $vs = new qtype_calculated_variable_substituter(array('a' => 1, 'b' => 2), '.'); $this->assertEquals(3, $vs->calculate('{a} + {b}')); } diff --git a/question/type/calculated/tests/walkthrough_test.php b/question/type/calculated/tests/walkthrough_test.php index 5ddb1c7592a..cc75a11e4ca 100644 --- a/question/type/calculated/tests/walkthrough_test.php +++ b/question/type/calculated/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive(): void { // Create a gapselect question. $q = \test_question_maker::make_question('calculated'); diff --git a/question/type/calculatedmulti/tests/question_test.php b/question/type/calculatedmulti/tests/question_test.php index 0c7a572181a..ad20310728a 100644 --- a/question/type/calculatedmulti/tests/question_test.php +++ b/question/type/calculatedmulti/tests/question_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculated'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php b/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php index 7f3fefa487a..10091a5e709 100644 --- a/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculatedmulti_adaptive_qsession96() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculatedmulti_adaptive_qsession96(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculatedmulti/tests/walkthrough_test.php b/question/type/calculatedmulti/tests/walkthrough_test.php index dc997d40355..05c8ee2d08a 100644 --- a/question/type/calculatedmulti/tests/walkthrough_test.php +++ b/question/type/calculatedmulti/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_single_response() { diff --git a/question/type/calculatedsimple/tests/question_test.php b/question/type/calculatedsimple/tests/question_test.php index f6f529ad1d8..83776e0ab67 100644 --- a/question/type/calculatedsimple/tests/question_test.php +++ b/question/type/calculatedsimple/tests/question_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculatedsimple'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/calculatedsimple/tests/question_type_test.php b/question/type/calculatedsimple/tests/question_type_test.php index aef8180b1fe..7a51df13285 100644 --- a/question/type/calculatedsimple/tests/question_type_test.php +++ b/question/type/calculatedsimple/tests/question_type_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/question/type/calculatedsimple/edit_calculatedsim * @covers \qtype_calculatedsimple_edit_form * */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php b/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php index c89293d4047..062c9090c6b 100644 --- a/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculatedsimple_adaptive_qsession95() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculatedsimple_adaptive_qsession95(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculatedsimple/tests/walkthrough_test.php b/question/type/calculatedsimple/tests/walkthrough_test.php index 5917bcaa8b6..2999eea994b 100644 --- a/question/type/calculatedsimple/tests/walkthrough_test.php +++ b/question/type/calculatedsimple/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive(): void { // Create a gapselect question. $q = \test_question_maker::make_question('calculatedsimple'); diff --git a/question/type/ddimageortext/tests/form/edit_form_test.php b/question/type/ddimageortext/tests/form/edit_form_test.php index 920ee99012d..94c26828a81 100644 --- a/question/type/ddimageortext/tests/form/edit_form_test.php +++ b/question/type/ddimageortext/tests/form/edit_form_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/edit_ddimageortext_fo * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddimageortext/tests/privacy/provider_test.php b/question/type/ddimageortext/tests/privacy/provider_test.php index 353f014d890..5bb0994aa38 100644 --- a/question/type/ddimageortext/tests/privacy/provider_test.php +++ b/question/type/ddimageortext/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/classes/privacy/provi * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddimageortext/tests/question_type_test.php b/question/type/ddimageortext/tests/question_type_test.php index 8b39c2673ed..8c672d25477 100644 --- a/question/type/ddimageortext/tests/question_type_test.php +++ b/question/type/ddimageortext/tests/question_type_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/tests/helper.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \basic_testcase { +final class question_type_test extends \basic_testcase { /** @var qtype_ddimageortext instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddimageortext/tests/walkthrough_test.php b/question/type/ddimageortext/tests/walkthrough_test.php index 79373ed08d2..5d74b3a11b1 100644 --- a/question/type/ddimageortext/tests/walkthrough_test.php +++ b/question/type/ddimageortext/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/tests/helper.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { /** * Get an expectation that the output contains an item ready to drag. diff --git a/question/type/ddmarker/tests/form/edit_form_test.php b/question/type/ddmarker/tests/form/edit_form_test.php index b71f1fbaad6..5b74cc019a9 100644 --- a/question/type/ddmarker/tests/form/edit_form_test.php +++ b/question/type/ddmarker/tests/form/edit_form_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/edit_ddmarker_form.php'); * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddmarker/tests/privacy/provider_test.php b/question/type/ddmarker/tests/privacy/provider_test.php index 94cb4654891..92300a18e1f 100644 --- a/question/type/ddmarker/tests/privacy/provider_test.php +++ b/question/type/ddmarker/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/classes/privacy/provider.p * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddmarker/tests/question_type_test.php b/question/type/ddmarker/tests/question_type_test.php index 03acc328f28..6eae328d573 100644 --- a/question/type/ddmarker/tests/question_type_test.php +++ b/question/type/ddmarker/tests/question_type_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_ddmarker instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddmarker/tests/shapes_test.php b/question/type/ddmarker/tests/shapes_test.php index 5a43282c8ab..6f72f7a55ad 100644 --- a/question/type/ddmarker/tests/shapes_test.php +++ b/question/type/ddmarker/tests/shapes_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/shapes.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class shapes_test extends \basic_testcase { +final class shapes_test extends \basic_testcase { public function test_polygon_valdiation_test_ok() { $shape = new qtype_ddmarker_shape_polygon('10, 10; 20, 10; 20, 20; 10, 20'); diff --git a/question/type/ddmarker/tests/walkthrough_test.php b/question/type/ddmarker/tests/walkthrough_test.php index 78677b361a3..55b58ed4036 100644 --- a/question/type/ddmarker/tests/walkthrough_test.php +++ b/question/type/ddmarker/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { /** * Get an expectation that the output contains a marker. diff --git a/question/type/ddwtos/tests/form/edit_form_test.php b/question/type/ddwtos/tests/form/edit_form_test.php index 62e54436958..b522404a754 100644 --- a/question/type/ddwtos/tests/form/edit_form_test.php +++ b/question/type/ddwtos/tests/form/edit_form_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/edit_ddwtos_form.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddwtos/tests/privacy/provider_test.php b/question/type/ddwtos/tests/privacy/provider_test.php index 1dda6d7f42a..5c40a77fdb3 100644 --- a/question/type/ddwtos/tests/privacy/provider_test.php +++ b/question/type/ddwtos/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/classes/privacy/provider.php * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddwtos/tests/question_test.php b/question/type/ddwtos/tests/question_test.php index 006d864b45e..afefd63a745 100644 --- a/question/type/ddwtos/tests/question_test.php +++ b/question/type/ddwtos/tests/question_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \basic_testcase { +final class question_test extends \basic_testcase { public function test_get_question_summary() { $dd = \test_question_maker::make_question('ddwtos'); diff --git a/question/type/ddwtos/tests/question_type_test.php b/question/type/ddwtos/tests/question_type_test.php index 16de9a09e35..989dc8d4ca4 100644 --- a/question/type/ddwtos/tests/question_type_test.php +++ b/question/type/ddwtos/tests/question_type_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \question_testcase { +final class question_type_test extends \question_testcase { /** @var qtype_ddwtos instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddwtos/tests/walkthrough_test.php b/question/type/ddwtos/tests/walkthrough_test.php index 2a2bd5f67df..e28a0baf74b 100644 --- a/question/type/ddwtos/tests/walkthrough_test.php +++ b/question/type/ddwtos/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_drop_box_expectation($place, $group, $readonly, $stateclass = '0') { diff --git a/question/type/description/tests/question_type_test.php b/question/type/description/tests/question_type_test.php index 2c4f082dac8..6cdf6948ec8 100644 --- a/question/type/description/tests/question_type_test.php +++ b/question/type/description/tests/question_type_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/type/description/edit_description_form.p * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/description/tests/upgrade_old_attempt_data_test.php b/question/type/description/tests/upgrade_old_attempt_data_test.php index 7e2a863cc76..1414c11869b 100644 --- a/question/type/description/tests/upgrade_old_attempt_data_test.php +++ b/question/type/description/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_description_deferredfeedback_history80() { $quiz = (object) array( diff --git a/question/type/description/tests/walkthrough_test.php b/question/type/description/tests/walkthrough_test.php index c5737d2a6a0..a116e5a7a9c 100644 --- a/question/type/description/tests/walkthrough_test.php +++ b/question/type/description/tests/walkthrough_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_informationitem_feedback_description() { diff --git a/question/type/essay/tests/form/edit_form_test.php b/question/type/essay/tests/form/edit_form_test.php index f55765a44e5..165a66559d6 100644 --- a/question/type/essay/tests/form/edit_form_test.php +++ b/question/type/essay/tests/form/edit_form_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/essay/edit_essay_form.php'); * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/essay/tests/privacy/provider_test.php b/question/type/essay/tests/privacy/provider_test.php index b5016af5371..1782a54ab7c 100644 --- a/question/type/essay/tests/privacy/provider_test.php +++ b/question/type/essay/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/essay/classes/privacy/provider.php' * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/essay/tests/question_test.php b/question/type/essay/tests/question_test.php index e44fe021e59..67962fb42fd 100644 --- a/question/type/essay/tests/question_test.php +++ b/question/type/essay/tests/question_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_get_question_summary() { +final class question_test extends \advanced_testcase { + public function test_get_question_summary(): void { $essay = \test_question_maker::make_an_essay_question(); $essay->questiontext = 'Hello world'; $this->assertEquals('Hello [world]', $essay->get_question_summary()); diff --git a/question/type/essay/tests/question_type_test.php b/question/type/essay/tests/question_type_test.php index 410ba2fd779..18716d53c6f 100644 --- a/question/type/essay/tests/question_type_test.php +++ b/question/type/essay/tests/question_type_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/question/type/essay/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/essay/tests/restore_test.php b/question/type/essay/tests/restore_test.php index 5269fe00dc5..95e8ab19c3c 100644 --- a/question/type/essay/tests/restore_test.php +++ b/question/type/essay/tests/restore_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_test extends \restore_date_testcase { +final class restore_test extends \restore_date_testcase { /** * Test missing qtype_essay_options creation. diff --git a/question/type/essay/tests/upgrade_old_attempt_data_test.php b/question/type/essay/tests/upgrade_old_attempt_data_test.php index 6b4f59c5549..70c3daa0e83 100644 --- a/question/type/essay/tests/upgrade_old_attempt_data_test.php +++ b/question/type/essay/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_essay_deferredfeedback_history98220() { $quiz = (object) array( diff --git a/question/type/essay/tests/walkthrough_test.php b/question/type/essay/tests/walkthrough_test.php index 2bc993054cf..1f6088a26fe 100644 --- a/question/type/essay/tests/walkthrough_test.php +++ b/question/type/essay/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function check_contains_textarea($name, $content = '', $height = 10) { $fieldname = $this->quba->get_field_prefix($this->slot) . $name; diff --git a/question/type/gapselect/tests/form/edit_form_test.php b/question/type/gapselect/tests/form/edit_form_test.php index 17e890b4fd4..4d0cd4bddd1 100644 --- a/question/type/gapselect/tests/form/edit_form_test.php +++ b/question/type/gapselect/tests/form/edit_form_test.php @@ -64,7 +64,7 @@ class qtype_gapselect_edit_form_base_testable extends \qtype_gapselect_edit_form * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. diff --git a/question/type/gapselect/tests/privacy/provider_test.php b/question/type/gapselect/tests/privacy/provider_test.php index 0fa9f6a402d..245ac509cfd 100644 --- a/question/type/gapselect/tests/privacy/provider_test.php +++ b/question/type/gapselect/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/gapselect/classes/privacy/provider. * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/gapselect/tests/question_test.php b/question/type/gapselect/tests/question_test.php index 5aef925f250..9deb07d6af6 100644 --- a/question/type/gapselect/tests/question_test.php +++ b/question/type/gapselect/tests/question_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/gapselect/tests/helper.php'); * @covers \qtype_gapselect_question_base * @covers \qtype_gapselect_question */ -class question_test extends \basic_testcase { +final class question_test extends \basic_testcase { public function test_get_question_summary() { $gapselect = \test_question_maker::make_question('gapselect'); diff --git a/question/type/gapselect/tests/question_type_test.php b/question/type/gapselect/tests/question_type_test.php index 019542fc56f..921acefbe55 100644 --- a/question/type/gapselect/tests/question_type_test.php +++ b/question/type/gapselect/tests/question_type_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \question_testcase { +final class question_type_test extends \question_testcase { /** @var qtype_gapselect instance of the question type class to test. */ protected $qtype; diff --git a/question/type/gapselect/tests/walkthrough_test.php b/question/type/gapselect/tests/walkthrough_test.php index 04473468552..4cfbca05f25 100644 --- a/question/type/gapselect/tests/walkthrough_test.php +++ b/question/type/gapselect/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/gapselect/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_behaviour() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_behaviour(): void { // Create a gapselect question. $q = \test_question_maker::make_question('gapselect'); diff --git a/question/type/match/tests/backup_test.php b/question/type/match/tests/backup_test.php index 3673cb42ff3..b3836c39a54 100644 --- a/question/type/match/tests/backup_test.php +++ b/question/type/match/tests/backup_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/course/externallib.php'); * @copyright 2020 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * Duplicate quiz with a matching question, and check it worked. diff --git a/question/type/match/tests/privacy/provider_test.php b/question/type/match/tests/privacy/provider_test.php index 7bffe8e9f90..7b2adfae0d1 100644 --- a/question/type/match/tests/privacy/provider_test.php +++ b/question/type/match/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/match/classes/privacy/provider.php' * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/match/tests/question_test.php b/question/type/match/tests/question_test.php index 65296420f8a..832a3571ad1 100644 --- a/question/type/match/tests/question_test.php +++ b/question/type/match/tests/question_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_match_question */ -class question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_question('match'); diff --git a/question/type/match/tests/question_type_test.php b/question/type/match/tests/question_type_test.php index da3b51514cd..e816bc9f478 100644 --- a/question/type/match/tests/question_type_test.php +++ b/question/type/match/tests/question_type_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/match/edit_match_form.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_match instance of the question type class to test. */ protected $qtype; diff --git a/question/type/match/tests/upgrade_old_attempt_data_test.php b/question/type/match/tests/upgrade_old_attempt_data_test.php index 7c902a0a708..62e459a802a 100644 --- a/question/type/match/tests/upgrade_old_attempt_data_test.php +++ b/question/type/match/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_match_deferredfeedback_history6220() { $quiz = (object) array( diff --git a/question/type/match/tests/walkthrough_test.php b/question/type/match/tests/walkthrough_test.php index ce92d2ba837..7851b8c1c49 100644 --- a/question/type/match/tests/walkthrough_test.php +++ b/question/type/match/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_deferred_feedback_unanswered() { diff --git a/question/type/missingtype/tests/missingtype_test.php b/question/type/missingtype/tests/missingtype_test.php index 44ab9e414c3..83ad708837c 100644 --- a/question/type/missingtype/tests/missingtype_test.php +++ b/question/type/missingtype/tests/missingtype_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/missingtype/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class missingtype_test extends \question_testcase { +final class missingtype_test extends \question_testcase { protected function get_unknown_questiondata() { $questiondata = new \stdClass(); diff --git a/question/type/multianswer/tests/question_test.php b/question/type/multianswer/tests/question_test.php index 5d0beed7a8f..4abb800b430 100644 --- a/question/type/multianswer/tests/question_test.php +++ b/question/type/multianswer/tests/question_test.php @@ -35,8 +35,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multianswer_question */ -class question_test extends \advanced_testcase { - public function test_get_expected_data() { +final class question_test extends \advanced_testcase { + public function test_get_expected_data(): void { $question = \test_question_maker::make_question('multianswer'); $this->assertEquals(array('sub1_answer' => PARAM_RAW_TRIMMED, 'sub2_answer' => PARAM_RAW), $question->get_expected_data()); diff --git a/question/type/multianswer/tests/question_type_test.php b/question/type/multianswer/tests/question_type_test.php index fe36a8b0a3a..87a2cefa8db 100644 --- a/question/type/multianswer/tests/question_type_test.php +++ b/question/type/multianswer/tests/question_type_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/question/type/multianswer/edit_multianswer_form.p * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multianswer */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_multianswer instance of the question type class to test. */ protected $qtype; diff --git a/question/type/multianswer/tests/upgrade_old_attempt_data_test.php b/question/type/multianswer/tests/upgrade_old_attempt_data_test.php index 9cde6383693..8577205d8b6 100644 --- a/question/type/multianswer/tests/upgrade_old_attempt_data_test.php +++ b/question/type/multianswer/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_multianswer_adaptivenopenalty_qsession104() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_multianswer_adaptivenopenalty_qsession104(): void { $quiz = (object) array( 'id' => '5', 'course' => '2', diff --git a/question/type/multianswer/tests/walkthrough_test.php b/question/type/multianswer/tests/walkthrough_test.php index 389427a902e..c838ed79a82 100644 --- a/question/type/multianswer/tests/walkthrough_test.php +++ b/question/type/multianswer/tests/walkthrough_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/multianswer/questiontype.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_subq_status(question_state $state) { return new \question_pattern_expectation('~' . diff --git a/question/type/multichoice/tests/privacy/provider_test.php b/question/type/multichoice/tests/privacy/provider_test.php index d8fc1877ff5..9b6d57e1cea 100644 --- a/question/type/multichoice/tests/privacy/provider_test.php +++ b/question/type/multichoice/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/multichoice/classes/privacy/provide * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/multichoice/tests/question_multi_test.php b/question/type/multichoice/tests/question_multi_test.php index 99ff5165d3b..33773dbba23 100644 --- a/question/type/multichoice/tests/question_multi_test.php +++ b/question/type/multichoice/tests/question_multi_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice_multi_question */ -class question_multi_test extends \advanced_testcase { +final class question_multi_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_a_multichoice_multi_question(); diff --git a/question/type/multichoice/tests/question_single_test.php b/question/type/multichoice/tests/question_single_test.php index 7a7c370bfdb..d0587b18d24 100644 --- a/question/type/multichoice/tests/question_single_test.php +++ b/question/type/multichoice/tests/question_single_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice_single_question */ -class question_single_test extends \advanced_testcase { +final class question_single_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/type/multichoice/tests/question_type_test.php b/question/type/multichoice/tests/question_type_test.php index 0a053e7e117..aa9632319dc 100644 --- a/question/type/multichoice/tests/question_type_test.php +++ b/question/type/multichoice/tests/question_type_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/type/multichoice/edit_multichoice_form.p * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/multichoice/tests/walkthrough_test.php b/question/type/multichoice/tests/walkthrough_test.php index 61239422a62..658c06ebb66 100644 --- a/question/type/multichoice/tests/walkthrough_test.php +++ b/question/type/multichoice/tests/walkthrough_test.php @@ -38,8 +38,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @covers \qtype_multichoice_single_question * @covers \qtype_multichoice_single_base */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferredfeedback_feedback_multichoice_single() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferredfeedback_feedback_multichoice_single(): void { // Create a multichoice, single question. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/type/numerical/tests/answer_test.php b/question/type/numerical/tests/answer_test.php index 10e2c261006..4669a1754aa 100644 --- a/question/type/numerical/tests/answer_test.php +++ b/question/type/numerical/tests/answer_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/type/numerical/question.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class answer_test extends \advanced_testcase { - public function test_within_tolerance_nominal() { +final class answer_test extends \advanced_testcase { + public function test_within_tolerance_nominal(): void { $answer = new qtype_numerical_answer(13, 7.0, 1.0, '', FORMAT_MOODLE, 1.0); $this->assertFalse($answer->within_tolerance(5.99)); diff --git a/question/type/numerical/tests/answerprocessor_test.php b/question/type/numerical/tests/answerprocessor_test.php index d62bc52ca8f..de133fac740 100644 --- a/question/type/numerical/tests/answerprocessor_test.php +++ b/question/type/numerical/tests/answerprocessor_test.php @@ -36,7 +36,7 @@ use qtype_numerical_answer_processor; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_numerical_answer_processor */ -class answerprocessor_test extends \advanced_testcase { +final class answerprocessor_test extends \advanced_testcase { /** * Test setup. */ diff --git a/question/type/numerical/tests/question_test.php b/question/type/numerical/tests/question_test.php index 52b723907df..e2713c03631 100644 --- a/question/type/numerical/tests/question_test.php +++ b/question/type/numerical/tests/question_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('numerical'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/numerical/tests/question_type_test.php b/question/type/numerical/tests/question_type_test.php index 9231ae63ae9..74782a1da92 100644 --- a/question/type/numerical/tests/question_type_test.php +++ b/question/type/numerical/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/numerical/edit_numerical_form.php') * @covers \question_type * @covers \qtype_numerical */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $tolerance = 0.00000001; protected $qtype; diff --git a/question/type/numerical/tests/upgrade_old_attempt_data_test.php b/question/type/numerical/tests/upgrade_old_attempt_data_test.php index c82c19ecb4a..5bc63bfb516 100644 --- a/question/type/numerical/tests/upgrade_old_attempt_data_test.php +++ b/question/type/numerical/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_numerical_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/numerical/tests/walkthrough_test.php b/question/type/numerical/tests/walkthrough_test.php index ebc45905ea2..4dbf10133ff 100644 --- a/question/type/numerical/tests/walkthrough_test.php +++ b/question/type/numerical/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/numerical/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_currency() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_currency(): void { // Create a gapselect question. $q = \test_question_maker::make_question('numerical', 'currency'); diff --git a/question/type/random/tests/question_type_test.php b/question/type/random/tests/question_type_test.php index f2d9e6f687b..7d54d1d0f41 100644 --- a/question/type/random/tests/question_type_test.php +++ b/question/type/random/tests/question_type_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/type/random/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/random/tests/upgrade_old_attempt_data_test.php b/question/type/random/tests/upgrade_old_attempt_data_test.php index 0cd0c37b3c4..d66727c6b8a 100644 --- a/question/type/random/tests/upgrade_old_attempt_data_test.php +++ b/question/type/random/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_random_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/randomsamatch/tests/question_test.php b/question/type/randomsamatch/tests/question_test.php index 9a6325e3ac5..6e590d39caa 100644 --- a/question/type/randomsamatch/tests/question_test.php +++ b/question/type/randomsamatch/tests/question_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_question('randomsamatch'); diff --git a/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php b/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php index da8844d6962..3649d289079 100644 --- a/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php +++ b/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_randomsamatch_deferredfeedback_qsession1() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_randomsamatch_deferredfeedback_qsession1(): void { $quiz = (object) array( 'id' => '1', 'course' => '2', diff --git a/question/type/randomsamatch/tests/walkthrough_test.php b/question/type/randomsamatch/tests/walkthrough_test.php index face79665d4..6a797788bb3 100644 --- a/question/type/randomsamatch/tests/walkthrough_test.php +++ b/question/type/randomsamatch/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_deferred_feedback_unanswered() { diff --git a/question/type/shortanswer/tests/privacy/provider_test.php b/question/type/shortanswer/tests/privacy/provider_test.php index beb293198dd..db1a22edb51 100644 --- a/question/type/shortanswer/tests/privacy/provider_test.php +++ b/question/type/shortanswer/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/shortanswer/classes/privacy/provide * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/shortanswer/tests/question_test.php b/question/type/shortanswer/tests/question_test.php index 4a65108cc9a..8a9977f6f68 100644 --- a/question/type/shortanswer/tests/question_test.php +++ b/question/type/shortanswer/tests/question_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/question/type/shortanswer/question.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_compare_string_with_wildcard() { +final class question_test extends \advanced_testcase { + public function test_compare_string_with_wildcard(): void { // Test case sensitive literal matches. $this->assertTrue((bool)qtype_shortanswer_question::compare_string_with_wildcard( 'Frog', 'Frog', false)); diff --git a/question/type/shortanswer/tests/question_type_test.php b/question/type/shortanswer/tests/question_type_test.php index a63728fcfb7..747318da234 100644 --- a/question/type/shortanswer/tests/question_type_test.php +++ b/question/type/shortanswer/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/shortanswer/edit_shortanswer_form.p * @covers \question_type * @covers \qtype_shortanswer */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php b/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php index d002d721b3d..abcd8da7891 100644 --- a/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php +++ b/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_shortanswer_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/tests/question_definition_test.php b/question/type/tests/question_definition_test.php index aeafe70fa86..d7154747867 100644 --- a/question/type/tests/question_definition_test.php +++ b/question/type/tests/question_definition_test.php @@ -28,8 +28,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_definition_test extends \advanced_testcase { - public function test_make_html_inline() { +final class question_definition_test extends \advanced_testcase { + public function test_make_html_inline(): void { // Base class is abstract, so we need to pick one qusetion type to test this method. $mc = \test_question_maker::make_a_multichoice_single_question(); $this->assertEquals('Frog', $mc->make_html_inline('

Frog

')); diff --git a/question/type/tests/question_first_matching_answer_grading_strategy_test.php b/question/type/tests/question_first_matching_answer_grading_strategy_test.php index b515c943438..d6dacfbbada 100644 --- a/question/type/tests/question_first_matching_answer_grading_strategy_test.php +++ b/question/type/tests/question_first_matching_answer_grading_strategy_test.php @@ -61,7 +61,7 @@ class test_response_answer_comparer implements \question_response_answer_compare * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_first_matching_answer_grading_strategy_test extends \advanced_testcase { +final class question_first_matching_answer_grading_strategy_test extends \advanced_testcase { protected function setUp(): void { } diff --git a/question/type/tests/question_hint_test.php b/question/type/tests/question_hint_test.php index 7978764e1fe..dcb5072ba9b 100644 --- a/question/type/tests/question_hint_test.php +++ b/question/type/tests/question_hint_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/question/type/questiontypebase.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_hint_test extends \advanced_testcase { - public function test_basic() { +final class question_hint_test extends \advanced_testcase { + public function test_basic(): void { $row = new \stdClass(); $row->id = 123; $row->hint = 'A hint'; diff --git a/question/type/tests/question_type_test.php b/question/type/tests/question_type_test.php index 59fe3daa33c..8d575488e06 100644 --- a/question/type/tests/question_type_test.php +++ b/question/type/tests/question_type_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/questiontypebase.php'); * * @covers \question_type */ -class question_type_test extends \advanced_testcase { - public function test_save_question_name() { +final class question_type_test extends \advanced_testcase { + public function test_save_question_name(): void { $this->resetAfterTest(); $questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question'); diff --git a/question/type/truefalse/tests/question_test.php b/question/type/truefalse/tests/question_test.php index 6060ecfda50..e7e99d12357 100644 --- a/question/type/truefalse/tests/question_test.php +++ b/question/type/truefalse/tests/question_test.php @@ -34,8 +34,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('truefalse', 'true'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/truefalse/tests/question_type_test.php b/question/type/truefalse/tests/question_type_test.php index 239718ff82c..96fe7da76bf 100644 --- a/question/type/truefalse/tests/question_type_test.php +++ b/question/type/truefalse/tests/question_type_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/type/truefalse/edit_truefalse_form.php') * @copyright 2007 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/truefalse/tests/upgrade_old_attempt_data_test.php b/question/type/truefalse/tests/upgrade_old_attempt_data_test.php index 17b8002b652..fea7ec29d50 100644 --- a/question/type/truefalse/tests/upgrade_old_attempt_data_test.php +++ b/question/type/truefalse/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_truefalse_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/truefalse/tests/walkthrough_test.php b/question/type/truefalse/tests/walkthrough_test.php index 94bb1166ccb..35c65c454a8 100644 --- a/question/type/truefalse/tests/walkthrough_test.php +++ b/question/type/truefalse/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_truefalse_question */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_false_right_does_not_show_feedback_when_not_answered() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_false_right_does_not_show_feedback_when_not_answered(): void { // Create a true-false question with correct answer false. $tf = \test_question_maker::make_question('truefalse', 'false'); diff --git a/rating/tests/externallib_test.php b/rating/tests/externallib_test.php index ec4723354e4..e8a716f28a3 100644 --- a/rating/tests/externallib_test.php +++ b/rating/tests/externallib_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2015 Costantino Cito * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /* * Set up for every test diff --git a/rating/tests/privacy/provider_test.php b/rating/tests/privacy/provider_test.php index c20540ed4e0..9450ba38de7 100644 --- a/rating/tests/privacy/provider_test.php +++ b/rating/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Rate something as a user. diff --git a/rating/tests/rating_test.php b/rating/tests/rating_test.php index f9f034a41d3..307b77786be 100644 --- a/rating/tests/rating_test.php +++ b/rating/tests/rating_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \rating */ -class rating_test extends \advanced_testcase { +final class rating_test extends \advanced_testcase { protected $syscontext; protected $neededcaps = array('view', 'viewall', 'viewany', 'rate'); diff --git a/report/completion/tests/event/events_test.php b/report/completion/tests/event/events_test.php index 2ed2d966c94..187578735ea 100644 --- a/report/completion/tests/event/events_test.php +++ b/report/completion/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace report_completion\event; * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/insights/tests/externallib_test.php b/report/insights/tests/externallib_test.php index 0013668b336..6ff48e1cfbc 100644 --- a/report/insights/tests/externallib_test.php +++ b/report/insights/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once(__DIR__ . '/../../../analytics/tests/fixtures/test_target_shortname * @copyright 2019 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends \advanced_testcase { +final class externallib_test extends \advanced_testcase { /** * test_action_executed diff --git a/report/log/tests/event/events_test.php b/report/log/tests/event/events_test.php index 848d5628841..8b3ea8553b1 100644 --- a/report/log/tests/event/events_test.php +++ b/report/log/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace report_log\event; * @copyright 2014 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/log/tests/lib_test.php b/report/log/tests/lib_test.php index 4ac092ed46a..92344a3e931 100644 --- a/report/log/tests/lib_test.php +++ b/report/log/tests/lib_test.php @@ -34,7 +34,7 @@ global $CFG; * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/report/log/tests/renderable_test.php b/report/log/tests/renderable_test.php index 97e09a58ba3..eaada5c1fe1 100644 --- a/report/log/tests/renderable_test.php +++ b/report/log/tests/renderable_test.php @@ -23,7 +23,56 @@ namespace report_log; * @copyright 2023 Stephan Robotta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class renderable_test extends \advanced_testcase { +final class renderable_test extends \advanced_testcase { + /** + * @var int The course with separate groups. + */ + const COURSE_SEPARATE_GROUP = 0; + /** + * @var int The course with separate groups. + */ + const COURSE_VISIBLE_GROUP = 1; + /** + * @var int The course with separate groups. + */ + const COURSE_NO_GROUP = 2; + /** + * @var array The setup of users. + */ + const SETUP_USER_DEFS = [ + // Make student2 also member of group1. + 'student' => [ + 'student0' => ['group0'], + 'student1' => ['group1'], + 'student2' => ['group0', 'group1'], + 'student3' => [], + ], + // Make teacher2 also member of group1. + 'teacher' => [ + 'teacher0' => ['group0'], + 'teacher1' => ['group1'], + 'teacher2' => ['group0', 'group1'], + 'teacher3' => [], + ], + // Make editingteacher also member of group1. + 'editingteacher' => [ + 'editingteacher0' => ['group0'], + 'editingteacher1' => ['group1'], + 'editingteacher2' => ['group0', 'group1'], + ], + ]; + /** + * @var array|\stdClass all users indexed by username. + */ + private $users = []; + /** + * @var array The groups by courses (array of array). + */ + private $groupsbycourse = []; + /** + * @var array The courses. + */ + private $courses; /** * @var [stdClass] The students. diff --git a/report/loglive/tests/event/events_test.php b/report/loglive/tests/event/events_test.php index 3ad88a512c7..0400dec7932 100644 --- a/report/loglive/tests/event/events_test.php +++ b/report/loglive/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace report_loglive\event; * @copyright 2014 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/loglive/tests/lib_test.php b/report/loglive/tests/lib_test.php index d7e099ac39e..8fc922d6f6a 100644 --- a/report/loglive/tests/lib_test.php +++ b/report/loglive/tests/lib_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test report_log_supports_logstore. diff --git a/report/outline/tests/lib_test.php b/report/outline/tests/lib_test.php index 71168530438..c30f489fd96 100644 --- a/report/outline/tests/lib_test.php +++ b/report/outline/tests/lib_test.php @@ -34,7 +34,7 @@ global $CFG; * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/report/participation/tests/lib_test.php b/report/participation/tests/lib_test.php index acbecd89b66..b2470a2d83f 100644 --- a/report/participation/tests/lib_test.php +++ b/report/participation/tests/lib_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test report_log_supports_logstore. diff --git a/report/questioninstances/tests/event/events_test.php b/report/questioninstances/tests/event/events_test.php index 278c222d912..8471ae84b2b 100644 --- a/report/questioninstances/tests/event/events_test.php +++ b/report/questioninstances/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace report_questioninstances\event; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/stats/tests/event/events_test.php b/report/stats/tests/event/events_test.php index 25e7ce38b1a..1313a0ca44a 100644 --- a/report/stats/tests/event/events_test.php +++ b/report/stats/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace report_stats\event; * @copyright 2014 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/stats/tests/lib_test.php b/report/stats/tests/lib_test.php index 77c0e86c5f1..a86367df617 100644 --- a/report/stats/tests/lib_test.php +++ b/report/stats/tests/lib_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/report/stats/tests/privacy/provider_test.php b/report/stats/tests/privacy/provider_test.php index f538eb61e13..d8c52a698ce 100644 --- a/report/stats/tests/privacy/provider_test.php +++ b/report/stats/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Convenience function to create stats. diff --git a/report/usersessions/tests/lib_test.php b/report/usersessions/tests/lib_test.php index 30e1609bea6..290056e640e 100644 --- a/report/usersessions/tests/lib_test.php +++ b/report/usersessions/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot. '/report/usersessions/lib.php'); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/reportbuilder/tests/external/audiences/delete_test.php b/reportbuilder/tests/external/audiences/delete_test.php index c75ef74a830..1eb0c23cc59 100644 --- a/reportbuilder/tests/external/audiences/delete_test.php +++ b/reportbuilder/tests/external/audiences/delete_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_test extends externallib_advanced_testcase { +final class delete_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/columns/reorder_test.php b/reportbuilder/tests/external/columns/reorder_test.php index c39a7c937c2..7a23f570d33 100644 --- a/reportbuilder/tests/external/columns/reorder_test.php +++ b/reportbuilder/tests/external/columns/reorder_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class reorder_test extends externallib_advanced_testcase { +final class reorder_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/columns/sort/get_test.php b/reportbuilder/tests/external/columns/sort/get_test.php index 805c10d7ac3..014781e46ba 100644 --- a/reportbuilder/tests/external/columns/sort/get_test.php +++ b/reportbuilder/tests/external/columns/sort/get_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_test extends externallib_advanced_testcase { +final class get_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/conditions/add_test.php b/reportbuilder/tests/external/conditions/add_test.php index 73051f8baf3..dc3d0bbce8d 100644 --- a/reportbuilder/tests/external/conditions/add_test.php +++ b/reportbuilder/tests/external/conditions/add_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class add_test extends externallib_advanced_testcase { +final class add_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/conditions/delete_test.php b/reportbuilder/tests/external/conditions/delete_test.php index 81f63871887..4bff137853e 100644 --- a/reportbuilder/tests/external/conditions/delete_test.php +++ b/reportbuilder/tests/external/conditions/delete_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_test extends externallib_advanced_testcase { +final class delete_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/conditions/reorder_test.php b/reportbuilder/tests/external/conditions/reorder_test.php index dcad8a0d913..d7401609265 100644 --- a/reportbuilder/tests/external/conditions/reorder_test.php +++ b/reportbuilder/tests/external/conditions/reorder_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class reorder_test extends externallib_advanced_testcase { +final class reorder_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/conditions/reset_test.php b/reportbuilder/tests/external/conditions/reset_test.php index 5145ef185a6..3b001b44ba7 100644 --- a/reportbuilder/tests/external/conditions/reset_test.php +++ b/reportbuilder/tests/external/conditions/reset_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class reset_test extends externallib_advanced_testcase { +final class reset_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/custom_report_audience_cards_exporter_test.php b/reportbuilder/tests/external/custom_report_audience_cards_exporter_test.php index a68cd555508..d402cb8d64c 100644 --- a/reportbuilder/tests/external/custom_report_audience_cards_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_audience_cards_exporter_test.php @@ -29,7 +29,7 @@ use context_system; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_audience_cards_exporter_test extends advanced_testcase { +final class custom_report_audience_cards_exporter_test extends advanced_testcase { /** * Test exported data/structure diff --git a/reportbuilder/tests/external/custom_report_card_view_exporter_test.php b/reportbuilder/tests/external/custom_report_card_view_exporter_test.php index 7f31f235414..cdc458662a9 100644 --- a/reportbuilder/tests/external/custom_report_card_view_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_card_view_exporter_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_card_view_exporter_test extends advanced_testcase { +final class custom_report_card_view_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/custom_report_column_cards_exporter_test.php b/reportbuilder/tests/external/custom_report_column_cards_exporter_test.php index 105d90d06d1..0f88b28f93b 100644 --- a/reportbuilder/tests/external/custom_report_column_cards_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_column_cards_exporter_test.php @@ -31,7 +31,7 @@ use core_course\reportbuilder\datasource\courses; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_column_cards_exporter_test extends advanced_testcase { +final class custom_report_column_cards_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/custom_report_conditions_exporter_test.php b/reportbuilder/tests/external/custom_report_conditions_exporter_test.php index c5c2c44841e..71ddfe52001 100644 --- a/reportbuilder/tests/external/custom_report_conditions_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_conditions_exporter_test.php @@ -31,7 +31,7 @@ use core_course\reportbuilder\datasource\courses; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_conditions_exporter_test extends advanced_testcase { +final class custom_report_conditions_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/custom_report_data_exporter_test.php b/reportbuilder/tests/external/custom_report_data_exporter_test.php index 5e2d9476177..c11f2a3a9b4 100644 --- a/reportbuilder/tests/external/custom_report_data_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_data_exporter_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_data_exporter_test extends advanced_testcase { +final class custom_report_data_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/custom_report_exporter_test.php b/reportbuilder/tests/external/custom_report_exporter_test.php index b50c409c112..1051e7047fd 100644 --- a/reportbuilder/tests/external/custom_report_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_exporter_test.php @@ -33,7 +33,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_exporter_test extends advanced_testcase { +final class custom_report_exporter_test extends advanced_testcase { /** * Test exported data structure when editing a report diff --git a/reportbuilder/tests/external/custom_report_filters_exporter_test.php b/reportbuilder/tests/external/custom_report_filters_exporter_test.php index 28c17675939..2058007fd8a 100644 --- a/reportbuilder/tests/external/custom_report_filters_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_filters_exporter_test.php @@ -32,7 +32,7 @@ use core_course\reportbuilder\datasource\courses; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_report_filters_exporter_test extends advanced_testcase { +final class custom_report_filters_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/filters/add_test.php b/reportbuilder/tests/external/filters/add_test.php index bdfb55db374..97657d02bf2 100644 --- a/reportbuilder/tests/external/filters/add_test.php +++ b/reportbuilder/tests/external/filters/add_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class add_test extends externallib_advanced_testcase { +final class add_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/filters/delete_test.php b/reportbuilder/tests/external/filters/delete_test.php index 249333811ab..520a4dd5e76 100644 --- a/reportbuilder/tests/external/filters/delete_test.php +++ b/reportbuilder/tests/external/filters/delete_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_test extends externallib_advanced_testcase { +final class delete_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/filters/reorder_test.php b/reportbuilder/tests/external/filters/reorder_test.php index 94c74ca6703..eebf9a036ba 100644 --- a/reportbuilder/tests/external/filters/reorder_test.php +++ b/reportbuilder/tests/external/filters/reorder_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class reorder_test extends externallib_advanced_testcase { +final class reorder_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/filters/reset_test.php b/reportbuilder/tests/external/filters/reset_test.php index ef0a67776a0..3082658bbaa 100644 --- a/reportbuilder/tests/external/filters/reset_test.php +++ b/reportbuilder/tests/external/filters/reset_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class reset_test extends externallib_advanced_testcase { +final class reset_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/filters/set_test.php b/reportbuilder/tests/external/filters/set_test.php index 8e0a1316d49..13cf294cba8 100644 --- a/reportbuilder/tests/external/filters/set_test.php +++ b/reportbuilder/tests/external/filters/set_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class set_test extends externallib_advanced_testcase { +final class set_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/reports/delete_test.php b/reportbuilder/tests/external/reports/delete_test.php index 7176a7b2fa7..cd06b8a82d3 100644 --- a/reportbuilder/tests/external/reports/delete_test.php +++ b/reportbuilder/tests/external/reports/delete_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_test extends externallib_advanced_testcase { +final class delete_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/reports/get_test.php b/reportbuilder/tests/external/reports/get_test.php index e737cb3eba3..e7f96508a97 100644 --- a/reportbuilder/tests/external/reports/get_test.php +++ b/reportbuilder/tests/external/reports/get_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_test extends externallib_advanced_testcase { +final class get_test extends externallib_advanced_testcase { /** * Text execute method for edit mode diff --git a/reportbuilder/tests/external/reports/view_test.php b/reportbuilder/tests/external/reports/view_test.php index 2708e377e3e..ac51ad45d10 100644 --- a/reportbuilder/tests/external/reports/view_test.php +++ b/reportbuilder/tests/external/reports/view_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class view_test extends externallib_advanced_testcase { +final class view_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/schedules/delete_test.php b/reportbuilder/tests/external/schedules/delete_test.php index af081671834..355ca7ffd2f 100644 --- a/reportbuilder/tests/external/schedules/delete_test.php +++ b/reportbuilder/tests/external/schedules/delete_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_test extends externallib_advanced_testcase { +final class delete_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/schedules/send_test.php b/reportbuilder/tests/external/schedules/send_test.php index f66ec95158e..6d56f06de60 100644 --- a/reportbuilder/tests/external/schedules/send_test.php +++ b/reportbuilder/tests/external/schedules/send_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class send_test extends externallib_advanced_testcase { +final class send_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/schedules/toggle_test.php b/reportbuilder/tests/external/schedules/toggle_test.php index cbb4d64a09e..f9a7ef49e75 100644 --- a/reportbuilder/tests/external/schedules/toggle_test.php +++ b/reportbuilder/tests/external/schedules/toggle_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class toggle_test extends externallib_advanced_testcase { +final class toggle_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/system_report_exporter_test.php b/reportbuilder/tests/external/system_report_exporter_test.php index bef61bc95fd..f529a48286f 100644 --- a/reportbuilder/tests/external/system_report_exporter_test.php +++ b/reportbuilder/tests/external/system_report_exporter_test.php @@ -32,7 +32,7 @@ use core_reportbuilder\system_report_factory; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_exporter_test extends advanced_testcase { +final class system_report_exporter_test extends advanced_testcase { /** * Load test fixture diff --git a/reportbuilder/tests/generator_test.php b/reportbuilder/tests/generator_test.php index f867a6f41b6..1b24059c652 100644 --- a/reportbuilder/tests/generator_test.php +++ b/reportbuilder/tests/generator_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends advanced_testcase { +final class generator_test extends advanced_testcase { /** * Test creating a report diff --git a/reportbuilder/tests/local/aggregation/avg_test.php b/reportbuilder/tests/local/aggregation/avg_test.php index 661c2129d5a..5a84f9be47a 100644 --- a/reportbuilder/tests/local/aggregation/avg_test.php +++ b/reportbuilder/tests/local/aggregation/avg_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class avg_test extends core_reportbuilder_testcase { +final class avg_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/count_test.php b/reportbuilder/tests/local/aggregation/count_test.php index cbdc62b4c96..45212eac839 100644 --- a/reportbuilder/tests/local/aggregation/count_test.php +++ b/reportbuilder/tests/local/aggregation/count_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class count_test extends core_reportbuilder_testcase { +final class count_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/countdistinct_test.php b/reportbuilder/tests/local/aggregation/countdistinct_test.php index a3103c3cdc3..6ad16d1aefe 100644 --- a/reportbuilder/tests/local/aggregation/countdistinct_test.php +++ b/reportbuilder/tests/local/aggregation/countdistinct_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class countdistinct_test extends core_reportbuilder_testcase { +final class countdistinct_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/groupconcat_test.php b/reportbuilder/tests/local/aggregation/groupconcat_test.php index f945eab16e9..8c37d4db967 100644 --- a/reportbuilder/tests/local/aggregation/groupconcat_test.php +++ b/reportbuilder/tests/local/aggregation/groupconcat_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class groupconcat_test extends core_reportbuilder_testcase { +final class groupconcat_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/groupconcatdistinct_test.php b/reportbuilder/tests/local/aggregation/groupconcatdistinct_test.php index f68459010b0..72e394dd548 100644 --- a/reportbuilder/tests/local/aggregation/groupconcatdistinct_test.php +++ b/reportbuilder/tests/local/aggregation/groupconcatdistinct_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class groupconcatdistinct_test extends core_reportbuilder_testcase { +final class groupconcatdistinct_test extends core_reportbuilder_testcase { /** * Test setup, we need to skip these tests on non-supported databases diff --git a/reportbuilder/tests/local/aggregation/max_test.php b/reportbuilder/tests/local/aggregation/max_test.php index 546900507c8..42bd3ff61e2 100644 --- a/reportbuilder/tests/local/aggregation/max_test.php +++ b/reportbuilder/tests/local/aggregation/max_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class max_test extends core_reportbuilder_testcase { +final class max_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/min_test.php b/reportbuilder/tests/local/aggregation/min_test.php index 6f5503846b2..a8baf22ee18 100644 --- a/reportbuilder/tests/local/aggregation/min_test.php +++ b/reportbuilder/tests/local/aggregation/min_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class min_test extends core_reportbuilder_testcase { +final class min_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/percent_test.php b/reportbuilder/tests/local/aggregation/percent_test.php index cbf84343873..53d54f02a67 100644 --- a/reportbuilder/tests/local/aggregation/percent_test.php +++ b/reportbuilder/tests/local/aggregation/percent_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class percent_test extends core_reportbuilder_testcase { +final class percent_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/sum_test.php b/reportbuilder/tests/local/aggregation/sum_test.php index 56b4fb7efd0..9e7d71f851c 100644 --- a/reportbuilder/tests/local/aggregation/sum_test.php +++ b/reportbuilder/tests/local/aggregation/sum_test.php @@ -38,7 +38,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sum_test extends core_reportbuilder_testcase { +final class sum_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/entities/user_test.php b/reportbuilder/tests/local/entities/user_test.php index 2401598c5a6..62346f47fb7 100644 --- a/reportbuilder/tests/local/entities/user_test.php +++ b/reportbuilder/tests/local/entities/user_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_test extends advanced_testcase { +final class user_test extends advanced_testcase { /** * Test getting user identity column diff --git a/reportbuilder/tests/local/filters/autocomplete_test.php b/reportbuilder/tests/local/filters/autocomplete_test.php index 5216cccc7c4..de2e6962063 100644 --- a/reportbuilder/tests/local/filters/autocomplete_test.php +++ b/reportbuilder/tests/local/filters/autocomplete_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2022 Nathan Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class autocomplete_test extends advanced_testcase { +final class autocomplete_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/boolean_select_test.php b/reportbuilder/tests/local/filters/boolean_select_test.php index f808e66c326..54add02e6ad 100644 --- a/reportbuilder/tests/local/filters/boolean_select_test.php +++ b/reportbuilder/tests/local/filters/boolean_select_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class boolean_select_test extends advanced_testcase { +final class boolean_select_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/category_test.php b/reportbuilder/tests/local/filters/category_test.php index ee38d24f39a..d7c219a2738 100644 --- a/reportbuilder/tests/local/filters/category_test.php +++ b/reportbuilder/tests/local/filters/category_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class category_test extends advanced_testcase { +final class category_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/course_selector_test.php b/reportbuilder/tests/local/filters/course_selector_test.php index 56da54a805e..b3efe3c3005 100644 --- a/reportbuilder/tests/local/filters/course_selector_test.php +++ b/reportbuilder/tests/local/filters/course_selector_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_selector_test extends advanced_testcase { +final class course_selector_test extends advanced_testcase { /** * Test getting filter SQL diff --git a/reportbuilder/tests/local/filters/select_test.php b/reportbuilder/tests/local/filters/select_test.php index 475ae6b5851..6bbbc6b9a42 100644 --- a/reportbuilder/tests/local/filters/select_test.php +++ b/reportbuilder/tests/local/filters/select_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class select_test extends advanced_testcase { +final class select_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/tags_test.php b/reportbuilder/tests/local/filters/tags_test.php index a3148673c08..5d487e42b9c 100644 --- a/reportbuilder/tests/local/filters/tags_test.php +++ b/reportbuilder/tests/local/filters/tags_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tags_test extends advanced_testcase { +final class tags_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/text_test.php b/reportbuilder/tests/local/filters/text_test.php index 0125ebdc7d1..d6ad518e04c 100644 --- a/reportbuilder/tests/local/filters/text_test.php +++ b/reportbuilder/tests/local/filters/text_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class text_test extends advanced_testcase { +final class text_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/user_test.php b/reportbuilder/tests/local/filters/user_test.php index ea041c402e9..8757a625711 100644 --- a/reportbuilder/tests/local/filters/user_test.php +++ b/reportbuilder/tests/local/filters/user_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_test extends advanced_testcase { +final class user_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/helpers/user_filter_manager_test.php b/reportbuilder/tests/local/helpers/user_filter_manager_test.php index 909c3667877..5a7416d1e16 100644 --- a/reportbuilder/tests/local/helpers/user_filter_manager_test.php +++ b/reportbuilder/tests/local/helpers/user_filter_manager_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_filter_manager_test extends advanced_testcase { +final class user_filter_manager_test extends advanced_testcase { /** * Helper method to return all user preferences for filters - based on the current storage backend using the same diff --git a/reportbuilder/tests/local/models/audience_test.php b/reportbuilder/tests/local/models/audience_test.php index 257b0b17d5e..9e46c901507 100644 --- a/reportbuilder/tests/local/models/audience_test.php +++ b/reportbuilder/tests/local/models/audience_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class audience_test extends advanced_testcase { +final class audience_test extends advanced_testcase { /** * Tests for audience_created event diff --git a/reportbuilder/tests/local/models/report_test.php b/reportbuilder/tests/local/models/report_test.php index 688010d4d51..e0bf5762d86 100644 --- a/reportbuilder/tests/local/models/report_test.php +++ b/reportbuilder/tests/local/models/report_test.php @@ -33,7 +33,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_test extends advanced_testcase { +final class report_test extends advanced_testcase { /** * Tests for report_created event diff --git a/reportbuilder/tests/local/models/schedule_test.php b/reportbuilder/tests/local/models/schedule_test.php index 25e50e2c97f..53fdd103cfd 100644 --- a/reportbuilder/tests/local/models/schedule_test.php +++ b/reportbuilder/tests/local/models/schedule_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class schedule_test extends advanced_testcase { +final class schedule_test extends advanced_testcase { /** * Tests for schedule_created event diff --git a/reportbuilder/tests/local/report/action_test.php b/reportbuilder/tests/local/report/action_test.php index 1e3735c96ea..2fcf3809020 100644 --- a/reportbuilder/tests/local/report/action_test.php +++ b/reportbuilder/tests/local/report/action_test.php @@ -32,7 +32,7 @@ use stdClass; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_test extends advanced_testcase { +final class action_test extends advanced_testcase { /** * Test adding a callback that returns true diff --git a/reportbuilder/tests/local/report/base_test.php b/reportbuilder/tests/local/report/base_test.php index adc62f9e14d..04589f6510c 100644 --- a/reportbuilder/tests/local/report/base_test.php +++ b/reportbuilder/tests/local/report/base_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\system_report_factory; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends advanced_testcase { +final class base_test extends advanced_testcase { /** * Load required class diff --git a/reportbuilder/tests/manager_test.php b/reportbuilder/tests/manager_test.php index 983661927aa..e2638d4c4b8 100644 --- a/reportbuilder/tests/manager_test.php +++ b/reportbuilder/tests/manager_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends core_reportbuilder_testcase { +final class manager_test extends core_reportbuilder_testcase { /** * Test creating a report instance from persistent diff --git a/reportbuilder/tests/output/audience_heading_editable_test.php b/reportbuilder/tests/output/audience_heading_editable_test.php index 266cb49b99a..d1b2bc0e124 100644 --- a/reportbuilder/tests/output/audience_heading_editable_test.php +++ b/reportbuilder/tests/output/audience_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class audience_heading_editable_test extends advanced_testcase { +final class audience_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/column_aggregation_editable_test.php b/reportbuilder/tests/output/column_aggregation_editable_test.php index 1c7bf1dbd87..f2726dfa9b4 100644 --- a/reportbuilder/tests/output/column_aggregation_editable_test.php +++ b/reportbuilder/tests/output/column_aggregation_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class column_aggregation_editable_test extends advanced_testcase { +final class column_aggregation_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/column_heading_editable_test.php b/reportbuilder/tests/output/column_heading_editable_test.php index 9f02bb10109..70c9ed40b4f 100644 --- a/reportbuilder/tests/output/column_heading_editable_test.php +++ b/reportbuilder/tests/output/column_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class column_heading_editable_test extends advanced_testcase { +final class column_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/filter_heading_editable_test.php b/reportbuilder/tests/output/filter_heading_editable_test.php index f4d5d5af5e4..c0a48bc75fa 100644 --- a/reportbuilder/tests/output/filter_heading_editable_test.php +++ b/reportbuilder/tests/output/filter_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_heading_editable_test extends advanced_testcase { +final class filter_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/report_name_editable_test.php b/reportbuilder/tests/output/report_name_editable_test.php index 78aac9d72c9..301571f4e5f 100644 --- a/reportbuilder/tests/output/report_name_editable_test.php +++ b/reportbuilder/tests/output/report_name_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_name_editable_test extends advanced_testcase { +final class report_name_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/schedule_name_editable_test.php b/reportbuilder/tests/output/schedule_name_editable_test.php index 639626de94a..028eed1a39c 100644 --- a/reportbuilder/tests/output/schedule_name_editable_test.php +++ b/reportbuilder/tests/output/schedule_name_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class schedule_name_editable_test extends advanced_testcase { +final class schedule_name_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/privacy/provider_test.php b/reportbuilder/tests/privacy/provider_test.php index 4b9d2328223..34deb283a29 100644 --- a/reportbuilder/tests/privacy/provider_test.php +++ b/reportbuilder/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test provider metadata diff --git a/reportbuilder/tests/reportbuilder/audience/admins_test.php b/reportbuilder/tests/reportbuilder/audience/admins_test.php index 0a381f3ebff..7b9952fa206 100644 --- a/reportbuilder/tests/reportbuilder/audience/admins_test.php +++ b/reportbuilder/tests/reportbuilder/audience/admins_test.php @@ -30,7 +30,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class admins_test extends advanced_testcase { +final class admins_test extends advanced_testcase { /** * Test whether user can add this audience diff --git a/reportbuilder/tests/reportbuilder/audience/allusers_test.php b/reportbuilder/tests/reportbuilder/audience/allusers_test.php index f76455c9702..a9fbe3f77bf 100644 --- a/reportbuilder/tests/reportbuilder/audience/allusers_test.php +++ b/reportbuilder/tests/reportbuilder/audience/allusers_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class allusers_test extends advanced_testcase { +final class allusers_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/reportbuilder/audience/manual_test.php b/reportbuilder/tests/reportbuilder/audience/manual_test.php index 2462dad5489..b8a98fe5299 100644 --- a/reportbuilder/tests/reportbuilder/audience/manual_test.php +++ b/reportbuilder/tests/reportbuilder/audience/manual_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manual_test extends advanced_testcase { +final class manual_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/reportbuilder/audience/systemrole_test.php b/reportbuilder/tests/reportbuilder/audience/systemrole_test.php index 5f97942c8ad..78c6d9fc614 100644 --- a/reportbuilder/tests/reportbuilder/audience/systemrole_test.php +++ b/reportbuilder/tests/reportbuilder/audience/systemrole_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class systemrole_test extends advanced_testcase { +final class systemrole_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/system_report_factory_test.php b/reportbuilder/tests/system_report_factory_test.php index 96245be9cac..4055d1c2fd8 100644 --- a/reportbuilder/tests/system_report_factory_test.php +++ b/reportbuilder/tests/system_report_factory_test.php @@ -30,7 +30,7 @@ use stdClass; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_factory_test extends advanced_testcase { +final class system_report_factory_test extends advanced_testcase { /** * Test creating a valid/available system report diff --git a/reportbuilder/tests/system_report_test.php b/reportbuilder/tests/system_report_test.php index 79660592d1b..cfd3322ed0c 100644 --- a/reportbuilder/tests/system_report_test.php +++ b/reportbuilder/tests/system_report_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\action; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_test extends advanced_testcase { +final class system_report_test extends advanced_testcase { /** * Test for actions */ diff --git a/reportbuilder/tests/task/send_schedule_test.php b/reportbuilder/tests/task/send_schedule_test.php index f09ca7c9ead..f980a7077cf 100644 --- a/reportbuilder/tests/task/send_schedule_test.php +++ b/reportbuilder/tests/task/send_schedule_test.php @@ -37,7 +37,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class send_schedule_test extends advanced_testcase { +final class send_schedule_test extends advanced_testcase { /** * Data provider for {@see test_execute_viewas_user} diff --git a/repository/contentbank/tests/browser_test.php b/repository/contentbank/tests/browser_test.php index b7e6cafe0d5..179ebc3b6cc 100644 --- a/repository/contentbank/tests/browser_test.php +++ b/repository/contentbank/tests/browser_test.php @@ -29,7 +29,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2020 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class browser_test extends \advanced_testcase { +final class browser_test extends \advanced_testcase { /** * Test get_content() in the system context with users that have capability to access/view content bank content diff --git a/repository/contentbank/tests/search/search_test.php b/repository/contentbank/tests/search/search_test.php index 76a62d7443c..c01bba16f90 100644 --- a/repository/contentbank/tests/search/search_test.php +++ b/repository/contentbank/tests/search/search_test.php @@ -37,7 +37,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2020 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test get_search_contents() by searching through some existing content using different search terms. diff --git a/repository/dropbox/tests/api_test.php b/repository/dropbox/tests/api_test.php index 4b128c160c7..8ad215cc6bb 100644 --- a/repository/dropbox/tests/api_test.php +++ b/repository/dropbox/tests/api_test.php @@ -23,7 +23,7 @@ namespace repository_dropbox; * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Data provider for has_additional_results. * diff --git a/repository/flickr/tests/privacy/provider_test.php b/repository/flickr/tests/privacy/provider_test.php index 544cec329cf..e0b3948d7db 100644 --- a/repository/flickr/tests/privacy/provider_test.php +++ b/repository/flickr/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Overriding setUp() function to always reset after tests. */ diff --git a/repository/googledocs/tests/googledocs_search_content_test.php b/repository/googledocs/tests/googledocs_search_content_test.php index 4bdf067cbea..601ba76d402 100644 --- a/repository/googledocs/tests/googledocs_search_content_test.php +++ b/repository/googledocs/tests/googledocs_search_content_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googledocs_search_content_test extends \googledocs_content_testcase { +final class googledocs_search_content_test extends \googledocs_content_testcase { /** * Test get_content_nodes(). diff --git a/repository/googledocs/tests/helper_test.php b/repository/googledocs/tests/helper_test.php index dd761c446af..e979490d206 100644 --- a/repository/googledocs/tests/helper_test.php +++ b/repository/googledocs/tests/helper_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \repository_googledocs_testcase { +final class helper_test extends \repository_googledocs_testcase { /** * Test build_node_path(). diff --git a/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php b/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php index f7b2d36ffc2..350d20d048b 100644 --- a/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php +++ b/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googledocs_drive_content_test extends \googledocs_content_testcase { +final class googledocs_drive_content_test extends \googledocs_content_testcase { /** * Test get_content_nodes(). diff --git a/repository/googledocs/tests/local/node/folder_node_test.php b/repository/googledocs/tests/local/node/folder_node_test.php index fce98c80d26..c0933b69dd4 100644 --- a/repository/googledocs/tests/local/node/folder_node_test.php +++ b/repository/googledocs/tests/local/node/folder_node_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/repository/googledocs/tests/repository_googledocs * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class folder_node_test extends \repository_googledocs_testcase { +final class folder_node_test extends \repository_googledocs_testcase { /** * Test create_node_array(). diff --git a/repository/nextcloud/tests/access_controlled_link_manager_test.php b/repository/nextcloud/tests/access_controlled_link_manager_test.php index 3f15c521d80..e52e77dd887 100644 --- a/repository/nextcloud/tests/access_controlled_link_manager_test.php +++ b/repository/nextcloud/tests/access_controlled_link_manager_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/repository/nextcloud/tests/fixtures/testable_acce * @copyright 2017 Project seminar (Learnweb, University of Münster) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class access_controlled_link_manager_test extends \advanced_testcase { +final class access_controlled_link_manager_test extends \advanced_testcase { /** @var null|testable_access_controlled_link_manager a malleable variant of the access_controlled_link_manager. */ public $linkmanager = null; diff --git a/repository/nextcloud/tests/lib_test.php b/repository/nextcloud/tests/lib_test.php index 70f240c6079..0f1b1fdac28 100644 --- a/repository/nextcloud/tests/lib_test.php +++ b/repository/nextcloud/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->libdir . '/webdavlib.php'); * @copyright 2017 Project seminar (Learnweb, University of Münster) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** @var null|\repository_nextcloud the repository_nextcloud object, which the tests are run on. */ private $repo = null; diff --git a/repository/nextcloud/tests/ocs_test.php b/repository/nextcloud/tests/ocs_test.php index 8982b8fe419..6405e2b28f8 100644 --- a/repository/nextcloud/tests/ocs_test.php +++ b/repository/nextcloud/tests/ocs_test.php @@ -24,7 +24,7 @@ namespace repository_nextcloud; * @copyright 2017 Jan Dageförde (Learnweb, University of Münster) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ocs_test extends \advanced_testcase { +final class ocs_test extends \advanced_testcase { /** * @var \core\oauth2\issuer diff --git a/repository/onedrive/tests/privacy/provider_test.php b/repository/onedrive/tests/privacy/provider_test.php index 6b988f24a93..f767204ee62 100644 --- a/repository/onedrive/tests/privacy/provider_test.php +++ b/repository/onedrive/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use repository_onedrive\privacy\provider; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/repository/recent/tests/lib_test.php b/repository/recent/tests/lib_test.php index 7038b493d4e..ddf1f281b39 100644 --- a/repository/recent/tests/lib_test.php +++ b/repository/recent/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/files/externallib.php'); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** @var repository Recent repository */ private $repo; diff --git a/repository/tests/generator_test.php b/repository/tests/generator_test.php index aea74f8cd97..14b0eecdf44 100644 --- a/repository/tests/generator_test.php +++ b/repository/tests/generator_test.php @@ -35,7 +35,7 @@ use repository_exception; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Basic test of creation of repository types. diff --git a/repository/tests/privacy/provider_test.php b/repository/tests/privacy/provider_test.php index 85dcd5a5356..a39039856f3 100644 --- a/repository/tests/privacy/provider_test.php +++ b/repository/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/repository/tests/repositorylib_test.php b/repository/tests/repositorylib_test.php index 10416016bcd..ec1827faeba 100644 --- a/repository/tests/repositorylib_test.php +++ b/repository/tests/repositorylib_test.php @@ -33,7 +33,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repositorylib_test extends \advanced_testcase { +final class repositorylib_test extends \advanced_testcase { /** * Installing repository tests diff --git a/repository/url/tests/lib_test.php b/repository/url/tests/lib_test.php index e26aabf2578..ddbc718db8d 100644 --- a/repository/url/tests/lib_test.php +++ b/repository/url/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/repository/url/lib.php'); * @copyright 2014 John Okely * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Check that the url escaper performs as expected diff --git a/rss/tests/privacy/provider_test.php b/rss/tests/privacy/provider_test.php index 406db4ba938..dbf3a48254d 100644 --- a/rss/tests/privacy/provider_test.php +++ b/rss/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/search/engine/simpledb/tests/engine_test.php b/search/engine/simpledb/tests/engine_test.php index 01e4e8d22cf..837b3115c46 100644 --- a/search/engine/simpledb/tests/engine_test.php +++ b/search/engine/simpledb/tests/engine_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/mock_search_area.php'); * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class engine_test extends \advanced_testcase { +final class engine_test extends \advanced_testcase { /** * @var \core_search::manager diff --git a/search/engine/simpledb/tests/privacy/provider_test.php b/search/engine/simpledb/tests/privacy/provider_test.php index 17d250a6da4..78aad43a804 100644 --- a/search/engine/simpledb/tests/privacy/provider_test.php +++ b/search/engine/simpledb/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/mock_search_area.php'); * @copyright 2018 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { public function setUp(): void { global $DB; diff --git a/search/engine/solr/tests/privacy/provider_test.php b/search/engine/solr/tests/privacy/provider_test.php index e6b0f879f0e..ee49a82d768 100644 --- a/search/engine/solr/tests/privacy/provider_test.php +++ b/search/engine/solr/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/search/tests/area_category_test.php b/search/tests/area_category_test.php index 814f3fd3e14..4a4bb0abf4a 100644 --- a/search/tests/area_category_test.php +++ b/search/tests/area_category_test.php @@ -22,7 +22,7 @@ namespace core_search; * @copyright 2018 Dmitrii Metelkin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class area_category_test extends \advanced_testcase { +final class area_category_test extends \advanced_testcase { /** * A helper function to get a mocked search area. diff --git a/search/tests/base_activity_test.php b/search/tests/base_activity_test.php index 544b7c1f3bf..72c539e9f01 100644 --- a/search/tests/base_activity_test.php +++ b/search/tests/base_activity_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/mock_search_area.php'); * @copyright 2017 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_activity_test extends \advanced_testcase { +final class base_activity_test extends \advanced_testcase { /** * @var \core_search::manager */ diff --git a/search/tests/base_block_test.php b/search/tests/base_block_test.php index c802fb28777..50c7fc441c4 100644 --- a/search/tests/base_block_test.php +++ b/search/tests/base_block_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/mock_block_area.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_block_test extends \advanced_testcase { +final class base_block_test extends \advanced_testcase { /** * Tests getting the name out of the class name. */ diff --git a/search/tests/base_test.php b/search/tests/base_test.php index a9058902560..0de6d9e7e26 100644 --- a/search/tests/base_test.php +++ b/search/tests/base_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/mock_search_area.php'); * @copyright 2017 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** * @var \core_search::manager */ diff --git a/search/tests/document_icon_test.php b/search/tests/document_icon_test.php index 7fbb837f1b7..6c46be33591 100644 --- a/search/tests/document_icon_test.php +++ b/search/tests/document_icon_test.php @@ -23,7 +23,7 @@ namespace core_search; * @copyright 2018 Dmitrii Metelkin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class document_icon_test extends \advanced_testcase { +final class document_icon_test extends \advanced_testcase { /** * Test that default component gets returned correctly. */ diff --git a/search/tests/document_test.php b/search/tests/document_test.php index 6ae7dee5fb3..6f45a5ac563 100644 --- a/search/tests/document_test.php +++ b/search/tests/document_test.php @@ -32,7 +32,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\document */ -class document_test extends \advanced_testcase { +final class document_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/search/tests/engine_test.php b/search/tests/engine_test.php index 555818a755b..e04010aa67a 100644 --- a/search/tests/engine_test.php +++ b/search/tests/engine_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/mock_search_area.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class engine_test extends \advanced_testcase { +final class engine_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/event/events_test.php b/search/tests/event/events_test.php index 91dfc35dc2b..def54405b2e 100644 --- a/search/tests/event/events_test.php +++ b/search/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace core_search\event; * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * test_search_results_viewed diff --git a/search/tests/external_test.php b/search/tests/external_test.php index 10ab44c9ec6..ca892ee8fc7 100644 --- a/search/tests/external_test.php +++ b/search/tests/external_test.php @@ -31,7 +31,7 @@ namespace core_search; * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends \advanced_testcase { +final class external_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/manager_test.php b/search/tests/manager_test.php index 1d4e34c9f75..a8deac7e4fa 100644 --- a/search/tests/manager_test.php +++ b/search/tests/manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/mock_search_area.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Forum area id. diff --git a/search/tests/skip_future_documents_iterator_test.php b/search/tests/skip_future_documents_iterator_test.php index a12ce76ac5b..2d137766565 100644 --- a/search/tests/skip_future_documents_iterator_test.php +++ b/search/tests/skip_future_documents_iterator_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class skip_future_documents_iterator_test extends \basic_testcase { +final class skip_future_documents_iterator_test extends \basic_testcase { /** * Test normal case with all documents in the past. diff --git a/search/tests/top_result_test.php b/search/tests/top_result_test.php index 9fda6cf16c7..9a42ec2cac1 100644 --- a/search/tests/top_result_test.php +++ b/search/tests/top_result_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/fixtures/mock_search_area.php'); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class top_result_test extends \advanced_testcase { +final class top_result_test extends \advanced_testcase { /** @var stdClass course 1 */ protected $course1; diff --git a/tag/tests/event/events_test.php b/tag/tests/event/events_test.php index 64213de687c..7d62f43450f 100644 --- a/tag/tests/event/events_test.php +++ b/tag/tests/event/events_test.php @@ -32,7 +32,7 @@ global $CFG; // Used to create a wiki page to tag. require_once($CFG->dirroot . '/mod/wiki/locallib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/tag/tests/external/external_test.php b/tag/tests/external/external_test.php index 6e3e34e6c9f..b8e30e3c47f 100644 --- a/tag/tests/external/external_test.php +++ b/tag/tests/external/external_test.php @@ -34,7 +34,7 @@ global $CFG; require_once($CFG->libdir . '/externallib.php'); require_once($CFG->dirroot . '/webservice/tests/helpers.php'); -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test update_categories */ diff --git a/tag/tests/privacy/provider_test.php b/tag/tests/privacy/provider_test.php index 03e1cbe9437..06bf94d3453 100644 --- a/tag/tests/privacy/provider_test.php +++ b/tag/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Check the exporting of tags for a user id in a context. diff --git a/tag/tests/reportbuilder/datasource/tags_test.php b/tag/tests/reportbuilder/datasource/tags_test.php index 483c4d223f2..f33a144ce10 100644 --- a/tag/tests/reportbuilder/datasource/tags_test.php +++ b/tag/tests/reportbuilder/datasource/tags_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tags_test extends core_reportbuilder_testcase { +final class tags_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/tag/tests/taglib_test.php b/tag/tests/taglib_test.php index 91a4681c593..9dbd373a27a 100644 --- a/tag/tests/taglib_test.php +++ b/tag/tests/taglib_test.php @@ -28,7 +28,7 @@ use core_tag_tag; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class taglib_test extends \advanced_testcase { +final class taglib_test extends \advanced_testcase { /** * Test set up. diff --git a/theme/boost/tests/boostnavbar_test.php b/theme/boost/tests/boostnavbar_test.php index 1109d35dd7a..3dbe943f500 100644 --- a/theme/boost/tests/boostnavbar_test.php +++ b/theme/boost/tests/boostnavbar_test.php @@ -24,7 +24,7 @@ namespace theme_boost; * @copyright 2021 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class boostnavbar_test extends \advanced_testcase { +final class boostnavbar_test extends \advanced_testcase { /** * Provider for test_remove_no_link_items * The setup and expected arrays are defined as an array of 'nodekey' => $hasaction diff --git a/theme/boost/tests/privacy/provider_test.php b/theme/boost/tests/privacy/provider_test.php index 7da1d3e7a4f..52cd6a37743 100644 --- a/theme/boost/tests/privacy/provider_test.php +++ b/theme/boost/tests/privacy/provider_test.php @@ -28,7 +28,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Data provider for {@see test_export_user_preferences} diff --git a/theme/boost/tests/scss_test.php b/theme/boost/tests/scss_test.php index 30d5bb91dc5..95b720b4dd7 100644 --- a/theme/boost/tests/scss_test.php +++ b/theme/boost/tests/scss_test.php @@ -23,7 +23,7 @@ namespace theme_boost; * @copyright 2016 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Test that boost can be compiled using SassC (the defacto implemention). */ diff --git a/theme/classic/tests/scss_test.php b/theme/classic/tests/scss_test.php index 1b5d7ff0903..db4b00255f2 100644 --- a/theme/classic/tests/scss_test.php +++ b/theme/classic/tests/scss_test.php @@ -24,7 +24,7 @@ namespace theme_classic; * @copyright 2019 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Test that classic can be compiled using SassC (the defacto implemention). */ diff --git a/user/profile/field/checkbox/tests/privacy/provider_test.php b/user/profile/field/checkbox/tests/privacy/provider_test.php index 37cf9e50621..f07fbcc9b9e 100644 --- a/user/profile/field/checkbox/tests/privacy/provider_test.php +++ b/user/profile/field/checkbox/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/datetime/tests/privacy/provider_test.php b/user/profile/field/datetime/tests/privacy/provider_test.php index 640a67851ea..323f5c0c709 100644 --- a/user/profile/field/datetime/tests/privacy/provider_test.php +++ b/user/profile/field/datetime/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/menu/tests/privacy/provider_test.php b/user/profile/field/menu/tests/privacy/provider_test.php index dc6f30b9c68..491d8fd6aca 100644 --- a/user/profile/field/menu/tests/privacy/provider_test.php +++ b/user/profile/field/menu/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/social/tests/privacy/provider_test.php b/user/profile/field/social/tests/privacy/provider_test.php index fec6b397ca5..ee78ca30432 100644 --- a/user/profile/field/social/tests/privacy/provider_test.php +++ b/user/profile/field/social/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2020 Bas Brands * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/text/tests/field_class_test.php b/user/profile/field/text/tests/field_class_test.php index 834f0b3ef62..eeb33e9952d 100644 --- a/user/profile/field/text/tests/field_class_test.php +++ b/user/profile/field/text/tests/field_class_test.php @@ -33,7 +33,7 @@ use profile_field_text; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \profilefield_text\profile_field_text */ -class field_class_test extends \advanced_testcase { +final class field_class_test extends \advanced_testcase { /** * Test that the profile text data is formatted and required filters applied * diff --git a/user/profile/field/text/tests/privacy/provider_test.php b/user/profile/field/text/tests/privacy/provider_test.php index d32ec1711eb..2549029ff94 100644 --- a/user/profile/field/text/tests/privacy/provider_test.php +++ b/user/profile/field/text/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/textarea/tests/privacy/provider_test.php b/user/profile/field/textarea/tests/privacy/provider_test.php index a4c020c6b0a..023cc8369b8 100644 --- a/user/profile/field/textarea/tests/privacy/provider_test.php +++ b/user/profile/field/textarea/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/tests/devicekey_test.php b/user/tests/devicekey_test.php index 17328257bf6..c793c19ec81 100644 --- a/user/tests/devicekey_test.php +++ b/user/tests/devicekey_test.php @@ -25,8 +25,7 @@ use stdClass; * @covers \core_user\devicekey * @requires extension sodium */ -class devicekey_test extends \advanced_testcase { - +final class devicekey_test extends \advanced_testcase { /** * Helper to create a device record. * diff --git a/user/tests/editlib_test.php b/user/tests/editlib_test.php index 37b3a30ee1a..1633f73c21f 100644 --- a/user/tests/editlib_test.php +++ b/user/tests/editlib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/user/editlib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class editlib_test extends \advanced_testcase { +final class editlib_test extends \advanced_testcase { /** * Test that the required fields are returned in the correct order. diff --git a/user/tests/external/update_user_device_public_key_test.php b/user/tests/external/update_user_device_public_key_test.php index 1b21c364811..17a9c6dc34f 100644 --- a/user/tests/external/update_user_device_public_key_test.php +++ b/user/tests/external/update_user_device_public_key_test.php @@ -31,7 +31,7 @@ use stdClass; * @covers \core_user\external\update_user_device_public_key * @requires extension sodium */ -class update_user_device_public_key_test extends \advanced_testcase { +final class update_user_device_public_key_test extends \advanced_testcase { /** * Helper to create a device record. * diff --git a/user/tests/fields_test.php b/user/tests/fields_test.php index 5a5fd0fa152..d803bc7980f 100644 --- a/user/tests/fields_test.php +++ b/user/tests/fields_test.php @@ -24,7 +24,7 @@ namespace core_user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_user\fields */ -class fields_test extends \advanced_testcase { +final class fields_test extends \advanced_testcase { /** * Tests getting the user picture fields. diff --git a/user/tests/group_non_members_selector_test.php b/user/tests/group_non_members_selector_test.php index 46e07a01e7b..28d9cb57c1d 100644 --- a/user/tests/group_non_members_selector_test.php +++ b/user/tests/group_non_members_selector_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/user/selector/lib.php'); * @copyright 2019 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class group_non_members_selector_test extends \advanced_testcase { +final class group_non_members_selector_test extends \advanced_testcase { /** * Test find_users that only return group non members diff --git a/user/tests/myprofile_test.php b/user/tests/myprofile_test.php index b7bd3761a99..81c5f4139f3 100644 --- a/user/tests/myprofile_test.php +++ b/user/tests/myprofile_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . "/user/tests/fixtures/myprofile_fixtures.php"); * @copyright 2015 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5) */ -class myprofile_test extends \advanced_testcase { +final class myprofile_test extends \advanced_testcase { /** * Test node::__construct(). */ diff --git a/user/tests/profilelib_test.php b/user/tests/profilelib_test.php index 458739341cc..a166574f61f 100644 --- a/user/tests/profilelib_test.php +++ b/user/tests/profilelib_test.php @@ -23,7 +23,7 @@ namespace core_user; * @copyright 2014 The Open University * @licensehttp://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profilelib_test extends \advanced_testcase { +final class profilelib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/user/tests/search/search_test.php b/user/tests/search/search_test.php index 91ab540bd6b..ebdfadb62ad 100644 --- a/user/tests/search/search_test.php +++ b/user/tests/search/search_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/user/tests/userlib_test.php b/user/tests/userlib_test.php index 7f481bdfba8..f1f19eaa600 100644 --- a/user/tests/userlib_test.php +++ b/user/tests/userlib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/user/lib.php'); * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userlib_test extends \advanced_testcase { +final class userlib_test extends \advanced_testcase { /** * Test user_get_user_details_courses */ diff --git a/user/tests/userroleseditable_test.php b/user/tests/userroleseditable_test.php index 04f75e25410..e80abf9bb6e 100644 --- a/user/tests/userroleseditable_test.php +++ b/user/tests/userroleseditable_test.php @@ -23,7 +23,7 @@ namespace core_user; * @copyright 2017 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userroleseditable_test extends \advanced_testcase { +final class userroleseditable_test extends \advanced_testcase { /** * Test user roles editable. */ diff --git a/user/tests/userselector_test.php b/user/tests/userselector_test.php index 2cdf60d7714..3205c681a97 100644 --- a/user/tests/userselector_test.php +++ b/user/tests/userselector_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/user/tests/fixtures/testable_user_selector.php'); * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userselector_test extends \advanced_testcase { +final class userselector_test extends \advanced_testcase { /** * Setup the environment for the tests. diff --git a/webservice/soap/tests/wsdl_test.php b/webservice/soap/tests/wsdl_test.php index 703c0601e6d..a671c691c62 100644 --- a/webservice/soap/tests/wsdl_test.php +++ b/webservice/soap/tests/wsdl_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/soap/classes/wsdl.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class wsdl_test extends \advanced_testcase { +final class wsdl_test extends \advanced_testcase { /** * Test generated WSDL with no added complex types nor functions. diff --git a/webservice/tests/event/events_test.php b/webservice/tests/event/events_test.php index 20de794adbb..a8ee79a2a3d 100644 --- a/webservice/tests/event/events_test.php +++ b/webservice/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace core_webservice\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/webservice/tests/lib_test.php b/webservice/tests/lib_test.php index 4c33fbe9dae..f675d0c12fa 100644 --- a/webservice/tests/lib_test.php +++ b/webservice/tests/lib_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/lib.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Setup. diff --git a/webservice/tests/privacy/provider_test.php b/webservice/tests/privacy/provider_test.php index 990357c6ac0..af428072e6c 100644 --- a/webservice/tests/privacy/provider_test.php +++ b/webservice/tests/privacy/provider_test.php @@ -46,8 +46,7 @@ require_once($CFG->dirroot . '/webservice/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { - +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); }