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 b9e97707be5..d6180e27cd6 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 bb2381524b7..1c2e6a8a553 100644 --- a/admin/presets/tests/manager_test.php +++ b/admin/presets/tests/manager_test.php @@ -28,7 +28,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 { /** * Include required libraries. */ diff --git a/admin/presets/tests/privacy/privacy_provider_test.php b/admin/presets/tests/privacy/privacy_provider_test.php index 534f90ca38d..1001aa15d3b 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 bc7b32c15fe..3851f739cb6 100644 --- a/admin/roles/tests/preset_test.php +++ b/admin/roles/tests/preset_test.php @@ -26,7 +26,7 @@ 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 { +final class preset_test extends \advanced_testcase { public function test_xml(): void { global $DB; diff --git a/admin/roles/tests/privacy/provider_test.php b/admin/roles/tests/privacy/provider_test.php index e1c851151b0..427a9a09921 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/external/set_block_protection_test.php b/admin/tests/external/set_block_protection_test.php index 82f9ece14e4..43cbfe032bb 100644 --- a/admin/tests/external/set_block_protection_test.php +++ b/admin/tests/external/set_block_protection_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class set_block_protection_test extends \externallib_advanced_testcase { +final class set_block_protection_test extends \externallib_advanced_testcase { /** * Test execute method with no login. */ diff --git a/admin/tests/external/set_plugin_order_test.php b/admin/tests/external/set_plugin_order_test.php index 33482cb4e11..e43414eafc6 100644 --- a/admin/tests/external/set_plugin_order_test.php +++ b/admin/tests/external/set_plugin_order_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class set_plugin_order_test extends \externallib_advanced_testcase { +final class set_plugin_order_test extends \externallib_advanced_testcase { /** * Text execute method for editor plugins, which support ordering. * diff --git a/admin/tests/external/set_plugin_state_test.php b/admin/tests/external/set_plugin_state_test.php index 9bdff10ba47..e249174f52e 100644 --- a/admin/tests/external/set_plugin_state_test.php +++ b/admin/tests/external/set_plugin_state_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class set_plugin_state_test extends \externallib_advanced_testcase { +final class set_plugin_state_test extends \externallib_advanced_testcase { /** * Text execute method. * diff --git a/admin/tests/reportbuilder/datasource/task_logs_test.php b/admin/tests/reportbuilder/datasource/task_logs_test.php index 511cd332836..adc63ea6008 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/tests/reportbuilder/local/filters/courserole_test.php b/admin/tests/reportbuilder/local/filters/courserole_test.php index 1a6bc7aa6f4..be1884bfae0 100644 --- a/admin/tests/reportbuilder/local/filters/courserole_test.php +++ b/admin/tests/reportbuilder/local/filters/courserole_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courserole_test extends advanced_testcase { +final class courserole_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} 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 050513821d1..a3b1ccac5b8 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 290f8e703df..2e640a3c8ba 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 b488e62b934..6f59259757d 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 68622255804..52e6c853b9c 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 e0181967614..a4051c92029 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 f80903523c5..db841828e0e 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 665236b9ff8..b3de5f48f27 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 74d8beb66b5..4b55b1df29f 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 20cad3573c3..c7a44607f22 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 105ab13f5c3..3ffb18c2335 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 35ff061ffc4..0025a55efd0 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 manager_util_test 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 61ebad2072a..753e7ca7e6c 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 f3b2d4b8084..d4d888efbc1 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 61d8b7584ef..db3cd19df0b 100644 --- a/admin/tool/brickfield/tests/filters_test.php +++ b/admin/tool/brickfield/tests/filters_test.php @@ -26,7 +26,7 @@ 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 { +final class filters_test extends \advanced_testcase { public function test_constructor(): void { $this->resetAfterTest(); 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 54564cbce26..7147fc3a96d 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 8fe63b0d25f..5d844a5ecee 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 fbc26d49486..1c7d22d2fd0 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 86dab4958b3..b4479dd6275 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 ac2d004d379..f1166afe710 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 73b314f8d9a..3fb2915185e 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 a3849e54b4a..f44dfcdf4ce 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 9b4662d7ab6..f4c3953069c 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 40020c39e33..385f2dd2138 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 276eb83b038..c776fc526ab 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 60ece956c38..94711307a09 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 bc8fe750e56..89719546694 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 d52c20d4b57..f842108fdf0 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 8d973832286..f1a179716fb 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 c32705f5bb0..147a16a6b84 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 @@ -33,7 +33,7 @@ require_once('all_checks.php'); * * @covers \tool_brickfield\local\htmlchecker\common\checks\i_is_not_used */ -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 1a811528414..ab16944533e 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 86c1704ce13..dd423ddd157 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 cf629bfaaab..bf2d2b5bb13 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 421b1ba5f54..c5181e827a5 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 54aeb62eb64..5c5e8338e52 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 554113ae47e..a3468cb520c 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 d3cce9a7835..e71ccc4c829 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 dcfa737a26c..b97688e2422 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 e40afbdc9b3..db6ab215544 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 015f5e66723..93693e7ae0a 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 f3e8d5ba74f..406d62c3779 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 c2a604ba55a..177ee5a63a3 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 82f12509de9..c5402486191 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 @@ -33,7 +33,7 @@ require_once('all_checks.php'); * * @covers \tool_brickfield\local\htmlchecker\common\checks\table_data_should_have_th */ -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 00decd9859a..35b0f67fd13 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 1c5ab71239f..d79a77247f6 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 c2baabed77e..44178003028 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 478f9fcbf5d..fa44d66ccd7 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(): void { $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 f281b85e0b1..2762a2508f6 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(): void { $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 2e1a702f03d..cbf320918a0 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(): void { $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 06bc14dfd9f..defed577fdc 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 768e5d93c60..3019d1973d4 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 b2f736dc74a..beb7973244f 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 702157f7789..ab6962875bb 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(): void { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/tool_test.php b/admin/tool/brickfield/tests/tool_test.php index 75823f00b83..0c767893fda 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 34ffb2c1c0b..24c735e638a 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 2738f62be51..c661c18add6 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 d8e3ee7e774..4f2b43b5d4f 100644 --- a/admin/tool/dataprivacy/tests/api_test.php +++ b/admin/tool/dataprivacy/tests/api_test.php @@ -31,7 +31,7 @@ use tool_dataprivacy\task\initiate_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 bc3283b54ce..db9f3184d79 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 25ad30fbf09..e8657ab9541 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 da9ecae7b9f..dfb3862c330 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 20614042802..ee80d67f3ce 100644 --- a/admin/tool/dataprivacy/tests/external/external_test.php +++ b/admin/tool/dataprivacy/tests/external/external_test.php @@ -43,7 +43,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/external/submit_selected_courses_form_test.php b/admin/tool/dataprivacy/tests/external/submit_selected_courses_form_test.php index 970919aee73..32ec94521ac 100644 --- a/admin/tool/dataprivacy/tests/external/submit_selected_courses_form_test.php +++ b/admin/tool/dataprivacy/tests/external/submit_selected_courses_form_test.php @@ -39,7 +39,7 @@ use tool_dataprivacy\api; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_dataprivacy\api */ -class submit_selected_courses_form_test extends \externallib_advanced_testcase { +final class submit_selected_courses_form_test extends \externallib_advanced_testcase { /** * Test for submit_selected_courses_form(). */ diff --git a/admin/tool/dataprivacy/tests/filtered_userlist_test.php b/admin/tool/dataprivacy/tests/filtered_userlist_test.php index 67602fbdf7d..eb73fae9d24 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 4902dcd2c84..f252025a24e 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 cb9abb070de..3f59ff1899d 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 34164fd1b58..e9464dd274e 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 d43dbbdf63d..3e9e09aaaf6 100644 --- a/admin/tool/dataprivacy/tests/task/task_test.php +++ b/admin/tool/dataprivacy/tests/task/task_test.php @@ -29,7 +29,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 { use task_trait; diff --git a/admin/tool/dataprivacy/tests/user_deleted_observer_test.php b/admin/tool/dataprivacy/tests/user_deleted_observer_test.php index fc5e5008029..cb2cb06accc 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 1f846aa1fb7..4375740f557 100644 --- a/admin/tool/filetypes/tests/tool_filetypes_test.php +++ b/admin/tool/filetypes/tests/tool_filetypes_test.php @@ -24,7 +24,7 @@ use tool_filetypes\utils; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_filetypes\utils */ -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/local/testscenario/parsedfeature_test.php b/admin/tool/generator/tests/local/testscenario/parsedfeature_test.php index 6af109d10ea..bcfa9a72f0a 100644 --- a/admin/tool/generator/tests/local/testscenario/parsedfeature_test.php +++ b/admin/tool/generator/tests/local/testscenario/parsedfeature_test.php @@ -24,7 +24,7 @@ namespace tool_generator\local\testscenario; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_generator\local\testscenario\parsedfeature */ -class parsedfeature_test extends \advanced_testcase { +final class parsedfeature_test extends \advanced_testcase { /** * Get a parsed feature from a content. * @param string $content the feature content. diff --git a/admin/tool/generator/tests/local/testscenario/runner_test.php b/admin/tool/generator/tests/local/testscenario/runner_test.php index 835abeb61b1..a9ab1f622e1 100644 --- a/admin/tool/generator/tests/local/testscenario/runner_test.php +++ b/admin/tool/generator/tests/local/testscenario/runner_test.php @@ -24,7 +24,7 @@ namespace tool_generator\local\testscenario; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_generator\local\testscenario\runner */ -class runner_test extends \advanced_testcase { +final class runner_test extends \advanced_testcase { /** * Test for parse_feature. diff --git a/admin/tool/generator/tests/local/testscenario/steprunner_test.php b/admin/tool/generator/tests/local/testscenario/steprunner_test.php index 08d20c567a1..64728520586 100644 --- a/admin/tool/generator/tests/local/testscenario/steprunner_test.php +++ b/admin/tool/generator/tests/local/testscenario/steprunner_test.php @@ -30,7 +30,7 @@ use Behat\Gherkin\Node\StepNode; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_generator\local\testscenario\steprunner */ -class steprunner_test extends \advanced_testcase { +final class steprunner_test extends \advanced_testcase { public static function setUpBeforeClass(): void { // Call the init method to include all behat libraries and attributes. $runner = new runner(); diff --git a/admin/tool/generator/tests/maketestcourse_test.php b/admin/tool/generator/tests/maketestcourse_test.php index 11670ec10f1..433736a1827 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 499bc2a54e4..bb416ed09fe 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 387aa8ab896..5621fdb6da6 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 ff98bfbf25f..f0f2fa2af3e 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(): void { $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 2f87dd0d29e..820f97367d6 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 cf8ee961e46..bb2f5641b37 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(): void { diff --git a/admin/tool/licensemanager/tests/manager_test.php b/admin/tool/licensemanager/tests/manager_test.php index 0be8895e58a..e9273e5bd77 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 a0edb7c4d10..d1a5c140cbd 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 1a84c3bda10..3ec334c5262 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 651abc38a43..2801d624c5f 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 06beafb03b7..a26cde5911f 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 5d425335ef9..f41edf3ca33 100644 --- a/admin/tool/log/tests/manager_test.php +++ b/admin/tool/log/tests/manager_test.php @@ -23,7 +23,7 @@ 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 { +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 c71d8fecec1..df9fc702632 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 ddd87ae7985..14b5f79eb9a 100644 --- a/admin/tool/lp/tests/externallib_test.php +++ b/admin/tool/lp/tests/externallib_test.php @@ -33,7 +33,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 cc6ef990a6c..e3f0adbb263 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(): void { $this->resetAfterTest(true); diff --git a/admin/tool/lpmigrate/tests/processor_test.php b/admin/tool/lpmigrate/tests/processor_test.php index 2db7d2107c6..54fc26d228b 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 { /** @var \core_competency\competency_framework|null $f1 */ protected $f1 = null; diff --git a/admin/tool/messageinbound/tests/manager_test.php b/admin/tool/messageinbound/tests/manager_test.php index da760cda99e..b9df97d32b3 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 a7e5fd25286..a2aa9c4de23 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/mfa/factor/cohort/tests/factor_test.php b/admin/tool/mfa/factor/cohort/tests/factor_test.php index f25ae8e9983..ff53ce3e411 100644 --- a/admin/tool/mfa/factor/cohort/tests/factor_test.php +++ b/admin/tool/mfa/factor/cohort/tests/factor_test.php @@ -24,7 +24,7 @@ namespace factor_cohort; * @copyright 2023 Stevani Andolo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Tests getting the summary condition diff --git a/admin/tool/mfa/factor/email/tests/factor_test.php b/admin/tool/mfa/factor/email/tests/factor_test.php index 2ddca03c6e6..b863737766e 100644 --- a/admin/tool/mfa/factor/email/tests/factor_test.php +++ b/admin/tool/mfa/factor/email/tests/factor_test.php @@ -24,7 +24,7 @@ namespace factor_email; * @copyright 2023 Stevani Andolo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Tests checking verification code diff --git a/admin/tool/mfa/factor/grace/tests/factor_test.php b/admin/tool/mfa/factor/grace/tests/factor_test.php index 85e5390115b..fedee67abf1 100644 --- a/admin/tool/mfa/factor/grace/tests/factor_test.php +++ b/admin/tool/mfa/factor/grace/tests/factor_test.php @@ -24,7 +24,7 @@ namespace factor_grace; * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Test affecting factors diff --git a/admin/tool/mfa/factor/role/tests/factor_test.php b/admin/tool/mfa/factor/role/tests/factor_test.php index d87832e314b..8db5cecf68d 100644 --- a/admin/tool/mfa/factor/role/tests/factor_test.php +++ b/admin/tool/mfa/factor/role/tests/factor_test.php @@ -24,7 +24,7 @@ namespace factor_role; * @copyright 2023 Stevani Andolo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Tests getting the summary condition diff --git a/admin/tool/mfa/factor/sms/tests/factor_test.php b/admin/tool/mfa/factor/sms/tests/factor_test.php index 4d98eb90e1e..2d43d2df871 100644 --- a/admin/tool/mfa/factor/sms/tests/factor_test.php +++ b/admin/tool/mfa/factor/sms/tests/factor_test.php @@ -25,7 +25,7 @@ namespace factor_sms; * @copyright 2023 Raquel Ortega * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Data provider for test_format_number(). diff --git a/admin/tool/mfa/factor/token/tests/factor_test.php b/admin/tool/mfa/factor/token/tests/factor_test.php index ad394866713..8f5e97fbf1f 100644 --- a/admin/tool/mfa/factor/token/tests/factor_test.php +++ b/admin/tool/mfa/factor/token/tests/factor_test.php @@ -25,7 +25,7 @@ namespace factor_token; * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Holds specific requested factor, which is token factor. diff --git a/admin/tool/mfa/factor/totp/tests/factor_test.php b/admin/tool/mfa/factor/totp/tests/factor_test.php index ff09290a523..85b05c65734 100644 --- a/admin/tool/mfa/factor/totp/tests/factor_test.php +++ b/admin/tool/mfa/factor/totp/tests/factor_test.php @@ -40,7 +40,7 @@ require_once(__DIR__.'/../extlib/ParagonIE/ConstantTime/Base32.php'); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factor_test extends \advanced_testcase { +final class factor_test extends \advanced_testcase { /** * Test code validation of the TOTP factor diff --git a/admin/tool/mfa/tests/admin_setting_managemfa_test.php b/admin/tool/mfa/tests/admin_setting_managemfa_test.php index 1a37b8384ab..91d45c2ae2d 100644 --- a/admin/tool/mfa/tests/admin_setting_managemfa_test.php +++ b/admin/tool/mfa/tests/admin_setting_managemfa_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/tool_mfa_trait.php'); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class admin_setting_managemfa_test extends \advanced_testcase { +final class admin_setting_managemfa_test extends \advanced_testcase { use tool_mfa_trait; diff --git a/admin/tool/mfa/tests/manager_test.php b/admin/tool/mfa/tests/manager_test.php index 64d7fcb97d7..aea30933f2d 100644 --- a/admin/tool/mfa/tests/manager_test.php +++ b/admin/tool/mfa/tests/manager_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/tool_mfa_trait.php'); * @copyright Catalyst IT * @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 { use tool_mfa_trait; diff --git a/admin/tool/mfa/tests/object_factor_base_test.php b/admin/tool/mfa/tests/object_factor_base_test.php index 5d688f58519..ee843b6c6bd 100644 --- a/admin/tool/mfa/tests/object_factor_base_test.php +++ b/admin/tool/mfa/tests/object_factor_base_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/tool_mfa_trait.php'); * @copyright 2023 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class object_factor_base_test extends \advanced_testcase { +final class object_factor_base_test extends \advanced_testcase { use tool_mfa_trait; diff --git a/admin/tool/mfa/tests/plugininfo_factor_test.php b/admin/tool/mfa/tests/plugininfo_factor_test.php index 6586898de13..08d70f88c41 100644 --- a/admin/tool/mfa/tests/plugininfo_factor_test.php +++ b/admin/tool/mfa/tests/plugininfo_factor_test.php @@ -24,7 +24,7 @@ namespace tool_mfa; * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugininfo_factor_test extends \advanced_testcase { +final class plugininfo_factor_test extends \advanced_testcase { /** * Tests getting next user factor diff --git a/admin/tool/mfa/tests/secret_manager_test.php b/admin/tool/mfa/tests/secret_manager_test.php index 4acbfa45792..47e2baffa25 100644 --- a/admin/tool/mfa/tests/secret_manager_test.php +++ b/admin/tool/mfa/tests/secret_manager_test.php @@ -24,7 +24,7 @@ namespace tool_mfa; * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class secret_manager_test extends \advanced_testcase { +final class secret_manager_test extends \advanced_testcase { /** * Tests create factor's secret diff --git a/admin/tool/mobile/tests/api_test.php b/admin/tool/mobile/tests/api_test.php index 17ab1361aec..ea6323fc820 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 a56bd376b03..ff4e0e978c0 100644 --- a/admin/tool/mobile/tests/externallib_test.php +++ b/admin/tool/mobile/tests/externallib_test.php @@ -35,7 +35,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 eca409f1166..0fd45c83776 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 ffaf8a4f1b0..418e8b09de9 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 d1581d17d8e..70848dd74fe 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 235f6b79984..34bfb4c450b 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 957b5b17cd2..c193664bf40 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 9804c834fb7..494d43ef5b4 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 7320a5a6304..fffcd542907 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 552e8b64077..5afbb54f7c4 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 3944dc4f089..0ec0ec96f41 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 e801ef37361..d63778ac4ad 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 f161496fcc7..639a494e881 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 cd02734fb39..7014db9f6b2 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 7f1cdbb2ac5..ad5f267d617 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 2b5a155ced7..c9631f0e4b5 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 d54167155ac..651b664f0cf 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 51cb659260b..603558d6e87 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 219feed6fec..d4543345844 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 ade2f0c6e82..f9d74cd1f35 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 76896d73a26..1a41a0dc8d6 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 ee4973f2b3b..14f62acb725 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 b4142457bbd..fa30c7fe097 100644 --- a/admin/tool/policy/tests/externallib_test.php +++ b/admin/tool/policy/tests/externallib_test.php @@ -33,7 +33,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 { /** @var \tool_policy\policy_version $policy1 Policy document 1. */ protected $policy1; diff --git a/admin/tool/policy/tests/privacy/provider_test.php b/admin/tool/policy/tests/privacy/provider_test.php index 1140aff36a8..e925cf97f34 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 c97a79ddc1f..ba75421f634 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 c4e2cd001cd..266c2389208 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 f594aa78151..94594e9e07a 100644 --- a/admin/tool/recyclebin/tests/course_bin_test.php +++ b/admin/tool/recyclebin/tests/course_bin_test.php @@ -26,7 +26,7 @@ use stdClass; * @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 2a203243488..630a095e33e 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 df0562444f8..43145d50ea4 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 151ee1c654d..16dbbc4768b 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 e5fc520504e..60dfa4f208c 100644 --- a/admin/tool/uploadcourse/tests/course_test.php +++ b/admin/tool/uploadcourse/tests/course_test.php @@ -27,7 +27,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 { /** @var \testing_data_generator $datagenerator */ protected $datagenerator; diff --git a/admin/tool/uploadcourse/tests/helper_test.php b/admin/tool/uploadcourse/tests/helper_test.php index 9cc39944689..2045de0fd4d 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(): void { $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 2b4bcb540e5..b09b85efcc2 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(): void { global $DB; diff --git a/admin/tool/uploaduser/tests/cli_test.php b/admin/tool/uploaduser/tests/cli_test.php index 6681591e236..ff418bf0c91 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 995926d97c7..2d8563bbee5 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 565b1d6ed42..426db4dadd0 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 1458ee14763..4a3668de5c8 100644 --- a/admin/tool/usertours/tests/accessdate_filter_test.php +++ b/admin/tool/usertours/tests/accessdate_filter_test.php @@ -26,7 +26,7 @@ use tool_usertours\local\filter\accessdate; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\local\filter\accessdate */ -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 54cadfaf578..41072e358a9 100644 --- a/admin/tool/usertours/tests/cache_test.php +++ b/admin/tool/usertours/tests/cache_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\cache */ -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 924ba268e85..fd20638d862 100644 --- a/admin/tool/usertours/tests/manager_test.php +++ b/admin/tool/usertours/tests/manager_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\manager */ -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 e63ace554d3..71b939a7486 100644 --- a/admin/tool/usertours/tests/privacy/provider_test.php +++ b/admin/tool/usertours/tests/privacy/provider_test.php @@ -30,7 +30,7 @@ use tool_usertours\privacy\provider; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\privacy\provider */ -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 ceff72fb39b..ae56e89e65c 100644 --- a/admin/tool/usertours/tests/role_filter_test.php +++ b/admin/tool/usertours/tests/role_filter_test.php @@ -24,7 +24,7 @@ namespace tool_usertours; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\local\filter\role */ -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 8ba2cafa2fa..ca53bbe5211 100644 --- a/admin/tool/usertours/tests/step_test.php +++ b/admin/tool/usertours/tests/step_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/formslib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\step */ -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 49f85db2a1c..27f60a2cc8c 100644 --- a/admin/tool/usertours/tests/theme_filter_test.php +++ b/admin/tool/usertours/tests/theme_filter_test.php @@ -24,7 +24,7 @@ namespace tool_usertours; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\local\filter\theme */ -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 f2ebcb08b92..eb6e14caeb0 100644 --- a/admin/tool/usertours/tests/tour_test.php +++ b/admin/tool/usertours/tests/tour_test.php @@ -24,7 +24,7 @@ namespace tool_usertours; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_usertours\tour */ -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 c9e7db37115..2577eadfce7 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 9256b718cc0..b6d08578ed4 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 { /** @var \stdClass Course record. */ protected $course; diff --git a/analytics/tests/dataset_manager_test.php b/analytics/tests/dataset_manager_test.php index 06235296c0c..40c5d374522 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 { /** @var array Store dataset top rows. */ protected array $sharedtoprows = []; diff --git a/analytics/tests/model_test.php b/analytics/tests/model_test.php index 8320f8adcac..e613f2b721f 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 { /** @var model Store Model. */ protected $model; diff --git a/analytics/tests/prediction_actions_test.php b/analytics/tests/prediction_actions_test.php index ff67f0bd815..3e95220ae63 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 { /** @var model Store Model. */ protected $model; diff --git a/analytics/tests/prediction_test.php b/analytics/tests/prediction_test.php index 0b42c371598..ca3fdf31c78 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 5bb2ea85903..5e2ee93945a 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 { /** @var \core_analytics\model Store Model 1. */ protected $model1; diff --git a/analytics/tests/stats_test.php b/analytics/tests/stats_test.php index 2d1a9278f59..78fc01867df 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 7228c9b5671..1e2a711d683 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 { /** @var \stdClass course record. */ protected $course; diff --git a/auth/db/tests/db_test.php b/auth/db/tests/db_test.php index 981e56cf22e..bf46c745339 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 5ba47583e0a..12c557a014b 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 { /** @var int custom profile field1 ID. */ protected $field1; diff --git a/auth/ldap/tests/auth_ldap_test.php b/auth/ldap/tests/auth_ldap_test.php index b05a2da21fa..4ceeaa08638 100644 --- a/auth/ldap/tests/auth_ldap_test.php +++ b/auth/ldap/tests/auth_ldap_test.php @@ -46,7 +46,7 @@ use auth_ldap\task\{ * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class auth_ldap_test extends \advanced_testcase { +final class auth_ldap_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; diff --git a/auth/lti/tests/auth_test.php b/auth/lti/tests/auth_test.php index 695d7d29412..8a6b6f80fa8 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 d05b542b85d..944398e1407 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 938d751eeb4..045f6694bcb 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 3e71f6fb29d..9934ec3b457 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 9a07caf9d67..632e2220ff4 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 0aaa7360d72..03aa13083e3 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 6264b8bed7c..087a0aa776f 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(): void { $this->resetAfterTest(); diff --git a/auth/oauth2/tests/privacy/provider_test.php b/auth/oauth2/tests/privacy/provider_test.php index 05660cb84b8..605e1f85c39 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 c660c358ac8..8c74ed33559 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(): void { global $CFG; diff --git a/auth/tests/external/external_test.php b/auth/tests/external/external_test.php index 7e79a412f40..268fe4d5ae8 100644 --- a/auth/tests/external/external_test.php +++ b/auth/tests/external/external_test.php @@ -45,7 +45,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 a0c5f3f73b8..e8d4d98b1a1 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 bfc6a86a0a2..4a29b368fca 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 c28abe2b92c..1d8933d734f 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 6630511c10e..b3a01480367 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 96c20a92d82..194a7aa5538 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 fa14191e8ba..5b8c88ef612 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 6744c939294..1e8dfb1b571 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 1248938bf01..cc0ebbb29d1 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 3634d8bacea..b1f9f8eb1c2 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 f2a5e9b7127..60c15838968 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 5972d30e908..88743d659ad 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 8c0ef914435..9c918c2e05c 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 245a53fbe40..7dbb3a00906 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 2c90f40bb0e..27876cb74bb 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_stepslib_test.php b/backup/moodle2/tests/backup_stepslib_test.php index fe55452f00b..44c025d6954 100644 --- a/backup/moodle2/tests/backup_stepslib_test.php +++ b/backup/moodle2/tests/backup_stepslib_test.php @@ -28,7 +28,7 @@ use backup_section_task; * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_stepslib_test extends \advanced_testcase { +final class backup_stepslib_test extends \advanced_testcase { /** * Setup to include all libraries. */ diff --git a/backup/moodle2/tests/backup_xml_transformer_test.php b/backup/moodle2/tests/backup_xml_transformer_test.php index 5bd42cf0abf..588ab9ad4ce 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 c2f585aebe5..857f66ceb28 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 21e2f4aa742..fc8a5a529fe 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 1505a3fdcd5..f2c43e20e1f 100644 --- a/backup/moodle2/tests/restore_stepslib_date_test.php +++ b/backup/moodle2/tests/restore_stepslib_date_test.php @@ -33,7 +33,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/moodle2/tests/restore_stepslib_test.php b/backup/moodle2/tests/restore_stepslib_test.php index 02023cd6220..6705246f9cd 100644 --- a/backup/moodle2/tests/restore_stepslib_test.php +++ b/backup/moodle2/tests/restore_stepslib_test.php @@ -25,7 +25,7 @@ use backup; * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_stepslib_test extends \advanced_testcase { +final class restore_stepslib_test extends \advanced_testcase { /** * Setup to include all libraries. */ diff --git a/backup/tests/async_backup_test.php b/backup/tests/async_backup_test.php index 09a8b99d224..23d8b964e11 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 e37c230bc15..ec7558e1ea8 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 3ad4d875be9..79d54f8e688 100644 --- a/backup/tests/automated_backup_test.php +++ b/backup/tests/automated_backup_test.php @@ -39,7 +39,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 5ce2f404d6b..133e1b3f010 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_group_test.php b/backup/tests/backup_restore_group_test.php index 9814c5b0810..3e5dd50b2c3 100644 --- a/backup/tests/backup_restore_group_test.php +++ b/backup/tests/backup_restore_group_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2023 Catalyst IT Pty Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_restore_group_test extends core_backup_backup_restore_base_testcase { +final class backup_restore_group_test extends core_backup_backup_restore_base_testcase { /** * Test for backup/restore with customfields. 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 1318005da3f..e5425d0cd9b 100644 --- a/backup/tests/externallib_test.php +++ b/backup/tests/externallib_test.php @@ -37,7 +37,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 5e3379f26b8..4bee5289d87 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 0cc42ef2f9e..8540d8eb95b 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 ace3a8b749e..3ff35ea9b23 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 12e9a9316d6..3665e874b2e 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 128ccdac669..b775cafb193 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 cc9cb010bee..d6349243ce6 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 a907c680af2..6ea0b9ffdbc 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 d22fc552299..7cbbc6bdb58 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 d25e94d6208..bf501f65279 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 f4145efdd64..2a5bebe0813 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 6c7a365576a..2393e323d59 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(): void { diff --git a/backup/util/helper/tests/copy_helper_test.php b/backup/util/helper/tests/copy_helper_test.php index 86cbd82c51d..c61cf625261 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 d83f80f26ac..075294f4da2 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 75830be23f4..5a1a78cb897 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 9de0ae4237b..0676c7ca8e4 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 01bcfab2cb8..1a068269ce8 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(): void { 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 6852b0eddcc..e54a01ec8c1 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 4b7052b2803..6cb5b54a4bc 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 54861dec22a..0fb6dce77e9 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 31fe98ef36b..9e09f61cb34 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 023c08c0afc..b11750f47be 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 c9779a8b912..235f425dea3 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 91ed89634a4..31a81677898 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 3774e498494..7a1db9c423a 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 baf4321208a..10393eba005 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 bcd6f71d075..35bf9f2d238 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 72936709945..93973fe146f 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 2d4f72c5ebc..dd34fb05784 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 a8cfe9afdb0..4a06d8d5476 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 a4455c770eb..6c02ff297b3 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 4c00c323fea..822f8527db8 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 7de26b4e065..a3ef7ca820d 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 979d70d5b8e..947d825fac3 100644 --- a/backup/util/xml/tests/writer_test.php +++ b/backup/util/xml/tests/writer_test.php @@ -49,7 +49,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 ae404ed1669..21d3d3eff21 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; @@ -44,129 +37,6 @@ class badgeslib_test extends advanced_testcase { /** @var $assertion2 to define json format for Open badge version 2 */ protected $assertion2; - protected function setUp(): void { - global $DB, $CFG; - $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"}'; - } - public function test_create_badge(): void { $badge = new badge($this->badgeid); @@ -1654,6 +1524,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, @@ -1708,6 +1579,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 c319e163cec..d4c80296a15 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(): void { - $systemcontext = context_system::instance(); $sink = $this->redirectEvents(); @@ -63,7 +53,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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(); - } /** @@ -228,7 +210,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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(); - } /** @@ -258,7 +238,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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(); - } /** @@ -291,7 +269,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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(); - } /** @@ -318,7 +294,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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(); - } /** @@ -350,7 +324,6 @@ class events_test extends badgeslib_test { * create and trigger the event and ensure data is returned as expected. */ 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 40d1c8736c1..024965f2702 100644 --- a/badges/tests/external/external_test.php +++ b/badges/tests/external/external_test.php @@ -47,7 +47,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/external/get_user_badge_by_hash_test.php b/badges/tests/external/get_user_badge_by_hash_test.php index 0d1eea0b1c2..7c73b235870 100644 --- a/badges/tests/external/get_user_badge_by_hash_test.php +++ b/badges/tests/external/get_user_badge_by_hash_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @since Moodle 4.3 * @coversDefaultClass \core_badges\external\get_user_badge_by_hash */ -class get_user_badge_by_hash_test extends externallib_advanced_testcase { +final class get_user_badge_by_hash_test extends externallib_advanced_testcase { /** * Prepare the test. diff --git a/badges/tests/output/manage_badge_action_bar_test.php b/badges/tests/output/manage_badge_action_bar_test.php index c80a0600529..27f5e91fb5b 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 1bf4e80313b..433fba98efa 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/badges/tests/reportbuilder/datasource/users_test.php b/badges/tests/reportbuilder/datasource/users_test.php index 96da2707cbc..b39f882acaa 100644 --- a/badges/tests/reportbuilder/datasource/users_test.php +++ b/badges/tests/reportbuilder/datasource/users_test.php @@ -37,7 +37,7 @@ require_once("{$CFG->libdir}/badgeslib.php"); * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class users_test extends core_reportbuilder_testcase { +final class users_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/blocks/accessreview/tests/accessibility_review_test.php b/blocks/accessreview/tests/accessibility_review_test.php index 7b7e0335564..45e79751bac 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 3f74870b51e..8ced92f2a2d 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 49d13103612..b801df593f6 100644 --- a/blocks/comments/tests/privacy/provider_test.php +++ b/blocks/comments/tests/privacy/provider_test.php @@ -36,7 +36,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 42642764213..59d6a469fca 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 6ca758bf8ed..f3436a4f1d3 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 617fd9a0894..5db47df14a0 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 7af4297cd13..c8f2bb20c3e 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 482ef8c69a0..b816792cbc3 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 e819d407e67..92ce18c9c9c 100644 --- a/blocks/online_users/tests/generator_test.php +++ b/blocks/online_users/tests/generator_test.php @@ -24,7 +24,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_generator(): void { global $DB; diff --git a/blocks/online_users/tests/online_users_test.php b/blocks/online_users/tests/online_users_test.php index 3a38bf5ae9c..eed55872763 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 1aec7bdeb7b..32f71b6a47f 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 c0bbfbd4d0e..8021fe07118 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 c6bff27502d..48fb8834ec6 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; /** @var string Table name. */ diff --git a/blocks/recentlyaccesseditems/tests/privacy/provider_test.php b/blocks/recentlyaccesseditems/tests/privacy/provider_test.php index 2c2b8d4c9e6..4d663f5bd2e 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 9cdaeb1d2c4..ad5d89f0a41 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 7ec3f3e0c7a..d874f92fc46 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 f5470ea9489..a3d94521fd2 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 afdfd4b98a7..59fda684872 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 1f142795c6c..3e1c666760c 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 bfced494ccf..78d2dc8461d 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 e5fd6279de8..ed78aac7058 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 dc98b27ed8d..e8222ac571f 100644 --- a/blog/tests/external/external_test.php +++ b/blog/tests/external/external_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2018 Juan Leyva * @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 { private $courseid; private $cmid; diff --git a/blog/tests/lib_test.php b/blog/tests/lib_test.php index f4965927590..1d800803ca6 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 05d1e6594e8..3d42980956e 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 b823f40894c..cc0a23df797 100644 --- a/blog/tests/reportbuilder/datasource/blogs_test.php +++ b/blog/tests/reportbuilder/datasource/blogs_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 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 f4fee05346c..43b0c8e163e 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 66bde847190..13fba4ae138 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 9153b091225..0ebff36c51e 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/cachestore_cluster_redis_test.php b/cache/stores/redis/tests/cachestore_cluster_redis_test.php index 604b122bea5..d6934a75edd 100644 --- a/cache/stores/redis/tests/cachestore_cluster_redis_test.php +++ b/cache/stores/redis/tests/cachestore_cluster_redis_test.php @@ -43,7 +43,7 @@ require_once(__DIR__ . '/../lib.php'); * * @coversDefaultClass \cachestore_redis */ -class cachestore_cluster_redis_test extends \advanced_testcase { +final class cachestore_cluster_redis_test extends \advanced_testcase { /** * Create a cache store for testing the Redis cluster. * diff --git a/cache/stores/redis/tests/cachestore_redis_test.php b/cache/stores/redis/tests/cachestore_redis_test.php index af3fac0a938..a4ed0d66fa3 100644 --- a/cache/stores/redis/tests/cachestore_redis_test.php +++ b/cache/stores/redis/tests/cachestore_redis_test.php @@ -39,7 +39,7 @@ require_once(__DIR__.'/../lib.php'); * * @coversDefaultClass \cachestore_redis */ -class cachestore_redis_test extends \cachestore_tests { +final class cachestore_redis_test extends \cachestore_tests { /** @var cachestore_redis $store Redis Cache Store. */ protected $store; diff --git a/cache/stores/redis/tests/compressor_test.php b/cache/stores/redis/tests/compressor_test.php index 720f3ca9708..c6ab16af93e 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 8dcbe42df60..481c533e042 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 4ccef41df28..af9e69c13ea 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 329e608596e..c57fef98c03 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/cache/tests/administration_helper_test.php b/cache/tests/administration_helper_test.php index 49b3dd1a06f..c773e4ed634 100644 --- a/cache/tests/administration_helper_test.php +++ b/cache/tests/administration_helper_test.php @@ -38,8 +38,7 @@ require_once($CFG->dirroot.'/cache/tests/fixtures/lib.php'); * @copyright 2012 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class administration_helper_test extends \advanced_testcase { - +final class administration_helper_test extends \advanced_testcase { /** * Set things back to the default before each test. */ diff --git a/cache/tests/allow_temporary_caches_test.php b/cache/tests/allow_temporary_caches_test.php index cd1879830f6..819751fbc32 100644 --- a/cache/tests/allow_temporary_caches_test.php +++ b/cache/tests/allow_temporary_caches_test.php @@ -25,8 +25,7 @@ namespace core_cache; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_cache\allow_temporary_caches */ -class allow_temporary_caches_test extends \advanced_testcase { - +final class allow_temporary_caches_test extends \advanced_testcase { /** * Tests whether temporary caches are allowed. */ diff --git a/cache/tests/cache_helper_test.php b/cache/tests/cache_helper_test.php index fb8dc3b1f7e..6d1442c4315 100644 --- a/cache/tests/cache_helper_test.php +++ b/cache/tests/cache_helper_test.php @@ -25,7 +25,7 @@ namespace core_cache; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \cache_helper */ -class cache_helper_test extends \advanced_testcase { +final class cache_helper_test extends \advanced_testcase { /** * Test the result_found method. * diff --git a/cache/tests/cache_test.php b/cache/tests/cache_test.php index a5b06f9e293..d3ae4605f62 100644 --- a/cache/tests/cache_test.php +++ b/cache/tests/cache_test.php @@ -52,8 +52,7 @@ use cacheable_object_array; * @coversDefaultClass \cache * @covers \cache */ -class cache_test extends \advanced_testcase { - +final class cache_test extends \advanced_testcase { /** * Load required libraries and fixtures. */ diff --git a/cache/tests/config_writer_test.php b/cache/tests/config_writer_test.php index 40a5cbc235c..54588352972 100644 --- a/cache/tests/config_writer_test.php +++ b/cache/tests/config_writer_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot.'/cache/tests/fixtures/lib.php'); * @copyright 2012 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class config_writer_test extends \advanced_testcase { +final class config_writer_test extends \advanced_testcase { /** * Set things back to the default before each test. diff --git a/cache/tests/store_test.php b/cache/tests/store_test.php index 34e9169b6c6..dbcab0d6682 100644 --- a/cache/tests/store_test.php +++ b/cache/tests/store_test.php @@ -23,7 +23,7 @@ namespace core_cache; * @copyright 2021 The Open University * @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 the default implementation of cache_size_details, which does some diff --git a/calendar/tests/action_event_test.php b/calendar/tests/action_event_test.php index b73ed20f867..9e1f7023252 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 129afe171c6..ed4f5a37d39 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 ea84559f63b..e5ea53ef104 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 53496c88304..31f157dbf08 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 9dadc7fbf1e..05a96818bc9 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 5319b356905..b69a14f7a76 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 2f10bf51724..29399c04181 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 f943eb007f4..c5c25b9e80c 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 9505a827b24..582567c5cbe 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(): void { global $DB; diff --git a/calendar/tests/event/events_test.php b/calendar/tests/event/events_test.php index 73214109eed..827d42bb098 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 05bc94410cc..aa0e44b1f18 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 34226b9f814..6a10d28f7c6 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 fed62b2c4ea..f7d744ce897 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 433a5d3bdbd..1f7a7ac71e4 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 aec5d9e928b..349a243dc5e 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 c8c29368325..f398a3151d5 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 8ed622c8fd1..36c6b500d05 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 6fd04671757..b666bce10f0 100644 --- a/calendar/tests/externallib_test.php +++ b/calendar/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.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 2102b0b9ac9..c003b1bdbe3 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 e1f3e503890..33e451729fe 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 b468df121de..38e4079d10d 100644 --- a/calendar/tests/privacy/provider_test.php +++ b/calendar/tests/privacy/provider_test.php @@ -44,7 +44,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_calendar\privacy\provider */ -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 b794682e7d9..77c40b13503 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 785cb95fdf9..43dbcb65ed5 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 2e904ac9689..f6c7c92409a 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 c9a32cd5108..4fc4889ec8a 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/customfield/cohort_handler_test.php b/cohort/tests/customfield/cohort_handler_test.php index 87ea881d02d..3d83bbea1ec 100644 --- a/cohort/tests/customfield/cohort_handler_test.php +++ b/cohort/tests/customfield/cohort_handler_test.php @@ -30,7 +30,7 @@ use core_customfield\field_controller; * @copyright 2022 Dmitrii Metelkin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cohort_handler_test extends advanced_testcase { +final class cohort_handler_test extends advanced_testcase { /** * Test custom field handler. * @var \core_customfield\handler diff --git a/cohort/tests/externallib_test.php b/cohort/tests/externallib_test.php index 0eaa2588fe4..b5b0b2d96db 100644 --- a/cohort/tests/externallib_test.php +++ b/cohort/tests/externallib_test.php @@ -36,7 +36,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 { /** * Create cohort custom fields for testing. diff --git a/cohort/tests/lib_test.php b/cohort/tests/lib_test.php index a535c85df7f..2e8c8cfc318 100644 --- a/cohort/tests/lib_test.php +++ b/cohort/tests/lib_test.php @@ -33,7 +33,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 { /** * Create Cohort custom field for testing. diff --git a/cohort/tests/privacy/provider_test.php b/cohort/tests/privacy/provider_test.php index 85099a7c599..668a19040a2 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 a44fcdd2eff..55a07692920 100644 --- a/cohort/tests/reportbuilder/datasource/cohorts_test.php +++ b/cohort/tests/reportbuilder/datasource/cohorts_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 cohorts_test extends core_reportbuilder_testcase { +final class cohorts_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/comment/tests/context_freeze_test.php b/comment/tests/context_freeze_test.php index 75dac331343..6aa1b60d1c6 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 dd9abf52d51..f7ebd138612 100644 --- a/comment/tests/externallib_test.php +++ b/comment/tests/externallib_test.php @@ -36,7 +36,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 088ac4894d0..a224e47a058 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 cc8d81669fc..b1674dfad1a 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 { /** * Test default datasource diff --git a/communication/provider/customlink/tests/communication_feature_test.php b/communication/provider/customlink/tests/communication_feature_test.php index 6c338306089..c28958a64ef 100644 --- a/communication/provider/customlink/tests/communication_feature_test.php +++ b/communication/provider/customlink/tests/communication_feature_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/../../../tests/communication_test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \communication_customlink\communication_feature */ -class communication_feature_test extends \advanced_testcase { +final class communication_feature_test extends \advanced_testcase { use communication_test_helper_trait; public function setUp(): void { diff --git a/communication/provider/matrix/tests/communication_feature_test.php b/communication/provider/matrix/tests/communication_feature_test.php index e6d38b7c1da..82f297b53fc 100644 --- a/communication/provider/matrix/tests/communication_feature_test.php +++ b/communication/provider/matrix/tests/communication_feature_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/../../../tests/communication_test_helper_trait.php'); * @covers \communication_matrix\communication_feature * @coversDefaultClass \communication_matrix\communication_feature */ -class communication_feature_test extends \advanced_testcase { +final class communication_feature_test extends \advanced_testcase { use matrix_test_helper_trait; use communication_test_helper_trait; diff --git a/communication/provider/matrix/tests/local/command_test.php b/communication/provider/matrix/tests/local/command_test.php index 8e540b78410..796a32866f9 100644 --- a/communication/provider/matrix/tests/local/command_test.php +++ b/communication/provider/matrix/tests/local/command_test.php @@ -34,7 +34,7 @@ require_once(dirname(__DIR__) . '/matrix_client_test_trait.php'); * @covers \communication_matrix\local\command * @coversDefaultClass \communication_matrix\local\command */ -class command_test extends \advanced_testcase { +final class command_test extends \advanced_testcase { use \communication_matrix\matrix_client_test_trait; /** diff --git a/communication/provider/matrix/tests/matrix_client_test.php b/communication/provider/matrix/tests/matrix_client_test.php index 646cc6a89af..d02cb7f513e 100644 --- a/communication/provider/matrix/tests/matrix_client_test.php +++ b/communication/provider/matrix/tests/matrix_client_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/matrix_client_test_trait.php'); * @covers \communication_matrix\matrix_client * @coversDefaultClass \communication_matrix\matrix_client */ -class matrix_client_test extends \advanced_testcase { +final class matrix_client_test extends \advanced_testcase { use matrix_client_test_trait; /** diff --git a/communication/provider/matrix/tests/matrix_room_test.php b/communication/provider/matrix/tests/matrix_room_test.php index ee374c230ca..07a9c4a62e5 100644 --- a/communication/provider/matrix/tests/matrix_room_test.php +++ b/communication/provider/matrix/tests/matrix_room_test.php @@ -25,7 +25,7 @@ namespace communication_matrix; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \communication_matrix\matrix_room */ -class matrix_room_test extends \advanced_testcase { +final class matrix_room_test extends \advanced_testcase { /** * Test for load_by_processor_id with no record. * diff --git a/communication/provider/matrix/tests/matrix_user_manager_test.php b/communication/provider/matrix/tests/matrix_user_manager_test.php index 559e435e417..a4b7ce77631 100644 --- a/communication/provider/matrix/tests/matrix_user_manager_test.php +++ b/communication/provider/matrix/tests/matrix_user_manager_test.php @@ -27,7 +27,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \communication_matrix\matrix_user_manager */ -class matrix_user_manager_test extends \advanced_testcase { +final class matrix_user_manager_test extends \advanced_testcase { /** * Test fetcihing a users matrix userid from Moodle. */ diff --git a/communication/tests/api_test.php b/communication/tests/api_test.php index ea61511b864..256684876ad 100644 --- a/communication/tests/api_test.php +++ b/communication/tests/api_test.php @@ -38,7 +38,7 @@ require_once(__DIR__ . '/communication_test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_communication\api */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { use matrix_test_helper_trait; use communication_test_helper_trait; diff --git a/communication/tests/helper_test.php b/communication/tests/helper_test.php index 76eb2f0626d..ddfe529f103 100644 --- a/communication/tests/helper_test.php +++ b/communication/tests/helper_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/communication_test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_communication\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { use communication_test_helper_trait; use matrix_test_helper_trait; diff --git a/communication/tests/hook_listener_test.php b/communication/tests/hook_listener_test.php index d9a43127a59..520f126fae4 100644 --- a/communication/tests/hook_listener_test.php +++ b/communication/tests/hook_listener_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/communication_test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_communication\hook_listener */ -class hook_listener_test extends \advanced_testcase { +final class hook_listener_test extends \advanced_testcase { use communication_test_helper_trait; use matrix_test_helper_trait; diff --git a/communication/tests/processor_test.php b/communication/tests/processor_test.php index 29c6344726a..aae95a543e5 100644 --- a/communication/tests/processor_test.php +++ b/communication/tests/processor_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/communication_test_helper_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_communication\processor */ -class processor_test extends \advanced_testcase { +final class processor_test extends \advanced_testcase { use matrix_test_helper_trait; use communication_test_helper_trait; diff --git a/competency/tests/api_test.php b/competency/tests/api_test.php index abab660795a..f266dd37419 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(): void { $this->resetAfterTest(true); diff --git a/competency/tests/competency_override_test.php b/competency/tests/competency_override_test.php index d4296d0d3b8..f8b142f9aea 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 { /** @var \stdClass course record. */ protected $course; diff --git a/competency/tests/competency_rule_test.php b/competency/tests/competency_rule_test.php index 6ed32522898..2e5886e998e 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(): void { $this->resetAfterTest(true); diff --git a/competency/tests/competency_test.php b/competency/tests/competency_test.php index d1ab714b65e..e5b2e488f9e 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(): void { $this->resetAfterTest(); diff --git a/competency/tests/course_competency_settings_test.php b/competency/tests/course_competency_settings_test.php index d0350d5dce8..3e924c1d52b 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(): void { global $CFG, $DB; diff --git a/competency/tests/course_competency_test.php b/competency/tests/course_competency_test.php index bfbefd6538d..aa691d2ad12 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(): void { global $CFG, $DB; diff --git a/competency/tests/course_module_competency_test.php b/competency/tests/course_module_competency_test.php index e0ea5f03ad2..d83954e6c42 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(): void { global $CFG, $DB; diff --git a/competency/tests/event/events_test.php b/competency/tests/event/events_test.php index f75509cb84e..ca0faef7769 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 ba3216c5887..eeb152f1446 100644 --- a/competency/tests/external/external_test.php +++ b/competency/tests/external/external_test.php @@ -50,7 +50,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 25d4e6ee732..63a1b02519d 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(): void { $this->resetAfterTest(true); diff --git a/competency/tests/hooks_test.php b/competency/tests/hooks_test.php index 7d525a5b998..699ac012070 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(): void { $this->resetAfterTest(); diff --git a/competency/tests/lib_test.php b/competency/tests/lib_test.php index ce74c6835a6..02cdccc80c7 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(): void { global $DB, $PAGE; diff --git a/competency/tests/performance_helper_test.php b/competency/tests/performance_helper_test.php index 7038f87f440..806617277d7 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(): void { global $DB; diff --git a/competency/tests/plan_test.php b/competency/tests/plan_test.php index 4b0b2abd4e5..c85dfdb85d9 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(): void { $this->resetAfterTest(true); diff --git a/competency/tests/privacy/provider_test.php b/competency/tests/privacy/provider_test.php index dff9fe5cf1d..586f698fe74 100644 --- a/competency/tests/privacy/provider_test.php +++ b/competency/tests/privacy/provider_test.php @@ -48,7 +48,7 @@ use core_competency\privacy\provider; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_competency\privacy\provider */ -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 ec74d041e22..f276b63a5db 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(): void { global $DB; diff --git a/competency/tests/template_test.php b/competency/tests/template_test.php index 1d5ec86ab30..db6c8c8f023 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(): void { global $DB; diff --git a/competency/tests/user_evidence_competency_test.php b/competency/tests/user_evidence_competency_test.php index 125ae216139..65085e585f2 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(): void { global $CFG, $DB; diff --git a/completion/tests/activity_custom_completion_test.php b/completion/tests/activity_custom_completion_test.php index 0323c2ffebf..2dd560b43bd 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 4e9d5b510fd..755b464e8fe 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 af9e45ea83c..89d22f1204c 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 9b6d43ed446..19eae8601ee 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 c5e06a33939..491dd63351b 100644 --- a/completion/tests/cm_completion_details_test.php +++ b/completion/tests/cm_completion_details_test.php @@ -43,7 +43,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_completion\cm_completion_details */ -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 8e73934823f..dd91cf332bf 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 3893b82b23d..c4b401bf79d 100644 --- a/completion/tests/externallib_test.php +++ b/completion/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @since Moodle 2.9 * @coversDefaultClass \core_completion_external */ -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/generator_test.php b/completion/tests/generator_test.php index 7a987662d42..db5b298d0da 100644 --- a/completion/tests/generator_test.php +++ b/completion/tests/generator_test.php @@ -25,7 +25,7 @@ namespace core_completion; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_completion_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Test create_default_completion. diff --git a/completion/tests/privacy/provider_test.php b/completion/tests/privacy/provider_test.php index 80a43220138..f31dc03a583 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 c46341723ef..3ddf3f8580e 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 ad3e6960ff0..c2a3267d8bc 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 1d9a4424245..62f5f8bfe08 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 8dbe36e3b50..d6198bd5fb7 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 7b318f9ee15..182443ece67 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 008daebf91f..3b1555a302e 100644 --- a/contentbank/tests/contenttype_test.php +++ b/contentbank/tests/contenttype_test.php @@ -31,7 +31,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/copy_content_test.php b/contentbank/tests/external/copy_content_test.php index df9134abea2..61533e39585 100644 --- a/contentbank/tests/external/copy_content_test.php +++ b/contentbank/tests/external/copy_content_test.php @@ -33,7 +33,7 @@ use core_external\external_api; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_contentbank\external\copy_content */ -class copy_content_test extends \externallib_advanced_testcase { +final class copy_content_test extends \externallib_advanced_testcase { /** * Test the behaviour of copy_content() for users with permission. diff --git a/contentbank/tests/external/delete_content_test.php b/contentbank/tests/external/delete_content_test.php index f136d297eaf..2324aea327a 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 0c237f0497e..44ec25bde28 100644 --- a/contentbank/tests/external/rename_content_test.php +++ b/contentbank/tests/external/rename_content_test.php @@ -43,7 +43,7 @@ use core_external\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 4464978af6d..66f3c0c0ed6 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/singleactivity/tests/format_singleactivity_test.php b/course/format/singleactivity/tests/format_singleactivity_test.php index d2ce3158a23..9e7a7424672 100644 --- a/course/format/singleactivity/tests/format_singleactivity_test.php +++ b/course/format/singleactivity/tests/format_singleactivity_test.php @@ -24,7 +24,7 @@ namespace format_singleactivity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \format_singleactivity */ -class format_singleactivity_test extends \advanced_testcase { +final class format_singleactivity_test extends \advanced_testcase { /** * Test for get_view_url(). diff --git a/course/format/social/tests/format_social_test.php b/course/format/social/tests/format_social_test.php index 6868cef5cbc..ab29bc95278 100644 --- a/course/format/social/tests/format_social_test.php +++ b/course/format/social/tests/format_social_test.php @@ -24,7 +24,7 @@ namespace format_social; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \format_social */ -class format_social_test extends \advanced_testcase { +final class format_social_test extends \advanced_testcase { /** * Test for get_view_url(). diff --git a/course/format/tests/base_test.php b/course/format/tests/base_test.php index 97963366e9f..ebd051c274b 100644 --- a/course/format/tests/base_test.php +++ b/course/format/tests/base_test.php @@ -23,7 +23,7 @@ * @covers \core_courseformat\base * @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/file_handlers_test.php b/course/format/tests/external/file_handlers_test.php index 793fac1a5ae..b9bb071b9f9 100644 --- a/course/format/tests/external/file_handlers_test.php +++ b/course/format/tests/external/file_handlers_test.php @@ -34,7 +34,7 @@ use dndupload_handler; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\external\file_handlers */ -class file_handlers_test extends \externallib_advanced_testcase { +final class file_handlers_test extends \externallib_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 82abd5827de..c086cbf304d 100644 --- a/course/format/tests/external/get_state_test.php +++ b/course/format/tests/external/get_state_test.php @@ -32,7 +32,7 @@ use core_external\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 a46beaba4b8..7aec089abd2 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/formatactions_test.php b/course/format/tests/formatactions_test.php index ec0b4e77296..e27f39b8cd6 100644 --- a/course/format/tests/formatactions_test.php +++ b/course/format/tests/formatactions_test.php @@ -24,7 +24,7 @@ namespace core_courseformat; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\base */ -class formatactions_test extends \advanced_testcase { +final class formatactions_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/local/baseactions_test.php b/course/format/tests/local/baseactions_test.php index 19d05e14332..bd0021fe4a4 100644 --- a/course/format/tests/local/baseactions_test.php +++ b/course/format/tests/local/baseactions_test.php @@ -27,7 +27,7 @@ use cm_info; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\base */ -class baseactions_test extends \advanced_testcase { +final class baseactions_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/course/format/tests/local/sectionactions_test.php b/course/format/tests/local/sectionactions_test.php index 604718c3d51..c79533fe5c8 100644 --- a/course/format/tests/local/sectionactions_test.php +++ b/course/format/tests/local/sectionactions_test.php @@ -26,7 +26,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\sectionactions */ -class sectionactions_test extends \advanced_testcase { +final class sectionactions_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/course/format/tests/output/activitybadge_test.php b/course/format/tests/output/activitybadge_test.php index 7ea2910d848..f467523f036 100644 --- a/course/format/tests/output/activitybadge_test.php +++ b/course/format/tests/output/activitybadge_test.php @@ -26,7 +26,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\output\activitybadge */ -class activitybadge_test extends \advanced_testcase { +final class activitybadge_test extends \advanced_testcase { /** * Test the behaviour of create_instance() and export_for_template() attributes. diff --git a/course/format/tests/output/local/state/cm_test.php b/course/format/tests/output/local/state/cm_test.php index 696ad302a92..55f2a2f1b22 100644 --- a/course/format/tests/output/local/state/cm_test.php +++ b/course/format/tests/output/local/state/cm_test.php @@ -28,7 +28,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 bca8ac3901f..0a2f1f185ab 100644 --- a/course/format/tests/output/local/state/section_test.php +++ b/course/format/tests/output/local/state/section_test.php @@ -28,7 +28,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 cbb2283f77a..238cf65673a 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 1aba69e6af1..1ff2b3b0c08 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/sectiondelegate_test.php b/course/format/tests/sectiondelegate_test.php index e3932342c0e..56174600274 100644 --- a/course/format/tests/sectiondelegate_test.php +++ b/course/format/tests/sectiondelegate_test.php @@ -27,7 +27,7 @@ use test_component\courseformat\sectiondelegate as testsectiondelegate; * @covers \core_courseformat\sectiondelegate * @coversDefaultClass \core_courseformat\sectiondelegate */ -class sectiondelegate_test extends \advanced_testcase { +final class sectiondelegate_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/stateupdates_test.php b/course/format/tests/stateupdates_test.php index 8831c4c64d1..9c52ba30506 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/courseformat/stateactions_test.php b/course/format/topics/tests/courseformat/stateactions_test.php index 72e297908ab..f48cc510fc0 100644 --- a/course/format/topics/tests/courseformat/stateactions_test.php +++ b/course/format/topics/tests/courseformat/stateactions_test.php @@ -27,7 +27,7 @@ use stdClass; * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stateactions_test extends \advanced_testcase { +final class stateactions_test extends \advanced_testcase { /** * Enrol a user into a course and login as this user. diff --git a/course/format/topics/tests/format_topics_test.php b/course/format/topics/tests/format_topics_test.php index 0d0ff0b6edf..a8772266f52 100644 --- a/course/format/topics/tests/format_topics_test.php +++ b/course/format/topics/tests/format_topics_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \format_topics */ -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 9110482f340..ab929eb5f64 100644 --- a/course/format/weeks/tests/format_weeks_test.php +++ b/course/format/weeks/tests/format_weeks_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \format_weeks */ -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 ada26d82c15..b0c6dd51672 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 b80a13f9663..5b1b9397ec9 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 bfd98f5752b..4fcf1a4b464 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 8ccae92b447..89a9bffeaea 100644 --- a/course/tests/backup_restore_activity_test.php +++ b/course/tests/backup_restore_activity_test.php @@ -26,7 +26,7 @@ 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. */ diff --git a/course/tests/caching_content_item_readonly_repository_test.php b/course/tests/caching_content_item_readonly_repository_test.php index 9ea96b426f4..5e2e5349b99 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 ba591778828..49c2d694e97 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 43b30b7aa94..26d0bfb7c1b 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 8a6b30aff56..e9f2d727783 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 95db8b36bfa..b134a06dc5f 100644 --- a/course/tests/content_item_test.php +++ b/course/tests/content_item_test.php @@ -31,7 +31,7 @@ use core_course\local\entity\string_title; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_course\local\entity\content_item */ -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 1164f0964fe..2c61bfab39d 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 7be6e7c5b89..9f0b0787cf7 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 ce0a9cef2f2..d227ff153d2 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 d697d6ad478..dc7d80a1b42 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 4291aabfe5d..729a81913fb 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -64,7 +64,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 b8130e83c58..01f97e9b481 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(): void { global $DB, $USER; diff --git a/course/tests/customfield_test.php b/course/tests/customfield_test.php index 454dd32cda7..890d2ce40e6 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 ea373a9943b..0909dcf8f75 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 084f37df45f..7676f641202 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 65e1c6e7927..0c17b2ee6d4 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 87a74ad5c5f..91e95f6e572 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 065033999fd..ab0def9b85d 100644 --- a/course/tests/modlib_test.php +++ b/course/tests/modlib_test.php @@ -18,12 +18,6 @@ namespace core_course; use core_courseformat\formatactions; -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 * @@ -32,7 +26,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 da9e57b306d..e633fe08753 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/categories_test.php b/course/tests/reportbuilder/datasource/categories_test.php index 5b2f9b78ecd..8b497e9b0a0 100644 --- a/course/tests/reportbuilder/datasource/categories_test.php +++ b/course/tests/reportbuilder/datasource/categories_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class categories_test extends core_reportbuilder_testcase { +final class categories_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/course/tests/reportbuilder/datasource/courses_test.php b/course/tests/reportbuilder/datasource/courses_test.php index b6c903ce52b..a8aa4000136 100644 --- a/course/tests/reportbuilder/datasource/courses_test.php +++ b/course/tests/reportbuilder/datasource/courses_test.php @@ -40,7 +40,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/reportbuilder/datasource/participants_test.php b/course/tests/reportbuilder/datasource/participants_test.php index 96463b0cc62..8de2fac30a8 100644 --- a/course/tests/reportbuilder/datasource/participants_test.php +++ b/course/tests/reportbuilder/datasource/participants_test.php @@ -43,7 +43,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2022 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class participants_test extends core_reportbuilder_testcase { +final class participants_test extends core_reportbuilder_testcase { /** * Load required test libraries diff --git a/course/tests/search/search_test.php b/course/tests/search/search_test.php index 5149f5c6ee3..0fbc279a852 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 2abe98d47f4..8feb93d2674 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 2363a83696a..271bb9d1d24 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 f5ca17005bf..0fec38a294e 100644 --- a/course/tests/task/content_notification_task_test.php +++ b/course/tests/task/content_notification_task_test.php @@ -29,7 +29,7 @@ use core_availability\tree; * @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 aa4d79c5f52..8ac4b31b9b2 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 708d991c6d1..7dbb717fb5a 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 a26406b645f..f068c47b3a2 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 8565791a318..f0a29cfc929 100644 --- a/customfield/field/textarea/tests/plugin_test.php +++ b/customfield/field/textarea/tests/plugin_test.php @@ -31,7 +31,7 @@ use context_system; * @covers \customfield_textarea\field_controller * @covers \customfield_textarea\data_controller */ -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 112a98ac027..a057b9859e0 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/category_controller_test.php b/customfield/tests/category_controller_test.php index 8ab99f2e111..c4fba687196 100644 --- a/customfield/tests/category_controller_test.php +++ b/customfield/tests/category_controller_test.php @@ -27,8 +27,7 @@ use core_customfield_generator; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_customfield\category_controller */ -class category_controller_test extends \advanced_testcase { - +final class category_controller_test extends \advanced_testcase { /** * Get generator. * diff --git a/customfield/tests/data_controller_test.php b/customfield/tests/data_controller_test.php index c01d00248ad..ef1b84f043c 100644 --- a/customfield/tests/data_controller_test.php +++ b/customfield/tests/data_controller_test.php @@ -31,8 +31,7 @@ use customfield_textarea; * @copyright 2018 Toni Barbera * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_controller_test extends \advanced_testcase { - +final class data_controller_test extends \advanced_testcase { /** * Get generator. * diff --git a/customfield/tests/field_controller_test.php b/customfield/tests/field_controller_test.php index c61a9eb28fe..90cbc125bfc 100644 --- a/customfield/tests/field_controller_test.php +++ b/customfield/tests/field_controller_test.php @@ -32,8 +32,7 @@ use customfield_textarea; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_customfield\field_controller */ -class field_controller_test extends \advanced_testcase { - +final class field_controller_test extends \advanced_testcase { /** * Get generator. * diff --git a/customfield/tests/generator_test.php b/customfield/tests/generator_test.php index d749be1cd62..5e37f8d7b71 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 96bc820994d..d111d07cea1 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 c89bb6d13a4..afd2c2f720e 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 9948b153412..6658add34be 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 e9e688a8e1a..b762f098847 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 e22085e0da7..3172a417d99 100644 --- a/enrol/cohort/tests/lib_test.php +++ b/enrol/cohort/tests/lib_test.php @@ -32,7 +32,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 95b4ad6f4db..b59d68448e1 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 1654aa50f81..2809deda139 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 94c1467d65a..fc25e9675ca 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 dc80e55eae1..4df41e1aa43 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 abff86496eb..b81dafd1837 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 c0fc14681d1..325ee43a1fe 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 4908c2f4703..3c1f1d5f25d 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 0b0e7c2e985..83d070d419f 100644 --- a/enrol/guest/tests/external/external_test.php +++ b/enrol/guest/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.1 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test get_instance_info diff --git a/enrol/guest/tests/external/validate_password_test.php b/enrol/guest/tests/external/validate_password_test.php index 4fb1264417c..c5c5a816319 100644 --- a/enrol/guest/tests/external/validate_password_test.php +++ b/enrol/guest/tests/external/validate_password_test.php @@ -24,7 +24,7 @@ use core_external\external_api; * @package enrol_guest * @covers \enrol_guest\external\validate_password */ -class validate_password_test extends \advanced_testcase { +final class validate_password_test extends \advanced_testcase { public function test_execute(): void { global $DB; diff --git a/enrol/guest/tests/lib_test.php b/enrol/guest/tests/lib_test.php index 435e52f8234..56d90e114b2 100644 --- a/enrol/guest/tests/lib_test.php +++ b/enrol/guest/tests/lib_test.php @@ -24,7 +24,7 @@ */ namespace enrol_guest; -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test the behaviour of validate_enrol_plugin_data(). diff --git a/enrol/imsenterprise/tests/imsenterprise_test.php b/enrol/imsenterprise/tests/imsenterprise_test.php index 9b72944073d..7b1ec92c9fb 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 33d4760bd0e..d1070264c68 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 f65c58c3085..84423361df1 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 5707a22a434..e11c53848ac 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 c4e7c535cab..958009a8c24 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 ef378a0f87d..06f1c915ac6 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 ea3c58dd072..c2cb227ce8a 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 d01895afc9e..7089030c46c 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 a8c9f217d1f..c657d6d7f31 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 54c65747be4..883410b2426 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 7237164036b..0116adf519a 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 fd560dffac6..19d3a515a53 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 a9f8d58e694..d4fff2eacd6 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 9798326f1cc..1ad3d336d0b 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 aeaa14610bc..d42f63d65e4 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 addc10b258a..d5e66bac36b 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 d122baeaf9e..2083e91d05e 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 ee19b9f8f4a..2385467fc69 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 10b22381bdf..ab72ddaa294 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 9a9baac241b..b6a57b91956 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 7d69fdb4121..01b96e18408 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 c1df1757248..099d23b21bd 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 eee2b7fd903..73e30707eaf 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 9f0f8d3b496..dcc1accb674 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 5ab67177349..4aee6ee44ed 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 2e30f0815a8..1c872ea0c98 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 { /** * Test confirming task name. 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 3518a771a27..c827ac661de 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/task/sync_tool_grades_test.php b/enrol/lti/tests/local/ltiadvantage/task/sync_tool_grades_test.php index 72b95b813ba..db9c2ce2ae2 100644 --- a/enrol/lti/tests/local/ltiadvantage/task/sync_tool_grades_test.php +++ b/enrol/lti/tests/local/ltiadvantage/task/sync_tool_grades_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\task\sync_tool_grades */ -class sync_tool_grades_test extends \lti_advantage_testcase { +final class sync_tool_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/utility/message_helper_test.php b/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php index b021b661070..a69ee09dc3d 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 61ac8c27bd0..a94f51b0e35 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 2b79eac69e0..67f6f55c5a7 100644 --- a/enrol/lti/tests/privacy/provider_test.php +++ b/enrol/lti/tests/privacy/provider_test.php @@ -35,7 +35,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 6705efe88aa..5edb981a1fa 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 874c44bdd22..34bcff97eeb 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 159b6481d59..e04606cf6a7 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 a03aaa21420..8648a068e07 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 4ccb82c4207..958983f067f 100644 --- a/enrol/meta/tests/external/add_instances_test.php +++ b/enrol/meta/tests/external/add_instances_test.php @@ -31,7 +31,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 723c2d74e84..02aa9b37d1f 100644 --- a/enrol/meta/tests/external/delete_instances_test.php +++ b/enrol/meta/tests/external/delete_instances_test.php @@ -31,7 +31,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 2d69805661c..b0d4078530c 100644 --- a/enrol/meta/tests/plugin_test.php +++ b/enrol/meta/tests/plugin_test.php @@ -28,7 +28,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 9b95a2adde8..50f1cbe4c93 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 4ad5e9db5da..828beef3947 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 107faa0b121..bba05fc08d5 100644 --- a/enrol/paypal/tests/privacy/provider_test.php +++ b/enrol/paypal/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use stdClass; * @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 2e2bb16ec5e..1ff7c050d03 100644 --- a/enrol/self/tests/externallib_test.php +++ b/enrol/self/tests/externallib_test.php @@ -35,7 +35,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 78fce0ef94d..1bba47b9f2b 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(): void { $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 f2e74312abb..5e004f75251 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 01577ca10c9..744d9a7d116 100644 --- a/enrol/tests/enrollib_test.php +++ b/enrol/tests/enrollib_test.php @@ -36,7 +36,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(): void { global $DB, $CFG; diff --git a/enrol/tests/privacy/provider_test.php b/enrol/tests/privacy/provider_test.php index a26a3e86553..4fd0990eb7e 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 0942a504f19..78cc6a3a518 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 e95e50bba8d..cbe476db0fb 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 5be0f28793c..0f1e24d0b97 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 bf9e603e056..c46540f5f5a 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 9c55d417933..8aec9c3a08c 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 237b5bc40fb..2bb8a08c942 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 fb8dd4694f5..0be4a483ef1 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 bb2955fd741..c31262b96af 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 f58fde21b82..eed9d9dd286 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/external/stored_file_exporter_test.php b/files/tests/external/stored_file_exporter_test.php index af7549f8330..1e4b009e627 100644 --- a/files/tests/external/stored_file_exporter_test.php +++ b/files/tests/external/stored_file_exporter_test.php @@ -27,7 +27,7 @@ use context_user; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stored_file_exporter_test extends advanced_testcase { +final class stored_file_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/files/tests/externallib_test.php b/files/tests/externallib_test.php index 48c7f0b1be4..5276857f863 100644 --- a/files/tests/externallib_test.php +++ b/files/tests/externallib_test.php @@ -37,7 +37,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 f97ee376bd4..eb71e4802d4 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 622778b03af..8ceb2b56ee3 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/files/tests/reportbuilder/datasource/files_test.php b/files/tests/reportbuilder/datasource/files_test.php index 246817fff85..2600b0155f8 100644 --- a/files/tests/reportbuilder/datasource/files_test.php +++ b/files/tests/reportbuilder/datasource/files_test.php @@ -36,7 +36,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 files_test extends core_reportbuilder_testcase { +final class files_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/filter/activitynames/tests/filter_test.php b/filter/activitynames/tests/filter_test.php index 08cf97134c8..4337c026ebd 100644 --- a/filter/activitynames/tests/filter_test.php +++ b/filter/activitynames/tests/filter_test.php @@ -31,7 +31,7 @@ namespace filter_activitynames; * @copyright 2018 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { public function test_links(): void { $this->resetAfterTest(true); diff --git a/filter/algebra/tests/filter_test.php b/filter/algebra/tests/filter_test.php index 3bc118050b2..778810453d1 100644 --- a/filter/algebra/tests/filter_test.php +++ b/filter/algebra/tests/filter_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/filter/algebra/filter.php'); * @copyright 2012 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \basic_testcase { +final class filter_test extends \basic_testcase { protected $filter; diff --git a/filter/data/tests/filter_test.php b/filter/data/tests/filter_test.php index 888b2761690..a07d5ff30b6 100644 --- a/filter/data/tests/filter_test.php +++ b/filter/data/tests/filter_test.php @@ -32,7 +32,7 @@ namespace filter_data; * @copyright 2015 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { /** * Tests that the filter applies the required changes. diff --git a/filter/displayh5p/tests/filter_test.php b/filter/displayh5p/tests/filter_test.php index aa4e8b0b473..a78eb432981 100644 --- a/filter/displayh5p/tests/filter_test.php +++ b/filter/displayh5p/tests/filter_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot.'/filter/displayh5p/filter.php'); * @copyright 2019 Victor Deniz * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { public function setUp(): void { parent::setUp(); diff --git a/filter/displayh5p/tests/upgradelib_test.php b/filter/displayh5p/tests/upgradelib_test.php index 0d80e6e1594..a04dec3ebdd 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/emoticon/tests/filter_test.php b/filter/emoticon/tests/filter_test.php index d9c21fbc942..86e144b9edb 100644 --- a/filter/emoticon/tests/filter_test.php +++ b/filter/emoticon/tests/filter_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/filter/emoticon/filter.php'); // Include the code /** * Skype icons filter testcase. */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { /** * Test that filter ignores nolink/pre element, and processes remaining text diff --git a/filter/glossary/tests/filter_test.php b/filter/glossary/tests/filter_test.php index ab02d5bcc05..27a177116a3 100644 --- a/filter/glossary/tests/filter_test.php +++ b/filter/glossary/tests/filter_test.php @@ -28,7 +28,7 @@ namespace filter_glossary; /** * Test case for glossary. */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { public function test_link_to_entry_with_alias(): void { global $CFG; diff --git a/filter/mathjaxloader/tests/filter_test.php b/filter/mathjaxloader/tests/filter_test.php index 06379e0a4d9..33fb06cdf0a 100644 --- a/filter/mathjaxloader/tests/filter_test.php +++ b/filter/mathjaxloader/tests/filter_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/filter/mathjaxloader/filter.php'); * @copyright 2017 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { /** * Test the functionality of {@link filter_mathjaxloader::map_language_code()}. diff --git a/filter/mathjaxloader/tests/filtermath_test.php b/filter/mathjaxloader/tests/filtermath_test.php index 7a82749a3c4..0bb56e171ce 100644 --- a/filter/mathjaxloader/tests/filtermath_test.php +++ b/filter/mathjaxloader/tests/filtermath_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/filter/mathjaxloader/filter.php'); * @copyright 2018 Markku Riekkinen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filtermath_test extends \advanced_testcase { +final class filtermath_test extends \advanced_testcase { /** * Test the functionality of {@link filter_mathjaxloader::filter()}. diff --git a/filter/mediaplugin/tests/filter_test.php b/filter/mediaplugin/tests/filter_test.php index 1987495fe1b..aca694d357d 100644 --- a/filter/mediaplugin/tests/filter_test.php +++ b/filter/mediaplugin/tests/filter_test.php @@ -33,7 +33,7 @@ global $CFG; require_once($CFG->dirroot . '/filter/mediaplugin/filter.php'); // Include the code to test -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { function test_filter_mediaplugin_link(): void { $this->resetAfterTest(true); diff --git a/filter/tests/external/external_test.php b/filter/tests/external/external_test.php index f2be4520444..41abb28ea84 100644 --- a/filter/tests/external/external_test.php +++ b/filter/tests/external/external_test.php @@ -45,7 +45,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.4 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * Test get_available_in_context_system diff --git a/filter/tex/tests/filter_test.php b/filter/tex/tests/filter_test.php index 1244326660d..c25f0dbe2de 100644 --- a/filter/tex/tests/filter_test.php +++ b/filter/tex/tests/filter_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/filter/tex/filter.php'); * @copyright 2014 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { protected $filter; diff --git a/filter/tex/tests/lib_test.php b/filter/tex/tests/lib_test.php index cc05ad521d6..aec7c8645c5 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 79bba738649..af18d66aabe 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 d01fb7a3299..015fab0dfd1 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 f2f9a18b673..55206db8907 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 9c8f909088d..3cd5ec8b6f9 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 42468f7c99e..e97cdbea5a9 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,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 { /** * Ensure that an execute with an invalid component is rejected. */ 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 54b84a2fb55..fe4f90b2724 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,7 +33,7 @@ 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 { /** * Ensure that an execute with an invalid component is rejected. */ diff --git a/grade/grading/form/guide/tests/guide_test.php b/grade/grading/form/guide/tests/guide_test.php index 6a1bc12ae6a..8ed93d4246f 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 b011afc7111..bae63d6d609 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 491b91ea9e9..dffc2b1890f 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,7 +34,7 @@ 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 { /** * Ensure that an execute with an invalid component is rejected. */ 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 aa0c4134c5f..eb6d746c493 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,7 +33,7 @@ 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 { /** * Ensure that an execute with an invalid component is rejected. */ diff --git a/grade/grading/form/rubric/tests/privacy/provider_test.php b/grade/grading/form/rubric/tests/privacy/provider_test.php index 258888c0a8c..ad5725d3e6d 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 54b629ddb0d..d0fa2613bbf 100644 --- a/grade/grading/tests/grading_manager_test.php +++ b/grade/grading/tests/grading_manager_test.php @@ -31,7 +31,7 @@ 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 { +final class grading_manager_test extends \advanced_testcase { public function test_basic_instantiation(): void { $manager1 = get_grading_manager(); diff --git a/grade/grading/tests/privacy/legacy_polyfill_test.php b/grade/grading/tests/privacy/legacy_polyfill_test.php index 8189743c894..b6d4faa3ce9 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 7319f40a85f..d786683f228 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 2a4cb75d094..c22313ee10f 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 d6351087a56..726d8afc074 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 25329ad34f4..0e74ecf1434 100644 --- a/grade/report/overview/tests/externallib_test.php +++ b/grade/report/overview/tests/externallib_test.php @@ -34,7 +34,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 { /** @var \stdClass Course 1 record. */ protected $course1; diff --git a/grade/report/overview/tests/lib_test.php b/grade/report/overview/tests/lib_test.php index f607dc6d4fc..0acdf807fdc 100644 --- a/grade/report/overview/tests/lib_test.php +++ b/grade/report/overview/tests/lib_test.php @@ -24,7 +24,7 @@ namespace gradereport_overview; * @covers \grade_report_overview * @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 { /** * Require the library file we're about to test, and other requirements. diff --git a/grade/report/singleview/tests/screen_test.php b/grade/report/singleview/tests/screen_test.php index c337efa584a..d45dc5386a6 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 791f2777d50..6c71f52f376 100644 --- a/grade/report/user/tests/externallib_test.php +++ b/grade/report/user/tests/externallib_test.php @@ -34,7 +34,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 c24090a0ba0..20a356a40af 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 a159121a7a4..ca8b9a6756d 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 9eb34f84279..3a0d0de2191 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 54ae8231ea4..64c17e221aa 100644 --- a/grade/tests/edittreelib_test.php +++ b/grade/tests/edittreelib_test.php @@ -32,7 +32,7 @@ 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 { +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); diff --git a/grade/tests/event/events_test.php b/grade/tests/event/events_test.php index 921c55ca569..5cd44c29347 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 7ca3ff2c01d..143702b6918 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 65192ec9ee2..75c330b8a30 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_feedback_test.php b/grade/tests/external/get_feedback_test.php index cf69993a76b..d0d8d6ed832 100644 --- a/grade/tests/external/get_feedback_test.php +++ b/grade/tests/external/get_feedback_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 4.2 */ -class get_feedback_test extends \externallib_advanced_testcase { +final class get_feedback_test extends \externallib_advanced_testcase { /** * Test get_feedback. diff --git a/grade/tests/external/get_gradable_users_test.php b/grade/tests/external/get_gradable_users_test.php index 7b76c5127a8..4a51f33c320 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/external/get_grade_tree_test.php b/grade/tests/external/get_grade_tree_test.php index 8f6c4df7473..ba9e2ae72aa 100644 --- a/grade/tests/external/get_grade_tree_test.php +++ b/grade/tests/external/get_grade_tree_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Mihail Geshoski * @covers \core_grades\external\get_grade_tree */ -class get_grade_tree_test extends \externallib_advanced_testcase { +final class get_grade_tree_test extends \externallib_advanced_testcase { /** * Test the return value of the external function. diff --git a/grade/tests/external/get_gradeitems_test.php b/grade/tests/external/get_gradeitems_test.php index 5f5d9a64b66..ad5f07a6fd0 100644 --- a/grade/tests/external/get_gradeitems_test.php +++ b/grade/tests/external/get_gradeitems_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Mathew May * @covers \core_grades\external\get_gradeitems */ -class get_gradeitems_test extends \externallib_advanced_testcase { +final class get_gradeitems_test extends \externallib_advanced_testcase { public function test_execute(): void { $this->resetAfterTest(); $this->setAdminUser(); 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 775432aee09..57fb7f96d0b 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 { /** * Ensure that an execute with an invalid component is rejected. 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 ceea1d288a5..eb9fdea8446 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 { /** * Ensure that an execute with an invalid component is rejected. 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 b66e9a5b5e0..8cdc70357db 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 { /** * Ensure that an execute with an invalid component is rejected. 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 6a0d91fec77..b7c1677cedf 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 { /** * Ensure that an execute with an invalid component is rejected. diff --git a/grade/tests/importlib_test.php b/grade/tests/importlib_test.php index f79f19be35b..2ea7cda8bb8 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 5a1ac50ebba..1933f9a942a 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 31ebd297dd0..2473027bf29 100644 --- a/grade/tests/privacy/provider_test.php +++ b/grade/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->libdir . '/gradelib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_grades\privacy\provider */ -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 19b106ab917..4bf61beac1a 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(): void { $this->resetAfterTest(true); diff --git a/grade/tests/report_graderlib_test.php b/grade/tests/report_graderlib_test.php index f4f31b452a4..3ab7fa6670b 100644 --- a/grade/tests/report_graderlib_test.php +++ b/grade/tests/report_graderlib_test.php @@ -35,7 +35,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 f9c85841e2d..c41ce9a488a 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 119cff1a535..0bcfdb69eb5 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/customfield/group_handler_test.php b/group/tests/customfield/group_handler_test.php index a9073168ddc..4a708b958f5 100644 --- a/group/tests/customfield/group_handler_test.php +++ b/group/tests/customfield/group_handler_test.php @@ -31,7 +31,7 @@ use core_customfield\field_controller; * @copyright 2023 Catalyst IT Pty Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class group_handler_test extends advanced_testcase { +final class group_handler_test extends advanced_testcase { /** * Test custom field handler. * @var group_handler diff --git a/group/tests/customfield/grouping_handler_test.php b/group/tests/customfield/grouping_handler_test.php index ca2b87a9bea..0d77d8b98c3 100644 --- a/group/tests/customfield/grouping_handler_test.php +++ b/group/tests/customfield/grouping_handler_test.php @@ -31,7 +31,7 @@ use core_customfield\field_controller; * @copyright 2023 Catalyst IT Pty Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grouping_handler_test extends advanced_testcase { +final class grouping_handler_test extends advanced_testcase { /** * Test custom field handler. * @var \core_customfield\handler diff --git a/group/tests/externallib_test.php b/group/tests/externallib_test.php index 550e4d1dc30..440799ec982 100644 --- a/group/tests/externallib_test.php +++ b/group/tests/externallib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/group/lib.php'); * @since Moodle 2.4 * @covers \core_group_external */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Create group custom field for testing. diff --git a/group/tests/lib_test.php b/group/tests/lib_test.php index 0fc33bae688..64f4f9a5f45 100644 --- a/group/tests/lib_test.php +++ b/group/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/lib/grouplib.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(): void { $this->resetAfterTest(); diff --git a/group/tests/privacy/provider_test.php b/group/tests/privacy/provider_test.php index eed514dbbd8..86c2c714b65 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 5e07464c208..262915a3176 100644 --- a/group/tests/reportbuilder/datasource/groups_test.php +++ b/group/tests/reportbuilder/datasource/groups_test.php @@ -36,7 +36,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 24ad1d71ca9..2daea8c4a38 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 b0aed637542..83e26c81bf4 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 5117a340334..71ee24f1050 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 47aeec1d832..1777779346c 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 878edafd4d0..49d8dfcf1e5 100644 --- a/h5p/tests/external/external_test.php +++ b/h5p/tests/external/external_test.php @@ -46,7 +46,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 4c08198030e..6773c01849a 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 7d39e7ba82c..632499c14b5 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 b33a5d6420f..26a938d0b4c 100644 --- a/h5p/tests/generator_test.php +++ b/h5p/tests/generator_test.php @@ -28,7 +28,7 @@ use core_h5p\local\library\autoloader; * @runTestsInSeparateProcesses * @covers \core_h5p_generator */ -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 d596b2fdeee..21f2535af0c 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 { /** @var core */ protected $core; diff --git a/h5p/tests/helper_test.php b/h5p/tests/helper_test.php index 01195194840..db428696979 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 696e15bfc48..ef915049bc7 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 68e9053f0f3..a1e4eae12be 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_mysqli_read_slave_test.php b/lib/dml/tests/dml_mysqli_read_slave_test.php index 681fca72d11..a7254b991d3 100644 --- a/lib/dml/tests/dml_mysqli_read_slave_test.php +++ b/lib/dml/tests/dml_mysqli_read_slave_test.php @@ -40,7 +40,7 @@ require_once(__DIR__.'/fixtures/read_slave_moodle_database_mock_mysqli.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mysqli_native_moodle_database */ -class dml_mysqli_read_slave_test extends \base_testcase { +final class dml_mysqli_read_slave_test extends \base_testcase { /** * Test readonly handle is not used for reading from special pg_*() call queries, * pg_try_advisory_lock and pg_advisory_unlock. 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_read_slave_test.php b/lib/dml/tests/dml_read_slave_test.php index 2394e07030c..d3a074ddb74 100644 --- a/lib/dml/tests/dml_read_slave_test.php +++ b/lib/dml/tests/dml_read_slave_test.php @@ -40,7 +40,7 @@ require_once(__DIR__.'/../../tests/fixtures/event_fixtures.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \moodle_read_slave_trait */ -class dml_read_slave_test extends \base_testcase { +final class dml_read_slave_test extends \base_testcase { /** @var float */ static private $dbreadonlylatency = 0.8; diff --git a/lib/dml/tests/dml_table_test.php b/lib/dml/tests/dml_table_test.php index 40c75b3f7c8..432db425fbe 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 e6e486236e4..d0db2b8a14a 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 * @covers \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/mysqli_native_moodle_database_test.php b/lib/dml/tests/mysqli_native_moodle_database_test.php index 565ee41c266..618846cb334 100644 --- a/lib/dml/tests/mysqli_native_moodle_database_test.php +++ b/lib/dml/tests/mysqli_native_moodle_database_test.php @@ -30,7 +30,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mysqli_native_moodle_database */ -class mysqli_native_moodle_database_test extends \advanced_testcase { +final class mysqli_native_moodle_database_test extends \advanced_testcase { /** * Set up. diff --git a/lib/dml/tests/pgsql_native_moodle_database_test.php b/lib/dml/tests/pgsql_native_moodle_database_test.php index 09e6030391d..2eeee15a167 100644 --- a/lib/dml/tests/pgsql_native_moodle_database_test.php +++ b/lib/dml/tests/pgsql_native_moodle_database_test.php @@ -39,7 +39,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \pgsql_native_moodle_database */ -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 80fbea5f94c..2eb9fef34eb 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 4c904acb760..550adff6334 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 e22b4ba65fd..61f7fa8207b 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 c6d4de68183..5c01ca5263b 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/editor/tiny/tests/plugininfo/tiny_test.php b/lib/editor/tiny/tests/plugininfo/tiny_test.php index 1334458d07a..02d473eb84a 100644 --- a/lib/editor/tiny/tests/plugininfo/tiny_test.php +++ b/lib/editor/tiny/tests/plugininfo/tiny_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tiny_test extends advanced_testcase { +final class tiny_test extends advanced_testcase { /** * Uninstall is allowed of TinyMCE plugins. * diff --git a/lib/external/tests/external_api_test.php b/lib/external/tests/external_api_test.php index 99fe0c9f955..fae189ba51f 100644 --- a/lib/external/tests/external_api_test.php +++ b/lib/external/tests/external_api_test.php @@ -25,7 +25,7 @@ namespace core_external; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_external\external_api */ -class external_api_test extends \advanced_testcase { +final class external_api_test extends \advanced_testcase { /** * Test the validate_parameters method. * diff --git a/lib/external/tests/external_externallib_test.php b/lib/external/tests/external_externallib_test.php index 027db14b531..2ceb755680c 100644 --- a/lib/external/tests/external_externallib_test.php +++ b/lib/external/tests/external_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 external_externallib_test extends externallib_advanced_testcase { +final class external_externallib_test extends externallib_advanced_testcase { /** * Test get_string diff --git a/lib/external/tests/external_files_test.php b/lib/external/tests/external_files_test.php index 4eb7dd5aa8d..24d59b5d510 100644 --- a/lib/external/tests/external_files_test.php +++ b/lib/external/tests/external_files_test.php @@ -25,7 +25,7 @@ namespace core_external; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_external\external_files */ -class external_files_test extends \advanced_testcase { +final class external_files_test extends \advanced_testcase { /** * Text external files structure. * diff --git a/lib/external/tests/external_settings_test.php b/lib/external/tests/external_settings_test.php index da184f77c2b..1a7f0b63a15 100644 --- a/lib/external/tests/external_settings_test.php +++ b/lib/external/tests/external_settings_test.php @@ -25,7 +25,7 @@ namespace core_external; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_external\external_settings */ -class external_settings_test extends \advanced_testcase { +final class external_settings_test extends \advanced_testcase { /** * Reset the singleton between tests. */ diff --git a/lib/external/tests/external_value_test.php b/lib/external/tests/external_value_test.php index e1014ba3278..110fa0d11c8 100644 --- a/lib/external/tests/external_value_test.php +++ b/lib/external/tests/external_value_test.php @@ -27,7 +27,7 @@ use advanced_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass external_value */ -class external_value_test extends advanced_testcase { +final class external_value_test extends advanced_testcase { /** * Data provider for the required param test. diff --git a/lib/external/tests/privacy/provider_test.php b/lib/external/tests/privacy/provider_test.php index 009e16f8616..6fff742a6a3 100644 --- a/lib/external/tests/privacy/provider_test.php +++ b/lib/external/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ use core_privacy\tests\provider_testcase; * @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/lib/external/tests/util_test.php b/lib/external/tests/util_test.php index 218a46b2912..50699b25b03 100644 --- a/lib/external/tests/util_test.php +++ b/lib/external/tests/util_test.php @@ -25,7 +25,7 @@ namespace core_external; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_external\util */ -class util_test extends \advanced_testcase { +final class util_test extends \advanced_testcase { /** @var \moodle_database The database connection */ protected $db; diff --git a/lib/filebrowser/tests/file_browser_test.php b/lib/filebrowser/tests/file_browser_test.php index 5044a810b46..92fcfb88ed4 100644 --- a/lib/filebrowser/tests/file_browser_test.php +++ b/lib/filebrowser/tests/file_browser_test.php @@ -29,7 +29,7 @@ use stdClass; * @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 fa1f8d4eed1..e61f60431f4 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 5bfe18fdf31..0f2e35de3e8 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 4091564f519..c9926ed9067 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 9dc662a16c9..6d6ef6795b7 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(): void { global $CFG; diff --git a/lib/filestorage/tests/stored_file_test.php b/lib/filestorage/tests/stored_file_test.php index bd07c47c283..ff2af34fb88 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 20dc7e3b811..c38e8156789 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 ca4eabec019..cbc0ee59c32 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 6ce54f0f268..9799675d33a 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 9bd3c074e8d..3ebbd14d9f7 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 af34f17cc1e..5583b6c3b6b 100644 --- a/lib/form/tests/dateselector_test.php +++ b/lib/form/tests/dateselector_test.php @@ -46,7 +46,7 @@ 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 { +final class dateselector_test extends \advanced_testcase { /** @var \MoodleQuickForm Keeps reference of dummy form object */ private $mform; /** @var array test fixtures */ diff --git a/lib/form/tests/datetimeselector_test.php b/lib/form/tests/datetimeselector_test.php index 235c43343c9..93e32092994 100644 --- a/lib/form/tests/datetimeselector_test.php +++ b/lib/form/tests/datetimeselector_test.php @@ -46,7 +46,7 @@ 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 { +final class datetimeselector_test extends \advanced_testcase { /** @var \MoodleQuickForm Keeps reference of dummy form object */ private $mform; /** @var array test fixtures */ diff --git a/lib/form/tests/duration_test.php b/lib/form/tests/duration_test.php index 155bfbc454e..e3e5a342a46 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 34f8ba7121e..3192d290b10 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 71e3cbde5b9..073be520a6f 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 0e3a934f618..85c46c8d6f6 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(): void { $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 73a32d98a35..6fd8faf2066 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(): void { $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 c3352022be8..c0fd18dc079 100644 --- a/lib/grade/tests/grade_item_test.php +++ b/lib/grade/tests/grade_item_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_item_test extends \grade_base_testcase { +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(); diff --git a/lib/grade/tests/grade_object_test.php b/lib/grade/tests/grade_object_test.php index 1d1cf58481e..d21807c9306 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(): void { // Simple ID lookup. diff --git a/lib/grade/tests/grade_outcome_test.php b/lib/grade/tests/grade_outcome_test.php index 63a4121a70b..f9a98c07d5c 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(): void { $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 2b2ea9513d5..a4228b7f759 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(): void { $this->sub_test_scale_construct(); diff --git a/lib/phpunit/tests/advanced_test.php b/lib/phpunit/tests/advanced_test.php index 179864489a8..1f7e44045c4 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 500ff3eb63b..0fdb19db168 100644 --- a/lib/phpunit/tests/basic_test.php +++ b/lib/phpunit/tests/basic_test.php @@ -26,7 +26,7 @@ use phpunit_util; * @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 de97805bfbb..0fe7f845ce0 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 c6f8d52d245..7951179a7e7 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 898c218d2e6..ca26d514c21 100644 --- a/lib/table/tests/external/dynamic/get_test.php +++ b/lib/table/tests/external/dynamic/get_test.php @@ -38,7 +38,7 @@ 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 { /** * Test execute invalid component format. */ 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 472cc273c95..d0de554669d 100644 --- a/lib/testing/tests/testing_generator_test.php +++ b/lib/testing/tests/testing_generator_test.php @@ -25,7 +25,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\testing_data_generator */ -class testing_generator_test extends \advanced_testcase { +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 59b233cce4a..c5b63539379 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 69b0c2a1938..e88c4355657 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 92215807c6f..596d91cb673 100644 --- a/lib/tests/accesslib_test.php +++ b/lib/tests/accesslib_test.php @@ -30,7 +30,7 @@ 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. diff --git a/lib/tests/adminlib_test.php b/lib/tests/adminlib_test.php index e9686746b2d..0dcbc523613 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 0f668268343..a2512e11ec5 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 bf04d5ddea8..74ffd3687f8 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 ad0d4db3346..1b99dbe0b30 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 45518fd3ee9..1e7e58c8e45 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 401d9f61b4f..ceb14ef9094 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 cb649428f1d..9f9039f7a17 100644 --- a/lib/tests/authlib_test.php +++ b/lib/tests/authlib_test.php @@ -25,7 +25,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 authlib_test extends \advanced_testcase { +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/aws/admin_settings_aws_region_test.php b/lib/tests/aws/admin_settings_aws_region_test.php index 0b562943511..c9c10eb691b 100644 --- a/lib/tests/aws/admin_settings_aws_region_test.php +++ b/lib/tests/aws/admin_settings_aws_region_test.php @@ -34,7 +34,7 @@ namespace core\aws; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\aws\admin_settings_aws_region */ -class admin_settings_aws_region_test extends \advanced_testcase { +final class admin_settings_aws_region_test extends \advanced_testcase { /** * Cleanup after all tests are executed. diff --git a/lib/tests/aws/aws_helper_test.php b/lib/tests/aws/aws_helper_test.php index 567eeb3b320..19228800568 100644 --- a/lib/tests/aws/aws_helper_test.php +++ b/lib/tests/aws/aws_helper_test.php @@ -35,7 +35,7 @@ namespace core\aws; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\aws\aws_helper */ -class aws_helper_test extends \advanced_testcase { +final class aws_helper_test extends \advanced_testcase { public function test_get_proxy_string(): void { global $CFG; diff --git a/lib/tests/behat_lib_test.php b/lib/tests/behat_lib_test.php index 29fecd9f6bd..096268b2906 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 548527189fb..1d82b715a40 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 297c23ced83..b10bba7694a 100644 --- a/lib/tests/check_test.php +++ b/lib/tests/check_test.php @@ -28,7 +28,7 @@ use core\check\security\passwordpolicy; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\check */ -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 22a71e0e708..398e2c3927e 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 14d0ddd9cc4..3b26efc1ef2 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 3428e9e7bc8..0991e6f0cfe 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 be76d9468c4..2a58cae8009 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(): void { global $CFG; diff --git a/lib/tests/configonlylib_test.php b/lib/tests/configonlylib_test.php index 956c2ce0d48..399f4b3c598 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 97e23f6c526..ecc7f27b989 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 4ca033e9e2b..f28f31ffb44 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 e440e315298..ae2bc1711e4 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 16a9f0f7875..506f6949f98 100644 --- a/lib/tests/context/block_test.php +++ b/lib/tests/context/block_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\block */ -class block_test extends \advanced_testcase { +final class block_test extends \advanced_testcase { /** * Tests legacy class name. * @covers \context_block diff --git a/lib/tests/context/course_test.php b/lib/tests/context/course_test.php index 6c4afd306fe..3ddc617b964 100644 --- a/lib/tests/context/course_test.php +++ b/lib/tests/context/course_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\course */ -class course_test extends \advanced_testcase { +final class course_test extends \advanced_testcase { /** * Tests legacy class. * @coversNothing diff --git a/lib/tests/context/coursecat_test.php b/lib/tests/context/coursecat_test.php index f5188741477..87420c9faac 100644 --- a/lib/tests/context/coursecat_test.php +++ b/lib/tests/context/coursecat_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\coursecat */ -class coursecat_test extends \advanced_testcase { +final class coursecat_test extends \advanced_testcase { /** * Tests legacy class name. * @coversNothing diff --git a/lib/tests/context/module_test.php b/lib/tests/context/module_test.php index 6aadffaa06b..66657ec78db 100644 --- a/lib/tests/context/module_test.php +++ b/lib/tests/context/module_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\module */ -class module_test extends \advanced_testcase { +final class module_test extends \advanced_testcase { /** * Tests legacy class. * @coversNothing diff --git a/lib/tests/context/system_test.php b/lib/tests/context/system_test.php index 790794d18f0..f8cbf0e332f 100644 --- a/lib/tests/context/system_test.php +++ b/lib/tests/context/system_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\system */ -class system_test extends \advanced_testcase { +final class system_test extends \advanced_testcase { /** * Tests legacy class. * @coversNothing diff --git a/lib/tests/context/user_test.php b/lib/tests/context/user_test.php index 2421c082bf5..ad7d7392049 100644 --- a/lib/tests/context/user_test.php +++ b/lib/tests/context/user_test.php @@ -28,7 +28,7 @@ use core\context, core\context_helper; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context\user */ -class user_test extends \advanced_testcase { +final class user_test extends \advanced_testcase { /** * Tests legacy class. * @coversNothing 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/context_helper_test.php b/lib/tests/context_helper_test.php index 465067aa698..1c0e87ff070 100644 --- a/lib/tests/context_helper_test.php +++ b/lib/tests/context_helper_test.php @@ -26,7 +26,7 @@ namespace core; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context_helper */ -class context_helper_test extends \advanced_testcase { +final class context_helper_test extends \advanced_testcase { /** * Tests covered method. * @covers ::parse_external_level diff --git a/lib/tests/context_test.php b/lib/tests/context_test.php index cda064c777a..02d4beedf2e 100644 --- a/lib/tests/context_test.php +++ b/lib/tests/context_test.php @@ -26,7 +26,7 @@ namespace core; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\context */ -class context_test extends \advanced_testcase { +final class context_test extends \advanced_testcase { /** * Tests legacy class name. * @coversNothing diff --git a/lib/tests/core_media_player_native_test.php b/lib/tests/core_media_player_native_test.php index 5841c4bbbfe..26167232984 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 f2d3bc09881..a80fba2da77 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/cron_test.php b/lib/tests/cron_test.php index cc2673da217..b9cc661a48c 100644 --- a/lib/tests/cron_test.php +++ b/lib/tests/cron_test.php @@ -24,7 +24,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\cron */ -class cron_test extends \advanced_testcase { +final class cron_test extends \advanced_testcase { /** * Reset relevant caches between tests. */ diff --git a/lib/tests/csslib_test.php b/lib/tests/csslib_test.php index 11c4b83dfd8..b881b42d86d 100644 --- a/lib/tests/csslib_test.php +++ b/lib/tests/csslib_test.php @@ -29,8 +29,7 @@ require_once($CFG->libdir . '/csslib.php'); * @copyright 2012 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class csslib_test extends \advanced_testcase { - +final class csslib_test extends \advanced_testcase { /** * Test that css_is_colour function throws an exception. */ diff --git a/lib/tests/csvclass_test.php b/lib/tests/csvclass_test.php index fc218d1d6ab..214ceace10b 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 84834b7536e..4c390778b44 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 9bdb8e38a2d..841eff45c61 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 19ef2c8bf0b..713680bebbb 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 bdf32f8f144..5e915fd3081 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(): void { $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 b0d9bcc6496..a934cbee57b 100644 --- a/lib/tests/date_legacy_test.php +++ b/lib/tests/date_legacy_test.php @@ -24,7 +24,7 @@ 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 { +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 fad7dc4bf69..ffd060e95e7 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/deprecation_test.php b/lib/tests/deprecation_test.php index bebad9ce3fc..5d68f7269a0 100644 --- a/lib/tests/deprecation_test.php +++ b/lib/tests/deprecation_test.php @@ -30,7 +30,7 @@ use core\attribute\deprecated_with_reference; * @covers \core\attribute\deprecated_with_reference * @covers \core\deprecation */ -class deprecation_test extends \advanced_testcase { +final class deprecation_test extends \advanced_testcase { /** * @dataProvider emit_provider */ diff --git a/lib/tests/di_test.php b/lib/tests/di_test.php index dfb79f0d006..b99707f5aeb 100644 --- a/lib/tests/di_test.php +++ b/lib/tests/di_test.php @@ -27,7 +27,7 @@ use Psr\Container\ContainerInterface; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\di */ -class di_test extends \advanced_testcase { +final class di_test extends \advanced_testcase { /** * Test that the get_container method returns the Container Instance and stores it statically. */ diff --git a/lib/tests/editorlib_test.php b/lib/tests/editorlib_test.php index 0a4584a1fde..20d56ee04a3 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 70ed0c82fd4..adee74572e0 100644 --- a/lib/tests/encryption_test.php +++ b/lib/tests/encryption_test.php @@ -26,7 +26,7 @@ use advanced_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\encryption */ -class encryption_test extends advanced_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 6b47fe16fcc..f105f658767 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 52e145f68ce..728491ee2ac 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 81cc9f36020..d804a377359 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 2379a8b81d6..cf6e2a18775 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 131fc4f735e..e62b4ed2889 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 8cdf1dff3f1..93f4e1947c2 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 b0964c5a41f..ed3961ce302 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 feb812890ab..e12066c431a 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/draft_file_added_test.php b/lib/tests/event/draft_file_added_test.php index b1b950ca06d..e01d03657b3 100644 --- a/lib/tests/event/draft_file_added_test.php +++ b/lib/tests/event/draft_file_added_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\event\draft_file_added */ -class draft_file_added_test extends \advanced_testcase { +final class draft_file_added_test extends \advanced_testcase { /** * Test draft file added event. */ diff --git a/lib/tests/event/draft_file_deleted_test.php b/lib/tests/event/draft_file_deleted_test.php index cab18b8e33b..54e83aa1d34 100644 --- a/lib/tests/event/draft_file_deleted_test.php +++ b/lib/tests/event/draft_file_deleted_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\event\draft_file_deleted */ -class draft_file_deleted_test extends \advanced_testcase { +final class draft_file_deleted_test extends \advanced_testcase { /** * Test draft file deleted event. */ diff --git a/lib/tests/event/events_test.php b/lib/tests/event/events_test.php index 089a4154217..496a19ae25a 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 a6e56c5abaf..bcd1f77590c 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 e3407c3b44e..c129dd57149 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 ac066d445b2..d0f52d7e800 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 b8bc3512094..7f2d35e59e2 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(): void { $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 ab0dbcb608c..65de3646a62 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 f19755a21e8..78506665e75 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 e835ad8a10c..446a8e248d2 100644 --- a/lib/tests/exporter_test.php +++ b/lib/tests/exporter_test.php @@ -38,7 +38,7 @@ use core_external\util; * @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/check/get_result_admintree_test.php b/lib/tests/external/check/get_result_admintree_test.php index 702e40acd40..82b589ad971 100644 --- a/lib/tests/external/check/get_result_admintree_test.php +++ b/lib/tests/external/check/get_result_admintree_test.php @@ -45,7 +45,7 @@ require_once($CFG->libdir . '/adminlib.php'); * @copyright Catalyst IT, 2023 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_result_admintree_test extends externallib_advanced_testcase { +final class get_result_admintree_test extends externallib_advanced_testcase { /** * Sets up admin tree for the given settings. diff --git a/lib/tests/external/dynamic_tabs_get_content_test.php b/lib/tests/external/dynamic_tabs_get_content_test.php index 5421b9d9a59..dd14d608677 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/moodlenet_auth_check_test.php b/lib/tests/external/moodlenet_auth_check_test.php index 01bea520ed0..0bb996238fe 100644 --- a/lib/tests/external/moodlenet_auth_check_test.php +++ b/lib/tests/external/moodlenet_auth_check_test.php @@ -36,7 +36,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\moodlenet_auth_check */ -class moodlenet_auth_check_test extends externallib_advanced_testcase { +final class moodlenet_auth_check_test extends externallib_advanced_testcase { /** * Test the behaviour of moodlenet_auth_check(). diff --git a/lib/tests/external/moodlenet_get_share_info_activity_test.php b/lib/tests/external/moodlenet_get_share_info_activity_test.php index 5ffc7de919c..e2c523f9e7d 100644 --- a/lib/tests/external/moodlenet_get_share_info_activity_test.php +++ b/lib/tests/external/moodlenet_get_share_info_activity_test.php @@ -36,7 +36,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\moodlenet_get_share_info_activity */ -class moodlenet_get_share_info_activity_test extends externallib_advanced_testcase { +final class moodlenet_get_share_info_activity_test extends externallib_advanced_testcase { /** * Test the behaviour of moodlenet_get_share_info_activity(). diff --git a/lib/tests/external/moodlenet_get_shared_course_info_test.php b/lib/tests/external/moodlenet_get_shared_course_info_test.php index 3f3dfcb2497..afc85f94a60 100644 --- a/lib/tests/external/moodlenet_get_shared_course_info_test.php +++ b/lib/tests/external/moodlenet_get_shared_course_info_test.php @@ -36,7 +36,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\moodlenet_get_shared_course_info */ -class moodlenet_get_shared_course_info_test extends externallib_advanced_testcase { +final class moodlenet_get_shared_course_info_test extends externallib_advanced_testcase { /** * Test the behaviour of moodlenet_get_shared_course_info(). diff --git a/lib/tests/external/moodlenet_send_activity_test.php b/lib/tests/external/moodlenet_send_activity_test.php index 57753e8425c..5f2b1049be3 100644 --- a/lib/tests/external/moodlenet_send_activity_test.php +++ b/lib/tests/external/moodlenet_send_activity_test.php @@ -36,7 +36,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\moodlenet_send_activity */ -class moodlenet_send_activity_test extends externallib_advanced_testcase { +final class moodlenet_send_activity_test extends externallib_advanced_testcase { /** * Test the behaviour of moodlenet_send_activity(). diff --git a/lib/tests/external/moodlenet_send_course_test.php b/lib/tests/external/moodlenet_send_course_test.php index ff622bf65cb..49adfa4f915 100644 --- a/lib/tests/external/moodlenet_send_course_test.php +++ b/lib/tests/external/moodlenet_send_course_test.php @@ -36,7 +36,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\moodlenet_send_course */ -class moodlenet_send_course_test extends externallib_advanced_testcase { +final class moodlenet_send_course_test extends externallib_advanced_testcase { /** * Test the behaviour of moodlenet_send_course(). 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 a0916625f83..ee1e8d8bd52 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,7 +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 { /** * Ensure that a valid theme which uses fontawesome returns a map. * diff --git a/lib/tests/external/record_userfeedback_action_test.php b/lib/tests/external/record_userfeedback_action_test.php index cb6a9b2dc3d..47352f92ff9 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 8f32b7a94ec..4e7438080b9 100644 --- a/lib/tests/externallib_test.php +++ b/lib/tests/externallib_test.php @@ -43,7 +43,7 @@ class test_exernal_api extends \core_external\external_api { * @package core * @subpackage phpunit */ -class core_externallib_test extends \advanced_testcase { +final class core_externallib_test extends \advanced_testcase { /** * Test the get_context_wrapper helper. * diff --git a/lib/tests/filelib_test.php b/lib/tests/filelib_test.php index ff7fdf3256f..171d11c8fe3 100644 --- a/lib/tests/filelib_test.php +++ b/lib/tests/filelib_test.php @@ -43,7 +43,7 @@ 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 { +final class filelib_test extends \advanced_testcase { public function test_format_postdata_for_curlcall(): void { // POST params with just simple types. diff --git a/lib/tests/filestorage_zip_archive_test.php b/lib/tests/filestorage_zip_archive_test.php index 6679cefa118..de017e6eafb 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 224caaccd62..373d1a44ba4 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(): void { $this->resetAfterTest(); diff --git a/lib/tests/filter_manager_test.php b/lib/tests/filter_manager_test.php index 96a098caebf..4796f779029 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 84232e27434..4cedb5e1368 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/formatting_test.php b/lib/tests/formatting_test.php index 7e971d105ed..fb47e1b85ac 100644 --- a/lib/tests/formatting_test.php +++ b/lib/tests/formatting_test.php @@ -25,7 +25,7 @@ namespace core; * @covers \core\formatting * @coversDefaultClass \core\formatting */ -class formatting_test extends \advanced_testcase { +final class formatting_test extends \advanced_testcase { /** * @covers ::format_string */ diff --git a/lib/tests/formslib_test.php b/lib/tests/formslib_test.php index d319dc7c1e2..fbe51513c37 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(): void { global $CFG; diff --git a/lib/tests/gdlib_test.php b/lib/tests/gdlib_test.php index da7d57bfedb..0953fd3b67d 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 e499c0d19e0..b4f0444445e 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(): void { global $CFG; diff --git a/lib/tests/gradelib_test.php b/lib/tests/gradelib_test.php index 53b5ede3a91..deb301ae048 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(): void { diff --git a/lib/tests/grades_external_test.php b/lib/tests/grades_external_test.php index 72b0787dc9c..aafdd16327d 100644 --- a/lib/tests/grades_external_test.php +++ b/lib/tests/grades_external_test.php @@ -35,7 +35,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 3c455dafd00..be4ee2b2675 100644 --- a/lib/tests/grading_external_test.php +++ b/lib/tests/grading_external_test.php @@ -33,7 +33,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 0750175b2f9..d643c6e4449 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 b76bf7f9e38..261df0bf51a 100644 --- a/lib/tests/grouplib_test.php +++ b/lib/tests/grouplib_test.php @@ -26,7 +26,7 @@ use core_group\visibility; * @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(): void { $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 59420aaa56d..066d423e140 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/hook/navigation/primary_extend_test.php b/lib/tests/hook/navigation/primary_extend_test.php index 8ceaf7c1dd4..fc432303b77 100644 --- a/lib/tests/hook/navigation/primary_extend_test.php +++ b/lib/tests/hook/navigation/primary_extend_test.php @@ -26,7 +26,7 @@ namespace core\hook\navigation; * @copyright 2023 Open LMS * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class primary_extend_test extends \advanced_testcase { +final class primary_extend_test extends \advanced_testcase { /** * Test stoppable_trait. * @covers ::stop_propagation diff --git a/lib/tests/html2text_test.php b/lib/tests/html2text_test.php index 51d462d5473..1c787168ed2 100644 --- a/lib/tests/html2text_test.php +++ b/lib/tests/html2text_test.php @@ -26,8 +26,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 html2text_test extends \basic_testcase { - +final class html2text_test extends \basic_testcase { /** * ALT as image replacements. */ diff --git a/lib/tests/html_writer_test.php b/lib/tests/html_writer_test.php index f40b823ee7b..e0a564f75f6 100644 --- a/lib/tests/html_writer_test.php +++ b/lib/tests/html_writer_test.php @@ -36,8 +36,7 @@ require_once($CFG->libdir . '/outputcomponents.php'); * @covers \html_writer * @coversDefaultClass \html_writer */ -class html_writer_test extends basic_testcase { - +final class html_writer_test extends basic_testcase { /** * @covers ::start_tag */ diff --git a/lib/tests/htmlpurifier_test.php b/lib/tests/htmlpurifier_test.php index 004614316c3..60cde533518 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/http_client_test.php b/lib/tests/http_client_test.php index 0a3884ffe6d..0812eceeca7 100644 --- a/lib/tests/http_client_test.php +++ b/lib/tests/http_client_test.php @@ -32,7 +32,7 @@ use GuzzleHttp\Psr7\Uri; * * @coversDefaultClass \core\http_client */ -class http_client_test extends \advanced_testcase { +final class http_client_test extends \advanced_testcase { /** * Read the object attributes and return the configs for test. diff --git a/lib/tests/hub/registration_test.php b/lib/tests/hub/registration_test.php index d0ab3885d8a..05900f7136c 100644 --- a/lib/tests/hub/registration_test.php +++ b/lib/tests/hub/registration_test.php @@ -24,7 +24,7 @@ namespace core\hub; * @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 { /** * Test getting site registration information. diff --git a/lib/tests/ip_utils_test.php b/lib/tests/ip_utils_test.php index ac7a89592ab..d3fceee8c91 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 b13fc495170..bf28b4ac982 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(): void { global $CFG; diff --git a/lib/tests/ldaplib_test.php b/lib/tests/ldaplib_test.php index 4bcd4a65cb7..7171e3d3974 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(): void { // 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 c374549a392..7c68bff9e3e 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 f1918bff302..f6125457cb4 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 b0c1ac68963..4a57122a699 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 835734aa429..0e2eed79e4b 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 5e3c053c2c4..379077fab63 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(): void { $text = "one\n\ntwo"; diff --git a/lib/tests/mathslib_test.php b/lib/tests/mathslib_test.php index 3cecccd7d77..8ff4ed16c9c 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 065e2ba3ca8..756966f9b60 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 9361f9b1994..40290cf067d 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 62db8e9c5c0..cbb9126e006 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(): void { $this->resetAfterTest(); diff --git a/lib/tests/minify_test.php b/lib/tests/minify_test.php index 7232fd3c405..6dd5ac19965 100644 --- a/lib/tests/minify_test.php +++ b/lib/tests/minify_test.php @@ -28,7 +28,7 @@ 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 { +final class minify_test extends \advanced_testcase { public function test_css(): void { $css = " body { diff --git a/lib/tests/modinfolib_test.php b/lib/tests/modinfolib_test.php index 5fda5de0803..53cb609a473 100644 --- a/lib/tests/modinfolib_test.php +++ b/lib/tests/modinfolib_test.php @@ -36,7 +36,7 @@ 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 { +final class modinfolib_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/lib/tests/moodle_page_test.php b/lib/tests/moodle_page_test.php index 277d00596bc..62af952a43a 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/moodlenet/activity_packager_test.php b/lib/tests/moodlenet/activity_packager_test.php index e290c6c8e6b..33c0983e584 100644 --- a/lib/tests/moodlenet/activity_packager_test.php +++ b/lib/tests/moodlenet/activity_packager_test.php @@ -26,7 +26,7 @@ use core\context\user; * @copyright 2023 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_packager_test extends \advanced_testcase { +final class activity_packager_test extends \advanced_testcase { /** * Test fetching and overriding a backup task setting. diff --git a/lib/tests/moodlenet/activity_sender_test.php b/lib/tests/moodlenet/activity_sender_test.php index e24bdf37b28..7dea40b07d5 100644 --- a/lib/tests/moodlenet/activity_sender_test.php +++ b/lib/tests/moodlenet/activity_sender_test.php @@ -37,7 +37,7 @@ use testing_data_generator; * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_sender_test extends \advanced_testcase { +final class activity_sender_test extends \advanced_testcase { /** @var testing_data_generator Data generator. */ private testing_data_generator $generator; diff --git a/lib/tests/moodlenet/course_packager_test.php b/lib/tests/moodlenet/course_packager_test.php index 96b1e9af1a4..8ed05953f95 100644 --- a/lib/tests/moodlenet/course_packager_test.php +++ b/lib/tests/moodlenet/course_packager_test.php @@ -26,7 +26,7 @@ use core\context\user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\moodlenet\course_packager */ -class course_packager_test extends \advanced_testcase { +final class course_packager_test extends \advanced_testcase { /** * Test fetching and overriding a backup task setting. diff --git a/lib/tests/moodlenet/course_partial_packager_test.php b/lib/tests/moodlenet/course_partial_packager_test.php index d94c42a71f5..b35ccb86ad7 100644 --- a/lib/tests/moodlenet/course_partial_packager_test.php +++ b/lib/tests/moodlenet/course_partial_packager_test.php @@ -26,7 +26,7 @@ use backup_activity_task; * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_partial_packager_test extends \advanced_testcase { +final class course_partial_packager_test extends \advanced_testcase { /** * Test fetching task settings. diff --git a/lib/tests/moodlenet/course_partial_sender_test.php b/lib/tests/moodlenet/course_partial_sender_test.php index 12b5dc915ab..d3047d992b3 100644 --- a/lib/tests/moodlenet/course_partial_sender_test.php +++ b/lib/tests/moodlenet/course_partial_sender_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/lib/tests/moodlenet/helpers.php'); * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_partial_sender_test extends \advanced_testcase { +final class course_partial_sender_test extends \advanced_testcase { /** @var testing_data_generator Data generator. */ private testing_data_generator $generator; diff --git a/lib/tests/moodlenet/course_sender_test.php b/lib/tests/moodlenet/course_sender_test.php index ec5d4a62011..b1d3e24caf0 100644 --- a/lib/tests/moodlenet/course_sender_test.php +++ b/lib/tests/moodlenet/course_sender_test.php @@ -37,7 +37,7 @@ use testing_data_generator; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\moodlenet\course_sender */ -class course_sender_test extends \advanced_testcase { +final class course_sender_test extends \advanced_testcase { /** @var testing_data_generator Data generator. */ private testing_data_generator $generator; diff --git a/lib/tests/moodlenet/share_recorder_test.php b/lib/tests/moodlenet/share_recorder_test.php index a1d0cf1fd66..53c3d6445dd 100644 --- a/lib/tests/moodlenet/share_recorder_test.php +++ b/lib/tests/moodlenet/share_recorder_test.php @@ -26,7 +26,7 @@ use core\moodlenet\share_recorder; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\moodlenet\share_recorder */ -class share_recorder_test extends \advanced_testcase { +final class share_recorder_test extends \advanced_testcase { /** * Test inserting and updating an activity share progress to MoodleNet. diff --git a/lib/tests/moodlenet/utilities_test.php b/lib/tests/moodlenet/utilities_test.php index 7e8615cd37b..a6510e978ec 100644 --- a/lib/tests/moodlenet/utilities_test.php +++ b/lib/tests/moodlenet/utilities_test.php @@ -28,7 +28,7 @@ use testing_data_generator; * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class utilities_test extends \advanced_testcase { +final class utilities_test extends \advanced_testcase { /** @var testing_data_generator Data generator. */ private testing_data_generator $generator; diff --git a/lib/tests/myprofilelib_test.php b/lib/tests/myprofilelib_test.php index 3d2631f28a8..fe872ca4929 100644 --- a/lib/tests/myprofilelib_test.php +++ b/lib/tests/myprofilelib_test.php @@ -23,7 +23,7 @@ namespace core; * @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 ee6d2f47119..6f876134fe5 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 5db7e0dbfc0..2498d8e705a 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 dc9089b9f2c..39f73584589 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 571d6e036b7..0c6f48ceb04 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 dddf7590e6c..79d82d75d20 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/discovery/auth_server_config_reader_test.php b/lib/tests/oauth2/discovery/auth_server_config_reader_test.php index 20937a3aec3..711de18b809 100644 --- a/lib/tests/oauth2/discovery/auth_server_config_reader_test.php +++ b/lib/tests/oauth2/discovery/auth_server_config_reader_test.php @@ -32,7 +32,7 @@ use Psr\Http\Message\ResponseInterface; * @copyright 2023 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class auth_server_config_reader_test extends \advanced_testcase { +final class auth_server_config_reader_test extends \advanced_testcase { /** * Test reading the config for an auth server. diff --git a/lib/tests/oauth2_test.php b/lib/tests/oauth2_test.php index 3d88ac136ab..695bd81ed1f 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 d06ed5e14ed..974a66eb161 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/choicelist_test.php b/lib/tests/output/choicelist_test.php index 3672aa80267..770cdff4e37 100644 --- a/lib/tests/output/choicelist_test.php +++ b/lib/tests/output/choicelist_test.php @@ -32,7 +32,7 @@ use advanced_testcase; * * @coversDefaultClass \core\output\choicelist */ -class choicelist_test extends advanced_testcase { +final class choicelist_test extends advanced_testcase { /** * Test for a choice without options. * diff --git a/lib/tests/output/icon_system_fontawesome_test.php b/lib/tests/output/icon_system_fontawesome_test.php index 1aeed075aa3..0ea025a1548 100644 --- a/lib/tests/output/icon_system_fontawesome_test.php +++ b/lib/tests/output/icon_system_fontawesome_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\icon_system_fontawesome */ -class icon_system_fontawesome_test extends \advanced_testcase { +final class icon_system_fontawesome_test extends \advanced_testcase { /** * Test that the specified icon has an SVG fallback. 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 51360fc1757..d85da0704e1 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 2d6c59fa01e..0abc30b9989 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 a7b8b814ded..6f49130a1b8 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 5213e032485..4a3085eb311 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 86f0c703af2..0e5f0dcf610 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 33ed5a2f908..ef7c8a7cb27 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 29a2df4a88e..1e243cff78f 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/outputcomponents_test.php b/lib/tests/outputcomponents_test.php index 5114f98ad3b..9e0cf3af746 100644 --- a/lib/tests/outputcomponents_test.php +++ b/lib/tests/outputcomponents_test.php @@ -40,8 +40,7 @@ require_once($CFG->libdir . '/outputcomponents.php'); * @copyright 2011 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class outputcomponents_test extends \advanced_testcase { - +final class outputcomponents_test extends \advanced_testcase { /** * Tests user_picture::fields. * diff --git a/lib/tests/outputfactories_test.php b/lib/tests/outputfactories_test.php index b0e17ba0333..a300ed2b0db 100644 --- a/lib/tests/outputfactories_test.php +++ b/lib/tests/outputfactories_test.php @@ -32,8 +32,7 @@ require_once($CFG->libdir . '/tests/fixtures/test_renderer_factory.php'); * @copyright 2014 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class outputfactories_test extends \advanced_testcase { - +final class outputfactories_test extends \advanced_testcase { public function test_nonautoloaded_classnames(): void { global $PAGE; $renderer = $PAGE->get_renderer('mod_assign'); diff --git a/lib/tests/outputrenderers_test.php b/lib/tests/outputrenderers_test.php index 9a58cf0deb5..51ba90eeaae 100644 --- a/lib/tests/outputrenderers_test.php +++ b/lib/tests/outputrenderers_test.php @@ -25,7 +25,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_renderer */ -class outputrenderers_test extends \advanced_testcase { +final class outputrenderers_test extends \advanced_testcase { /** * Test generated url from course image. * diff --git a/lib/tests/outputrequirementslib_test.php b/lib/tests/outputrequirementslib_test.php index f713acc11d6..22ec6e6eb89 100644 --- a/lib/tests/outputrequirementslib_test.php +++ b/lib/tests/outputrequirementslib_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/outputrequirementslib.php'); * @copyright 2012 Petr Škoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class outputrequirementslib_test extends \advanced_testcase { +final class outputrequirementslib_test extends \advanced_testcase { public function test_string_for_js(): void { $this->resetAfterTest(); diff --git a/lib/tests/param_test.php b/lib/tests/param_test.php index 0d82cfd4e84..933a64cc5fb 100644 --- a/lib/tests/param_test.php +++ b/lib/tests/param_test.php @@ -24,7 +24,7 @@ namespace core; * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\param */ -class param_test extends \advanced_testcase { +final class param_test extends \advanced_testcase { /** * Test that the Moodle `from_type` method provides canonicalised parameter values. * diff --git a/lib/tests/pdflib_test.php b/lib/tests/pdflib_test.php index 3f6eff168e6..fc8d3002581 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(): void { global $CFG; diff --git a/lib/tests/persistent_test.php b/lib/tests/persistent_test.php index b69e3d068fa..5cf804b4df4 100644 --- a/lib/tests/persistent_test.php +++ b/lib/tests/persistent_test.php @@ -30,7 +30,7 @@ use xmldb_table; * @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 8e0319ece07..7102d41ab2c 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 dc316606cd7..fd560548ed4 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/block_test.php b/lib/tests/plugininfo/block_test.php index 65353f3dc88..c1f3b1a8340 100644 --- a/lib/tests/plugininfo/block_test.php +++ b/lib/tests/plugininfo/block_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class block_test extends advanced_testcase { +final class block_test extends advanced_testcase { /** * Test the get_enabled_plugins method. 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/editor_test.php b/lib/tests/plugininfo/editor_test.php index 6b92a20cd3f..9459caf5387 100644 --- a/lib/tests/plugininfo/editor_test.php +++ b/lib/tests/plugininfo/editor_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class editor_test extends advanced_testcase { +final class editor_test extends advanced_testcase { /** * Test that editor::get_enabled_plugins() returns the correct list of enabled plugins. diff --git a/lib/tests/plugininfo/media_test.php b/lib/tests/plugininfo/media_test.php index c46a42cf550..fbc3bc2ef35 100644 --- a/lib/tests/plugininfo/media_test.php +++ b/lib/tests/plugininfo/media_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class media_test extends advanced_testcase { +final class media_test extends advanced_testcase { /** * Test the get_enabled_plugins method. diff --git a/lib/tests/plugininfo/mod_test.php b/lib/tests/plugininfo/mod_test.php index 4f83ea29dac..711259807cc 100644 --- a/lib/tests/plugininfo/mod_test.php +++ b/lib/tests/plugininfo/mod_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mod_test extends advanced_testcase { +final class mod_test extends advanced_testcase { public function test_get_enabled_plugins(): void { $this->resetAfterTest(); 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 f058bed165e..7dae04b4f5a 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(): void { $this->resetAfterTest(); diff --git a/lib/tests/privacy/provider_test.php b/lib/tests/privacy/provider_test.php index 18d1ab24fa7..6c6c784411e 100644 --- a/lib/tests/privacy/provider_test.php +++ b/lib/tests/privacy/provider_test.php @@ -30,7 +30,7 @@ use core\moodlenet\share_recorder; * @copyright 2023 David Woloszyn * @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 user context is returned if there is any user data for this user. diff --git a/lib/tests/progress_display_test.php b/lib/tests/progress_display_test.php index 0a42c5835d5..0591ede6a63 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 8235d37c980..6e3720f9fdf 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 4600de406c1..faf14e44614 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 e88275b9923..6be3916e4fe 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 986e7c11109..219bd22bf42 100644 --- a/lib/tests/regex_test.php +++ b/lib/tests/regex_test.php @@ -24,7 +24,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Petr Skoda */ -class regex_test extends \advanced_testcase { +final class regex_test extends \advanced_testcase { public function test_whitespace_replacement_with_u(): void { $unicode = "Теорія і практика використання системи управління навчанням Moo dleКиївський національний університет будівництва і архітектури, 21-22 тра diff --git a/lib/tests/report_helper_test.php b/lib/tests/report_helper_test.php index aaf00c7c0af..a9e8a1594bf 100644 --- a/lib/tests/report_helper_test.php +++ b/lib/tests/report_helper_test.php @@ -33,7 +33,7 @@ use core\report_helper; * * @covers \core\report_helper */ -class report_helper_test extends \advanced_testcase { +final class report_helper_test extends \advanced_testcase { /** @var int[] Array of created user ids */ protected array $userids; diff --git a/lib/tests/requirejs_test.php b/lib/tests/requirejs_test.php index 98d10fb7bb4..49d8152299d 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 77fd86a7589..2a8100b8b49 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 90ff4bb00ca..b431e041ba6 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 b2e23981665..2cf4c630051 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/session_manager_test.php b/lib/tests/session_manager_test.php index 4507aea3e6c..885e7ba2698 100644 --- a/lib/tests/session_manager_test.php +++ b/lib/tests/session_manager_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class session_manager_test extends \advanced_testcase { +final class session_manager_test extends \advanced_testcase { public function test_start(): void { $this->resetAfterTest(); // Session must be started only once... diff --git a/lib/tests/session_redis_cluster_test.php b/lib/tests/session_redis_cluster_test.php index 826160d0cfe..be7b20dd557 100644 --- a/lib/tests/session_redis_cluster_test.php +++ b/lib/tests/session_redis_cluster_test.php @@ -38,7 +38,7 @@ use RedisClusterException; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\session\redis */ -class session_redis_cluster_test extends \advanced_testcase { +final class session_redis_cluster_test extends \advanced_testcase { /** * Set up the test environment. diff --git a/lib/tests/session_redis_test.php b/lib/tests/session_redis_test.php index 1e7458656e3..917b23ee733 100644 --- a/lib/tests/session_redis_test.php +++ b/lib/tests/session_redis_test.php @@ -35,8 +35,7 @@ use RedisException; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @runClassInSeparateProcess */ -class session_redis_test extends \advanced_testcase { - +final class session_redis_test extends \advanced_testcase { /** @var $keyprefix This key prefix used when testing Redis */ protected $keyprefix = null; /** @var $redis The current testing redis connection */ diff --git a/lib/tests/sessionlib_test.php b/lib/tests/sessionlib_test.php index 0ddee1c6c46..75324deb115 100644 --- a/lib/tests/sessionlib_test.php +++ b/lib/tests/sessionlib_test.php @@ -25,7 +25,7 @@ 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 diff --git a/lib/tests/setuplib_test.php b/lib/tests/setuplib_test.php index 4b98d6bd05e..0d388efbde5 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 7cb1e639e83..a2bd2ee82ea 100644 --- a/lib/tests/statslib_test.php +++ b/lib/tests/statslib_test.php @@ -31,7 +31,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 949a3c6737b..61a58442fcf 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(): void { $this->resetAfterTest(); diff --git a/lib/tests/tablelib_test.php b/lib/tests/tablelib_test.php index d7827852ba1..24cce59fb1a 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/automated_backup_task_test.php b/lib/tests/task/automated_backup_task_test.php index acef35a825b..48f7e3deac2 100644 --- a/lib/tests/task/automated_backup_task_test.php +++ b/lib/tests/task/automated_backup_task_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/backup/util/helper/backup_cron_helper.class.php') * @copyright 2024 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class automated_backup_task_test extends \advanced_testcase { +final class automated_backup_task_test extends \advanced_testcase { use task_trait; diff --git a/lib/tests/task/calendar_cron_task_test.php b/lib/tests/task/calendar_cron_task_test.php index 115a341bc38..581ba09e984 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 6c34e16e0a5..de997e6b628 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 266a467c6f3..4bc3d69fa0d 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/hide_ended_courses_task_test.php b/lib/tests/task/hide_ended_courses_task_test.php index fb98677a792..81c91796826 100644 --- a/lib/tests/task/hide_ended_courses_task_test.php +++ b/lib/tests/task/hide_ended_courses_task_test.php @@ -16,9 +16,7 @@ namespace core\task; -defined('MOODLE_INTERNAL') || die; - -require_once(__DIR__ . '/show_started_courses_task_test.php'); +use core\tests\courses_tasks_testcase; /** * Class containing unit tests for the hide ended courses task. @@ -30,7 +28,7 @@ require_once(__DIR__ . '/show_started_courses_task_test.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\task\hide_ended_courses_task */ -class hide_ended_courses_task_test extends \core\task\show_started_courses_task_test { +final class hide_ended_courses_task_test extends courses_tasks_testcase { /** * Test hide_ended_courses cron task. * diff --git a/lib/tests/task/logging_test.php b/lib/tests/task/logging_test.php index 4116c8ce9ef..d7a8f5df203 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 acc00f5fefc..38ddabfc9e4 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 ed9b85e22a0..a43c7769e75 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 { /** * Test new login notification. diff --git a/lib/tests/task/show_started_courses_task_test.php b/lib/tests/task/show_started_courses_task_test.php index d5ab8654f12..168e1772aeb 100644 --- a/lib/tests/task/show_started_courses_task_test.php +++ b/lib/tests/task/show_started_courses_task_test.php @@ -16,7 +16,7 @@ namespace core\task; -use advanced_testcase; +use core\tests\courses_tasks_testcase; /** * Class containing unit tests for the show started courses task. @@ -28,8 +28,7 @@ use advanced_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\task\show_started_courses_task */ -class show_started_courses_task_test extends advanced_testcase { - +final class show_started_courses_task_test extends courses_tasks_testcase { /** * Test show_started_courses cron task. * @@ -110,57 +109,4 @@ class show_started_courses_task_test extends advanced_testcase { $this->assertArrayHasKey($event->courseid, array_flip($expected)); } } - - /** - * 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/text_test.php b/lib/tests/text_test.php index e632d11f0e0..588eaf284d5 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 c5c771f529e..831518748d0 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 f665942c322..781d613c469 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 f7df7702eeb..915f1847c23 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(): void { $provider = testable_checker::instance(); diff --git a/lib/tests/update_code_manager_test.php b/lib/tests/update_code_manager_test.php index c223322037b..c16e9120229 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(): void { $codeman = new \core\update\testable_code_manager(); diff --git a/lib/tests/update_validator_test.php b/lib/tests/update_validator_test.php index 68b388e13a3..c9d3da4d04a 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(): void { $fixtures = __DIR__.'/fixtures/update_validator'; diff --git a/lib/tests/upgrade_util_test.php b/lib/tests/upgrade_util_test.php index 8a6209d85cd..66ef9020e12 100644 --- a/lib/tests/upgrade_util_test.php +++ b/lib/tests/upgrade_util_test.php @@ -23,7 +23,7 @@ namespace core; * @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 0ee9131fd2a..05d20797e06 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 9225a5312be..6b7fc8ca22f 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 8d151974171..980eebd38c4 100644 --- a/lib/tests/user_test.php +++ b/lib/tests/user_test.php @@ -24,7 +24,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 e09eacb92be..e98b7f5cb5b 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 7df0a021054..ff402900533 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(): void { $this->resetAfterTest(); diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php index d16c181533a..cd4d40e3a14 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 ::s */ diff --git a/lib/tests/xhprof_test.php b/lib/tests/xhprof_test.php index 527b1c4a354..d3212b1e727 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/xhtml_container_stack_test.php b/lib/tests/xhtml_container_stack_test.php index 4827ba34407..47cabf70824 100644 --- a/lib/tests/xhtml_container_stack_test.php +++ b/lib/tests/xhtml_container_stack_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/outputlib.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xhtml_container_stack_test extends \advanced_testcase { +final class xhtml_container_stack_test extends \advanced_testcase { public function test_push_then_pop(): void { // Set up. $stack = new xhtml_container_stack(); diff --git a/lib/tests/xmlize_test.php b/lib/tests/xmlize_test.php index 980f141bbff..7d488b25abc 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 8fc64967bc3..ff26d28ff0b 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/api_test.php b/lib/xapi/tests/api_test.php index dd6848f55a0..f46ca668b82 100644 --- a/lib/xapi/tests/api_test.php +++ b/lib/xapi/tests/api_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2023 Sara Arjona (sara@moodle.com) * @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 { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/delete_state_test.php b/lib/xapi/tests/external/delete_state_test.php index 090598c71d5..3d9708275dc 100644 --- a/lib/xapi/tests/external/delete_state_test.php +++ b/lib/xapi/tests/external/delete_state_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_state_test extends externallib_advanced_testcase { +final class delete_state_test extends externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/delete_states_test.php b/lib/xapi/tests/external/delete_states_test.php index 8de52656638..0710ddef8a6 100644 --- a/lib/xapi/tests/external/delete_states_test.php +++ b/lib/xapi/tests/external/delete_states_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class delete_states_test extends externallib_advanced_testcase { +final class delete_states_test extends externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/get_state_test.php b/lib/xapi/tests/external/get_state_test.php index 7774c24c63c..4d4df5c2214 100644 --- a/lib/xapi/tests/external/get_state_test.php +++ b/lib/xapi/tests/external/get_state_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_state_test extends externallib_advanced_testcase { +final class get_state_test extends externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/get_states_test.php b/lib/xapi/tests/external/get_states_test.php index 4d902c8ef90..a8ccef49e2b 100644 --- a/lib/xapi/tests/external/get_states_test.php +++ b/lib/xapi/tests/external/get_states_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class get_states_test extends externallib_advanced_testcase { +final class get_states_test extends externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/post_state_test.php b/lib/xapi/tests/external/post_state_test.php index 6255a1043aa..faf1d601710 100644 --- a/lib/xapi/tests/external/post_state_test.php +++ b/lib/xapi/tests/external/post_state_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2023 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class post_state_test extends externallib_advanced_testcase { +final class post_state_test extends externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/external/post_statement_test.php b/lib/xapi/tests/external/post_statement_test.php index 828a1520ac6..6975d72adb0 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 5a68016f554..d15853877f4 100644 --- a/lib/xapi/tests/handler_test.php +++ b/lib/xapi/tests/handler_test.php @@ -34,7 +34,7 @@ use stdClass; * @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 b77e368fe3b..90a28093dd1 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 97dd7b15591..dc84c9914b3 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 dd950c7cac2..0869ea6ea3f 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 7bd95615027..22909ece67f 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 3483a303e95..ebce84a1e85 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 450bff6427e..e19a2ff5b5f 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 fd47fbc9b23..c563e166669 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/lib/xapi/tests/privacy/provider_test.php b/lib/xapi/tests/privacy/provider_test.php index 73e79b81de4..3216f913c43 100644 --- a/lib/xapi/tests/privacy/provider_test.php +++ b/lib/xapi/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ use core_xapi\test_helper; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_xapi\privacy\provider */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/state_store_test.php b/lib/xapi/tests/state_store_test.php index 353206a92e8..cf8ba319292 100644 --- a/lib/xapi/tests/state_store_test.php +++ b/lib/xapi/tests/state_store_test.php @@ -29,7 +29,7 @@ use advanced_testcase; * @copyright 2023 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class state_store_test extends advanced_testcase { +final class state_store_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/task/state_cleanup_task_test.php b/lib/xapi/tests/task/state_cleanup_task_test.php index 40f9653146e..3450481a6cd 100644 --- a/lib/xapi/tests/task/state_cleanup_task_test.php +++ b/lib/xapi/tests/task/state_cleanup_task_test.php @@ -29,7 +29,7 @@ use core_xapi\test_helper; * @copyright 2023 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class state_cleanup_task_test extends advanced_testcase { +final class state_cleanup_task_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/login/tests/login_lib_test.php b/login/tests/login_lib_test.php index 30659890985..7aae37ddc4c 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(): void { global $CFG; diff --git a/media/player/html5audio/tests/player_test.php b/media/player/html5audio/tests/player_test.php index 2650ab06905..f923dcb4eb1 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 98ee415ca84..7fdaf0617ef 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 14cdc735e69..4f0d81eb931 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 0e516af686a..52ee30cd918 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 ba34ab67fbd..3f4ee1b5c5a 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 17d59baa39e..6ad785f4075 100644 --- a/message/output/airnotifier/tests/externallib_test.php +++ b/message/output/airnotifier/tests/externallib_test.php @@ -34,7 +34,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 1f0aefa7f90..c359eac1a03 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(): void { diff --git a/message/output/airnotifier/tests/privacy/provider_test.php b/message/output/airnotifier/tests/privacy/provider_test.php index 84f8dc5476e..dd298bb0219 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 04e4d56b661..b7feae775a3 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 3665e61ab50..f437bf1b4fb 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 e0bd4a58972..78b1d5e1da7 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 4cdf66523aa..0decb842ce0 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; /** @var \phpunit_message_sink message redirection. */ diff --git a/message/output/popup/tests/externallib_test.php b/message/output/popup/tests/externallib_test.php index e92a9274924..f801bdb2876 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; /** @var \phpunit_message_sink message redirection. */ diff --git a/message/output/popup/tests/messaging_cleanup_test.php b/message/output/popup/tests/messaging_cleanup_test.php index 84a325feabd..3ff1b5a4afe 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 c9dc9502d60..0af5f8038bc 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 69b487f284f..44b832f409e 100644 --- a/message/tests/externallib_test.php +++ b/message/tests/externallib_test.php @@ -36,7 +36,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 b68eee2546c..bd20c5ae896 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 1ad996f7619..8e3e67e13ce 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 8f8cb4a6a7d..47ebd4d8062 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 { /** * Setup. diff --git a/message/tests/search_received_test.php b/message/tests/search_received_test.php index eb62556a220..b12198a3d7c 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 c827254e2f5..6e43481ecd5 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 15c97791b4c..03f2c8b7306 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 dc0055bd075..5381d3fc76a 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 4cae715ee3a..7d60d01165b 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 8a2e3118659..762139b2f69 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 5b25fe811e9..6b550ef8d09 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 f577ff624ce..29993a214f3 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 fbd7bddbcee..b6ef289967c 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 003060d144b..9203759be42 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 bc235303086..12527c40ec8 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 0c8971798cd..433632ce986 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 16298747450..2a10b825f6b 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 ac131117f76..af92191ad67 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 8df174b322b..2ede40fe7d6 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 e5f5f7fab5c..a26dd1a4de3 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 dd97be97654..4f355f9fc65 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 3086d9bf001..c234f6779b6 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 7b0f0a58ee0..c14befc90f0 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 075e14143ba..a438e7a9890 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 e86739351b2..c91545b352c 100644 --- a/mod/assign/tests/base_test.php +++ b/mod/assign/tests/base_test.php @@ -32,7 +32,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 { /** @var 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 ab580126522..cef636a095d 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 34a54760558..30e9fff367f 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 5f35c1ed06d..b3d1225ead6 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 b7d0c78cb96..fea9bc048b5 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 682d7d22163..3bbe1947070 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 554b9ba8be9..879d7509417 100644 --- a/mod/assign/tests/externallib_test.php +++ b/mod/assign/tests/externallib_test.php @@ -39,7 +39,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 e6468fa99f4..0afe6c38768 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 a07412c540d..c7990b86de7 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 418681d71e0..38d784ac63a 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(): void { diff --git a/mod/assign/tests/markerallocation_test.php b/mod/assign/tests/markerallocation_test.php index 316191e97d3..f01100913bc 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 { /** @var \stdClass course record. */ private $course; diff --git a/mod/assign/tests/portfolio_caller_test.php b/mod/assign/tests/portfolio_caller_test.php index a15649f6f6a..2d47050cdc0 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 08a9e2b43ec..421305770e1 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 aad6642215f..9a17ed8dc5f 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 d23745a2afd..498d8814df0 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 bbe3818a896..83f85f747b3 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 5af29b6f38a..2d666fffe12 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 668726e14ee..b81cf4f63d9 100644 --- a/mod/bigbluebuttonbn/tests/completion/completion_test.php +++ b/mod/bigbluebuttonbn/tests/completion/completion_test.php @@ -32,7 +32,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 cb59a6fd65b..ef31c83d623 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 ffcb71cf3f5..817573d862a 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 eefd9367ac8..f979fe4aec4 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 a4dbd4d676d..2a8fc3980cf 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 07b2c96dcc6..97755c7d642 100644 --- a/mod/bigbluebuttonbn/tests/external/get_join_url_test.php +++ b/mod/bigbluebuttonbn/tests/external/get_join_url_test.php @@ -38,7 +38,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 0f54f61b997..ab43a12a56e 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 18926646be4..6fde2bd2735 100644 --- a/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_test.php +++ b/mod/bigbluebuttonbn/tests/external/view_bigbluebuttonbn_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\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 818757aadc2..143f63949b8 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 1fb00a50bd5..6318c2fef9b 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 1e2a5660dc1..ed17e583ed2 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/extension_test.php b/mod/bigbluebuttonbn/tests/local/extension_test.php index a58be2dd2ab..a90bae5d06c 100644 --- a/mod/bigbluebuttonbn/tests/local/extension_test.php +++ b/mod/bigbluebuttonbn/tests/local/extension_test.php @@ -36,7 +36,7 @@ use restore_dbops; * @author Laurent David (laurent@call-learning.fr) * @coversDefaultClass \mod_bigbluebuttonbn\extension */ -class extension_test extends \advanced_testcase { +final class extension_test extends \advanced_testcase { use subplugins_test_helper_trait; use testcase_helper_trait; diff --git a/mod/bigbluebuttonbn/tests/local/helpers/files_test.php b/mod/bigbluebuttonbn/tests/local/helpers/files_test.php index 6cb5e6d9955..00248edf390 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 3f19ed86271..82130f06568 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 f1e97387c6d..a2af246cbdf 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 2e4c751bb51..ea2fc16b6e8 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 6d024c7ee35..f775b994e9e 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 d88661bfb99..22393522ed2 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/proxy_base_test.php b/mod/bigbluebuttonbn/tests/local/proxy/proxy_base_test.php index 5620fb4ba9c..08a7aa8aa46 100644 --- a/mod/bigbluebuttonbn/tests/local/proxy/proxy_base_test.php +++ b/mod/bigbluebuttonbn/tests/local/proxy/proxy_base_test.php @@ -36,7 +36,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\proxy\proxy_base * @coversDefaultClass \mod_bigbluebuttonbn\local\proxy\proxy_base */ -class proxy_base_test extends \advanced_testcase { +final class proxy_base_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php b/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php index 829597a9146..0f2008de48e 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 e35b0e3fcfb..7717173a139 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 d9a6ac7ad92..0560e2d661c 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 f193723d74f..4de048f3ec5 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 177e618b3bb..395806c2fdc 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 76376115282..2e76c292f85 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 b1b3e454612..e0096a590a0 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 c21082a3835..742de3872da 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 { /** * Returns mock base_send_notification class 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_notification_test.php b/mod/bigbluebuttonbn/tests/task/send_notification_test.php index 7d9bf39b284..73453b0c683 100644 --- a/mod/bigbluebuttonbn/tests/task/send_notification_test.php +++ b/mod/bigbluebuttonbn/tests/task/send_notification_test.php @@ -27,7 +27,7 @@ use advanced_testcase; * @covers \mod_bigbluebuttonbn\task\send_notification * @coversDefaultClass \mod_bigbluebuttonbn\task\send_notification */ -class send_notification_test extends advanced_testcase { +final class send_notification_test extends advanced_testcase { /** * Test that the debug message is correctly output. * 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 82e652a9370..0fa067750fc 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 dfff2b98b5d..68a8a6a822d 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 2249d65f6c8..e56006c7656 100644 --- a/mod/book/tests/externallib_test.php +++ b/mod/book/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 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 8c4ff7ec304..82953d5144e 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(): void { global $DB; diff --git a/mod/book/tests/helper_test.php b/mod/book/tests/helper_test.php index 0ded36bb281..fa57e7a02f8 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 6c6558447c7..73b51540b50 100644 --- a/mod/book/tests/lib_test.php +++ b/mod/book/tests/lib_test.php @@ -39,7 +39,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 ebec89b43d3..748c711cf79 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 b164ee3df10..d9f34c480a4 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 cff080ecef6..8e114b749da 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 773b9f6adee..eea740f1ea7 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 91c0c5df1c7..dd6ab59bfed 100644 --- a/mod/chat/tests/backup/restore_date_test.php +++ b/mod/chat/tests/backup/restore_date_test.php @@ -30,7 +30,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(): void { global $DB; diff --git a/mod/chat/tests/event/events_test.php b/mod/chat/tests/event/events_test.php index f2cfa206b22..16f9aea3242 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 { /** * Setup testcase. diff --git a/mod/chat/tests/external/view_sessions_test.php b/mod/chat/tests/external/view_sessions_test.php index a791eeb11a6..2128bae4f50 100644 --- a/mod/chat/tests/external/view_sessions_test.php +++ b/mod/chat/tests/external/view_sessions_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @since Moodle 4.3 * @coversDefaultClass \mod_chat\external\view_sessions */ -class view_sessions_test extends externallib_advanced_testcase { +final class view_sessions_test extends externallib_advanced_testcase { /** * Prepare the test. diff --git a/mod/chat/tests/externallib_test.php b/mod/chat/tests/externallib_test.php index 628ba033c7d..879794f0eab 100644 --- a/mod/chat/tests/externallib_test.php +++ b/mod/chat/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 3.0 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Setup testcase. diff --git a/mod/chat/tests/format_message_test.php b/mod/chat/tests/format_message_test.php index 882ee8a6fbc..c3cbee9d8a4 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 ac98f8064d3..0a97d0d6242 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 { /** * Setup testcase. diff --git a/mod/chat/tests/lib_test.php b/mod/chat/tests/lib_test.php index 2e35498f50b..e119f773d5d 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 89506607844..d6304e2b520 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 407808e37c7..c3345f0efa0 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(): void { global $DB, $USER; diff --git a/mod/choice/tests/custom_completion_test.php b/mod/choice/tests/custom_completion_test.php index a8780f82bd1..f4fac94848e 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 dd3495ff18c..4122eddfe46 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 b2a2d815dca..08de9a5863b 100644 --- a/mod/choice/tests/externallib_test.php +++ b/mod/choice/tests/externallib_test.php @@ -35,7 +35,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 739a53af9a7..dc394a60499 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(): void { global $DB; diff --git a/mod/choice/tests/lib_test.php b/mod/choice/tests/lib_test.php index 9cd5eecf49f..a3dfe1ff3f3 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 79d8588a4b3..b824a8a7a8c 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 0645c9032f9..c31288916f3 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 a3a6e1fbd54..0bbdb4ad4cd 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 34136ccb843..68be9f72f90 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/entries_export_test.php b/mod/data/tests/entries_export_test.php index 84cda6b9d4b..bb7e323625a 100644 --- a/mod/data/tests/entries_export_test.php +++ b/mod/data/tests/entries_export_test.php @@ -29,7 +29,7 @@ use mod_data\local\exporter\utils; * @author Philipp Memmel * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entries_export_test extends \advanced_testcase { +final class entries_export_test extends \advanced_testcase { /** * Get the test data. diff --git a/mod/data/tests/entries_exporter_test.php b/mod/data/tests/entries_exporter_test.php index 7ae23c30f6c..eca8750d98b 100644 --- a/mod/data/tests/entries_exporter_test.php +++ b/mod/data/tests/entries_exporter_test.php @@ -33,7 +33,7 @@ use mod_data\local\exporter\utils; * @author Philipp Memmel * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entries_exporter_test extends \advanced_testcase { +final class entries_exporter_test extends \advanced_testcase { /** * Tests get_records_count method. diff --git a/mod/data/tests/entries_importer_test.php b/mod/data/tests/entries_importer_test.php index 30b63446723..5efa5ec4033 100644 --- a/mod/data/tests/entries_importer_test.php +++ b/mod/data/tests/entries_importer_test.php @@ -35,7 +35,7 @@ use zip_archive; * @author Philipp Memmel * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entries_importer_test extends \advanced_testcase { +final class entries_importer_test extends \advanced_testcase { /** * Set up function. diff --git a/mod/data/tests/event/events_test.php b/mod/data/tests/event/events_test.php index a9a621321de..1b411d783d3 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 299186f3b2a..3e99f47483d 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 bca3943dac3..031bbbf6259 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 5db85343821..6318c55e8bc 100644 --- a/mod/data/tests/externallib_test.php +++ b/mod/data/tests/externallib_test.php @@ -37,7 +37,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 279ab081dd8..2dd0b5039c1 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 39408bbcded..b2114545094 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 82d25d5b07a..cb1a8f0e291 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 a2fbb5f6082..4404f50b54f 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 6a4872fc2c1..acdbe5239f5 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 623b667ba09..0ae5951f6b7 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 6a43b4efcdf..5ffb06bd3be 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 7cd6c286eaa..ac9ecfe1347 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 b128bb94a57..956716fc83c 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(): void { global $DB, $USER; diff --git a/mod/feedback/tests/completion_test.php b/mod/feedback/tests/completion_test.php index fa4fef01234..00c9e702e3a 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 87aec3e8de9..7ac1acb323a 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 f7dbe5365d2..617ceafe16c 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 d4b850020e9..b3e1b757b9d 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 a86c099ec39..a227f459982 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 39b9c07d867..547696e50ae 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 d89c734a55c..ecadd8840cd 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(): void { global $DB; diff --git a/mod/feedback/tests/item_test.php b/mod/feedback/tests/item_test.php index 6be7eeb44aa..d9e7650ae86 100644 --- a/mod/feedback/tests/item_test.php +++ b/mod/feedback/tests/item_test.php @@ -27,7 +27,7 @@ use ReflectionClass; * @author 2023 David Woloszyn * @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 that get_analysed() for textarea item returns correctly formatted data for exporting to Excel. diff --git a/mod/feedback/tests/lib_test.php b/mod/feedback/tests/lib_test.php index 0656b3fc2f1..4303be3311b 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(): void { $this->resetAfterTest(); diff --git a/mod/feedback/tests/privacy/provider_test.php b/mod/feedback/tests/privacy/provider_test.php index 6406531320c..bf83ca3d3ec 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 763e91d6467..745069b4d64 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(): void { global $DB; diff --git a/mod/folder/tests/event/events_test.php b/mod/folder/tests/event/events_test.php index c3895ee478d..4d4e05101e4 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 abae3289795..0e55bd6be67 100644 --- a/mod/folder/tests/externallib_test.php +++ b/mod/folder/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 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 9e149aac507..63517428041 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(): void { global $DB, $USER; diff --git a/mod/folder/tests/lib_test.php b/mod/folder/tests/lib_test.php index 71ca05d5290..ca219c330fc 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 bb7bfd2c081..d7fdb0b77eb 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 9f7df533143..7a762498417 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 a7a96a82fd4..8d849718742 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 ad5876e6add..381ec207084 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 fd88c64363a..f2c3c71d76e 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 860278dd506..342f1b013db 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 eb7118c4cff..7dfa8d835d4 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 98434b0657e..7c0930f6033 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 21bbc6d64ca..b1ff5c740f7 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 3bad7d2b555..80351a84d1a 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 b5b1669fae3..a582a69d776 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 ec684aec6e2..2cd607f95b1 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 13f341b18df..3b1a8308458 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 62b4697fcf2..5692fce2016 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 7deb73afbb6..d192a97c714 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 9b7a3b58914..aa3ea57c364 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 cc8354ce9b5..050068252a8 100644 --- a/mod/forum/tests/exporters_discussion_test.php +++ b/mod/forum/tests/exporters_discussion_test.php @@ -26,7 +26,7 @@ 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; diff --git a/mod/forum/tests/exporters_forum_test.php b/mod/forum/tests/exporters_forum_test.php index 300be6d86c8..1b806a5a9e6 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 d97d3f034a2..920cf72d195 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 71a6fc82558..7b61ea30c5c 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 a5d824f249b..d193d0bcfa3 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 b8d54870cd8..cdbce396d42 100644 --- a/mod/forum/tests/locallib_test.php +++ b/mod/forum/tests/locallib_test.php @@ -36,7 +36,7 @@ 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 { +final class locallib_test extends \advanced_testcase { public function test_forum_update_calendar(): void { global $DB; diff --git a/mod/forum/tests/mail_group_test.php b/mod/forum/tests/mail_group_test.php index fc51d89d812..2ef67da6a21 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 fdea0c25cea..d38dbf41a8c 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 b60498b5510..0d0333a4be3 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 5d5c15bde39..44f34a508c7 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 81b0f482d7f..6d8aa7b9dd6 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 cb9ce6d2333..b4efa939ebf 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 11f18124b65..3237f12538b 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 ac320d90e1d..88feddd28c1 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 ff8ff6b6941..4d378c64aef 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 53a9fc8a455..e7acf8f080c 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 5c9678881b7..6f9975bc916 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 75e5a3191a4..645ce8d14aa 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 0b30eb170ec..2a782ed216d 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 4df2595b248..aa9b1f93dc3 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 3aa2a932b4e..ce293214ce1 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 e240764f6e6..4bc63e0f379 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 216aa62ca62..446f50bb7f5 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 10a2dab85a9..d05f2137d41 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 8ae46f0c4c4..004d039b3fa 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 3faf4e1f6cc..f13eba6d81c 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 61e8182c421..31af35ab1a0 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 8bb886566d3..fee59300180 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 22287ab82e8..b288aaa994b 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 cd6fc9d016c..092fcef8cc9 100644 --- a/mod/glossary/tests/external/external_test.php +++ b/mod/glossary/tests/external/external_test.php @@ -42,7 +42,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 5d11a56e812..7b85f687799 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(): void { global $DB; diff --git a/mod/glossary/tests/lib_test.php b/mod/glossary/tests/lib_test.php index 7085b87f95f..62a68f17305 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(): void { global $CFG; diff --git a/mod/glossary/tests/privacy/provider_test.php b/mod/glossary/tests/privacy/provider_test.php index bf9a25092a0..9c8030d9544 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 775570e0f40..b4f8038c02c 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 1217972417d..da5d7f9d265 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 589f465c95b..7e99669a1bc 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 5fc658c0357..fcb3d09cd46 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 fbd9eeee247..dadd4071ddc 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 a519e3a59ce..d9f22b44232 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 33908fccfa5..9d411fea7e5 100644 --- a/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php +++ b/mod/h5pactivity/tests/external/get_h5pactivities_by_courses_test.php @@ -43,7 +43,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 c172c343cf4..519fd47946b 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 315240d7f4d..a3ab69ef2e1 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 cfe51ba6dd1..1799af6de76 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 fb397e5a9b4..1272c005607 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 58495aee163..a110f26ec78 100644 --- a/mod/h5pactivity/tests/local/attempt_test.php +++ b/mod/h5pactivity/tests/local/attempt_test.php @@ -43,7 +43,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 a3929071577..9598223c409 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 f9781d576c4..794a2ea35f8 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 b33ee1fc1df..1de69263189 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 53a692a9f10..67f6c1e2b0f 100644 --- a/mod/h5pactivity/tests/privacy/provider_test.php +++ b/mod/h5pactivity/tests/privacy/provider_test.php @@ -42,7 +42,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_h5pactivity\privacy\provider */ -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 f3c23708ffe..90bf5ea59b7 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 0a9be9aa10d..ecf58b228aa 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(): void { global $DB; diff --git a/mod/imscp/tests/externallib_test.php b/mod/imscp/tests/externallib_test.php index c9fb88e4a83..9d684eced7c 100644 --- a/mod/imscp/tests/externallib_test.php +++ b/mod/imscp/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 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 ed8216e8e8c..f111ac27165 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(): void { global $DB, $CFG, $USER; diff --git a/mod/imscp/tests/lib_test.php b/mod/imscp/tests/lib_test.php index 037fd0c1708..38eed4010dd 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(): void { global $DB, $USER; diff --git a/mod/label/tests/externallib_test.php b/mod/label/tests/externallib_test.php index e11ced77528..77ca144bb2b 100644 --- a/mod/label/tests/externallib_test.php +++ b/mod/label/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 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 2d2da3a13d8..fdbc578928c 100644 --- a/mod/label/tests/generator_test.php +++ b/mod/label/tests/generator_test.php @@ -24,7 +24,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_generator(): void { global $DB; diff --git a/mod/label/tests/lib_test.php b/mod/label/tests/lib_test.php index 51a8d507a5c..b1091ef919e 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 56ec6e426ad..b629e7d65c0 100644 --- a/mod/lesson/tests/backup/restore_date_test.php +++ b/mod/lesson/tests/backup/restore_date_test.php @@ -30,7 +30,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 8923ed60b38..b62a40d7d91 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 df4574b384d..d94937a04d6 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 925da23cc8c..95fbafd5d79 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 92900b68129..b97fa699427 100644 --- a/mod/lesson/tests/external/external_test.php +++ b/mod/lesson/tests/external/external_test.php @@ -72,7 +72,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 { /** @var \stdClass course record. */ protected \stdClass $course; diff --git a/mod/lesson/tests/generator_test.php b/mod/lesson/tests/generator_test.php index 4d3e44b32fa..e7214f9c57c 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(): void { global $DB; diff --git a/mod/lesson/tests/lib_test.php b/mod/lesson/tests/lib_test.php index 0f6e6406fc6..2439886f7f3 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 5511209a9d2..ce8c3cbdd9f 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 e63028b34cc..b02b3330b4b 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 0737e06119f..3e131d3ae93 100644 --- a/mod/lesson/tests/pagetypes_test.php +++ b/mod/lesson/tests/pagetypes_test.php @@ -33,7 +33,7 @@ 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 { +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";' diff --git a/mod/lesson/tests/privacy/provider_test.php b/mod/lesson/tests/privacy/provider_test.php index 316572bab94..a143bd3e6bd 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 3e083f50ced..bc2a58d69fc 100644 --- a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php +++ b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php @@ -27,7 +27,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\gradebookservices */ -class gradebookservices_test extends \advanced_testcase { +final class gradebookservices_test extends \advanced_testcase { /** * Load the necessary libs for the tests. */ diff --git a/mod/lti/service/gradebookservices/tests/lineitem_test.php b/mod/lti/service/gradebookservices/tests/lineitem_test.php index 39fdfe966db..ad5f8be601d 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 2f88dfea624..9779dea8c84 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 306c06dce98..71949d05329 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 5fc31e51f58..d257a2ea107 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 ee59a91dbdf..e8b7792d505 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/delete_course_tool_type_test.php b/mod/lti/tests/external/delete_course_tool_type_test.php index da149f3ef50..011584748cc 100644 --- a/mod/lti/tests/external/delete_course_tool_type_test.php +++ b/mod/lti/tests/external/delete_course_tool_type_test.php @@ -32,7 +32,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 * @coversDefaultClass \mod_lti\external\delete_course_tool_type */ -class delete_course_tool_type_test extends \mod_lti_testcase { +final class delete_course_tool_type_test extends \mod_lti_testcase { /** * Test delete_course_tool() for a course tool. 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 0cc58f9a650..e186adb774f 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 @@ -32,7 +32,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 cca0c627cec..6af8f9ef9eb 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 @@ -32,7 +32,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/external/toggle_showinactivitychooser_test.php b/mod/lti/tests/external/toggle_showinactivitychooser_test.php index cd7f17eabcc..d78a81f7af0 100644 --- a/mod/lti/tests/external/toggle_showinactivitychooser_test.php +++ b/mod/lti/tests/external/toggle_showinactivitychooser_test.php @@ -32,7 +32,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 * @coversDefaultClass \mod_lti\external\toggle_showinactivitychooser */ -class toggle_showinactivitychooser_test extends \mod_lti_testcase { +final class toggle_showinactivitychooser_test extends \mod_lti_testcase { /** * Test toggle_showinactivitychooser for course tool. diff --git a/mod/lti/tests/externallib_test.php b/mod/lti/tests/externallib_test.php index 301c6d3b7fd..8dc5ff097ef 100644 --- a/mod/lti/tests/externallib_test.php +++ b/mod/lti/tests/externallib_test.php @@ -37,7 +37,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 417e27166d4..05a7b15b57b 100644 --- a/mod/lti/tests/generator_test.php +++ b/mod/lti/tests/generator_test.php @@ -25,7 +25,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_generator(): void { global $DB; diff --git a/mod/lti/tests/lib_test.php b/mod/lti/tests/lib_test.php index 9e2faab19a3..170b47c375b 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 d78eca8f1d6..aa28c93972d 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 0bde6c36bd8..8de595c27a1 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/local/types_helper_test.php b/mod/lti/tests/local/types_helper_test.php index 39ad9c8cc07..673f8267eb4 100644 --- a/mod/lti/tests/local/types_helper_test.php +++ b/mod/lti/tests/local/types_helper_test.php @@ -50,7 +50,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 * @coversDefaultClass \mod_lti\local\types_helper */ -class types_helper_test extends mod_lti_testcase { +final class types_helper_test extends mod_lti_testcase { /** * Test fetching tool types for a given course and user. diff --git a/mod/lti/tests/locallib_test.php b/mod/lti/tests/locallib_test.php index 048731ff1e6..30b48e630b9 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/mod_lti_edit_types_form_test.php b/mod/lti/tests/mod_lti_edit_types_form_test.php index 84e2672a913..75c80dd84df 100644 --- a/mod/lti/tests/mod_lti_edit_types_form_test.php +++ b/mod/lti/tests/mod_lti_edit_types_form_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/course_categories_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 4.3 */ -class mod_lti_edit_types_form_test extends \advanced_testcase { +final class mod_lti_edit_types_form_test extends \advanced_testcase { // There are shared helpers for these tests in the helper course_categories_trait. use \mod_lti_course_categories_trait; diff --git a/mod/lti/tests/privacy/provider_test.php b/mod/lti/tests/privacy/provider_test.php index 6418a54c97d..961e1a1756a 100644 --- a/mod/lti/tests/privacy/provider_test.php +++ b/mod/lti/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/mod/lti/locallib.php'); * @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 67dbc69f4df..1b61ba5ed4c 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 66cdebf366c..e498ac31e08 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 56396fca9d5..f535c8eebfe 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 287b6b833b7..d04e2e62746 100644 --- a/mod/page/tests/externallib_test.php +++ b/mod/page/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 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 8993dddfe57..64d7e781b36 100644 --- a/mod/page/tests/generator_test.php +++ b/mod/page/tests/generator_test.php @@ -24,7 +24,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_generator(): void { global $DB, $SITE; diff --git a/mod/page/tests/lib_test.php b/mod/page/tests/lib_test.php index 6d18025e5a3..a5f53ff8835 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 7c933d2c189..d8e0096d932 100644 --- a/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php @@ -33,7 +33,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_just_first_delay(): void { $quiz = new \stdClass(); $quiz->attempts = 3; diff --git a/mod/quiz/accessrule/ipaddress/tests/rule_test.php b/mod/quiz/accessrule/ipaddress/tests/rule_test.php index d8ba667e185..0757b525bf9 100644 --- a/mod/quiz/accessrule/ipaddress/tests/rule_test.php +++ b/mod/quiz/accessrule/ipaddress/tests/rule_test.php @@ -33,7 +33,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_ipaddress_access_rule(): void { $quiz = new \stdClass(); $attempt = new \stdClass(); diff --git a/mod/quiz/accessrule/numattempts/tests/rule_test.php b/mod/quiz/accessrule/numattempts/tests/rule_test.php index d73f83eeeff..786228ed402 100644 --- a/mod/quiz/accessrule/numattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/numattempts/tests/rule_test.php @@ -33,7 +33,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_num_attempts_access_rule(): void { $quiz = new \stdClass(); $quiz->attempts = 3; diff --git a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php index f7fcfddac19..29855d12b30 100644 --- a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php @@ -32,7 +32,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_offlineattempts_access_rule(): void { $quiz = new \stdClass(); $quiz->allowofflineattempts = 1; diff --git a/mod/quiz/accessrule/openclosedate/tests/rule_test.php b/mod/quiz/accessrule/openclosedate/tests/rule_test.php index fc59d6395fb..e9a938ea43c 100644 --- a/mod/quiz/accessrule/openclosedate/tests/rule_test.php +++ b/mod/quiz/accessrule/openclosedate/tests/rule_test.php @@ -33,7 +33,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_no_dates(): void { $quiz = new \stdClass(); $quiz->timeopen = 0; diff --git a/mod/quiz/accessrule/password/tests/rule_test.php b/mod/quiz/accessrule/password/tests/rule_test.php index a846d278b0c..53c422746e5 100644 --- a/mod/quiz/accessrule/password/tests/rule_test.php +++ b/mod/quiz/accessrule/password/tests/rule_test.php @@ -33,7 +33,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_password_access_rule(): void { $quiz = new \stdClass(); $quiz->password = 'frog'; diff --git a/mod/quiz/accessrule/seb/tests/access_manager_test.php b/mod/quiz/accessrule/seb/tests/access_manager_test.php index fd88a03525d..f3ba05c5e98 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\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 63cd799f63e..3c7ede6594b 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 df1d7fea828..1571e9aabc1 100644 --- a/mod/quiz/accessrule/seb/tests/config_key_test.php +++ b/mod/quiz/accessrule/seb/tests/config_key_test.php @@ -25,7 +25,7 @@ namespace quizaccess_seb; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quizaccess_seb\config_key */ -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 ef07a192635..a7d8e115c73 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 dacf5437cb5..bd895c75926 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 @@ -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\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 b1f83ead236..59c03f0d57d 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 5bbf37ebd6d..68beb05f9c2 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 e5174f9f930..6a16feeca03 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 63544b0ea38..09f79621da3 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 30e7d477418..01cbede6d90 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 42c1a2abd54..e7bedf38e3f 100644 --- a/mod/quiz/accessrule/seb/tests/quiz_settings_test.php +++ b/mod/quiz/accessrule/seb/tests/quiz_settings_test.php @@ -31,7 +31,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 6d964313be5..f4e34719ae1 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 9c810c1e548..b8f40e354a8 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 8caab59581c..aa9b75a6f46 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 cf64d339369..4199877a1f8 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 \mod_quiz\local\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(): void { $quiz = new \stdClass(); diff --git a/mod/quiz/accessrule/timelimit/tests/rule_test.php b/mod/quiz/accessrule/timelimit/tests/rule_test.php index 9ef00d1ebd2..0af5ca512df 100644 --- a/mod/quiz/accessrule/timelimit/tests/rule_test.php +++ b/mod/quiz/accessrule/timelimit/tests/rule_test.php @@ -32,7 +32,7 @@ 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 { +final class rule_test extends \basic_testcase { public function test_time_limit_access_rule(): void { $quiz = new \stdClass(); $quiz->timeclose = 0; diff --git a/mod/quiz/report/grading/tests/privacy/provider_test.php b/mod/quiz/report/grading/tests/privacy/provider_test.php index daf58549f3f..5470b67d38d 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 96f11b91706..806aa03f975 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 19ee23a8990..ee9f10113bb 100644 --- a/mod/quiz/report/overview/tests/report_test.php +++ b/mod/quiz/report/overview/tests/report_test.php @@ -44,7 +44,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 23c19cf5435..54d413eab85 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/quiz_attempt_deleted_test.php b/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php index 47fa441db1c..3fa3187dac3 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\hook_callbacks::quiz_attempt_submitted_or_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_attempt_submitted_test.php b/mod/quiz/report/statistics/tests/quiz_attempt_submitted_test.php index 8e8592c8529..a2933c36e46 100644 --- a/mod/quiz/report/statistics/tests/quiz_attempt_submitted_test.php +++ b/mod/quiz/report/statistics/tests/quiz_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\hook_callbacks::quiz_attempt_submitted_or_deleted */ -class quiz_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_statistics_report_test.php b/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php index 8e32faee8b2..21d7478914d 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 055a28a742f..3cf116f3daa 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 077809faf39..b79dd43b1e5 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(): void { $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 73ecb6e0a7b..d59d6812e29 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 d88d0d513f3..8a3695b30c4 100644 --- a/mod/quiz/tests/attempt_test.php +++ b/mod/quiz/tests/attempt_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz\quiz_attempt */ -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 d5e4120620b..d2f8f1385c5 100644 --- a/mod/quiz/tests/attempts_test.php +++ b/mod/quiz/tests/attempts_test.php @@ -35,7 +35,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 8f1a94b7078..cba06ab56af 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 6caf143da6b..2e060224ce5 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 56c5f437835..2ed22234418 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 51f0619e74c..5830a34af49 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 a13a48dbc39..485006b5d4f 100644 --- a/mod/quiz/tests/event/events_test.php +++ b/mod/quiz/tests/event/events_test.php @@ -37,7 +37,7 @@ use context_module; * @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 { /** * Set up a quiz. diff --git a/mod/quiz/tests/external/external_test.php b/mod/quiz/tests/external/external_test.php index 42a82c78131..7a3ccc9a8c4 100644 --- a/mod/quiz/tests/external/external_test.php +++ b/mod/quiz/tests/external/external_test.php @@ -86,7 +86,7 @@ class testable_mod_quiz_external extends mod_quiz_external { * @since Moodle 3.1 * @covers \mod_quiz_external */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/tests/external/reopen_attempt_test.php b/mod/quiz/tests/external/reopen_attempt_test.php index 7bbee75f829..4fbc613b17a 100644 --- a/mod/quiz/tests/external/reopen_attempt_test.php +++ b/mod/quiz/tests/external/reopen_attempt_test.php @@ -38,7 +38,7 @@ use stdClass; * @covers \mod_quiz\external\reopen_attempt * @covers \mod_quiz\external\get_reopen_attempt_confirmation */ -class reopen_attempt_test extends externallib_advanced_testcase { +final class reopen_attempt_test extends externallib_advanced_testcase { /** @var stdClass|null if we make a quiz attempt, we store the student object here. */ protected $student; diff --git a/mod/quiz/tests/generator_test.php b/mod/quiz/tests/generator_test.php index f2954770844..b33a6712725 100644 --- a/mod/quiz/tests/generator_test.php +++ b/mod/quiz/tests/generator_test.php @@ -25,7 +25,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_generator(): void { global $DB, $SITE; diff --git a/mod/quiz/tests/lib_test.php b/mod/quiz/tests/lib_test.php index 07dbc02398b..f9e8d084def 100644 --- a/mod/quiz/tests/lib_test.php +++ b/mod/quiz/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @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 { use \quiz_question_helper_test_trait; public function test_quiz_has_grades(): void { diff --git a/mod/quiz/tests/local_structure_slot_random_test.php b/mod/quiz/tests/local_structure_slot_random_test.php index dd2a764ad4f..3129f306ab0 100644 --- a/mod/quiz/tests/local_structure_slot_random_test.php +++ b/mod/quiz/tests/local_structure_slot_random_test.php @@ -34,7 +34,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 \mod_quiz\local\structure\slot_random */ -class local_structure_slot_random_test extends \advanced_testcase { +final class local_structure_slot_random_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/tests/locallib_test.php b/mod/quiz/tests/locallib_test.php index 492a840117a..fd30e24a82d 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/tests/quiz_question_helper_test_trait.ph * @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 { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/tests/privacy/provider_test.php b/mod/quiz/tests/privacy/provider_test.php index e10fe7afc22..369abf1c974 100644 --- a/mod/quiz/tests/privacy/provider_test.php +++ b/mod/quiz/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/question/tests/privacy_helper.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz\privacy\provider */ -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 c8ef37ae19f..806ef0b540c 100644 --- a/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php +++ b/mod/quiz/tests/privacy_legacy_quizaccess_polyfill_test.php @@ -29,7 +29,7 @@ namespace mod_quiz; * @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 cadefc142ec..56c28c57bf4 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/question/display_options_test.php b/mod/quiz/tests/question/display_options_test.php index 420a804f2b0..2be905a3f15 100644 --- a/mod/quiz/tests/question/display_options_test.php +++ b/mod/quiz/tests/question/display_options_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz\question\display_options */ -class display_options_test extends \basic_testcase { +final class display_options_test extends \basic_testcase { public function test_num_attempts_access_rule(): void { $quiz = new \stdClass(); $quiz->decimalpoints = 2; 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 a46b5a67fea..1063572f9a4 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 @@ -40,7 +40,7 @@ use stdClass; * @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 stdClass $course; diff --git a/mod/quiz/tests/quiz_question_bank_view_test.php b/mod/quiz/tests/quiz_question_bank_view_test.php index 370d2688e75..29ad473b522 100644 --- a/mod/quiz/tests/quiz_question_bank_view_test.php +++ b/mod/quiz/tests/quiz_question_bank_view_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_question\local\bank\view */ -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(): void { $this->resetAfterTest(); diff --git a/mod/quiz/tests/quiz_question_restore_test.php b/mod/quiz/tests/quiz_question_restore_test.php index ba4f24933fa..bf8e6659477 100644 --- a/mod/quiz/tests/quiz_question_restore_test.php +++ b/mod/quiz/tests/quiz_question_restore_test.php @@ -35,7 +35,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 6e54397f0c9..b0542e81be8 100644 --- a/mod/quiz/tests/quiz_question_version_test.php +++ b/mod/quiz/tests/quiz_question_version_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 * @covers \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; /** @var \stdClass user record. */ diff --git a/mod/quiz/tests/quizobj_test.php b/mod/quiz/tests/quizobj_test.php index d9934a94713..b86704b108f 100644 --- a/mod/quiz/tests/quizobj_test.php +++ b/mod/quiz/tests/quizobj_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz\quiz_settings */ -class quizobj_test extends basic_testcase { +final class quizobj_test extends basic_testcase { /** * Test cases for {@see test_cannot_review_message()}. * diff --git a/mod/quiz/tests/repaginate_test.php b/mod/quiz/tests/repaginate_test.php index fffd2ab12e8..940bf22e1b9 100644 --- a/mod/quiz/tests/repaginate_test.php +++ b/mod/quiz/tests/repaginate_test.php @@ -62,7 +62,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 08366aaedcf..336a881ca27 100644 --- a/mod/quiz/tests/reportlib_test.php +++ b/mod/quiz/tests/reportlib_test.php @@ -29,7 +29,7 @@ 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 { +final class reportlib_test extends \advanced_testcase { public function test_quiz_report_index_by_keys(): void { $datum = []; $object = new \stdClass(); diff --git a/mod/quiz/tests/restore_attempt_test.php b/mod/quiz/tests/restore_attempt_test.php index b44161a2c54..064eb75f1c6 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 dde9ef42ca5..a3f8c261ff9 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 3d861b193f9..5bcf2bcb677 100644 --- a/mod/quiz/tests/structure_test.php +++ b/mod/quiz/tests/structure_test.php @@ -30,7 +30,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 \mod_quiz\structure */ -class structure_test extends \advanced_testcase { +final class structure_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/tests/tags_test.php b/mod/quiz/tests/tags_test.php index ef6ab833731..c35cb4413f9 100644 --- a/mod/quiz/tests/tags_test.php +++ b/mod/quiz/tests/tags_test.php @@ -28,7 +28,7 @@ use mod_quiz\quiz_settings; * @author 2021 Safat Shahin * @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 { public function test_restore_random_question_by_tag(): void { global $CFG, $USER, $DB; diff --git a/mod/resource/tests/backup/restore_date_test.php b/mod/resource/tests/backup/restore_date_test.php index 84e2e0cec06..5182f8c35ab 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(): void { global $DB; diff --git a/mod/resource/tests/event/events_test.php b/mod/resource/tests/event/events_test.php index eb7ba3b9912..85805f4361c 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 0e703575353..f731b24800a 100644 --- a/mod/resource/tests/externallib_test.php +++ b/mod/resource/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 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 a94921791d9..ab709b29530 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(): void { global $DB, $SITE; diff --git a/mod/resource/tests/lib_test.php b/mod/resource/tests/lib_test.php index 7a1143d8154..50455ca8df2 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 c3579eb7c49..a9533cc725a 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 015305c78da..17ea7bea60e 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 858c851b015..1064146c32b 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 0159f487c3f..4bf2bce6887 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 4edc9d32f23..9f19d1ef840 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(): void { global $DB, $USER; diff --git a/mod/scorm/tests/custom_completion_test.php b/mod/scorm/tests/custom_completion_test.php index a3c6c03b210..8f0add11d4b 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 aa9fe307474..6f15e7c65b5 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 03066c9fdaa..3bcc16486a2 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 3f7fbc5fa0a..b8e976c9d49 100644 --- a/mod/scorm/tests/externallib_test.php +++ b/mod/scorm/tests/externallib_test.php @@ -36,7 +36,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 { /** @var \stdClass course record. */ protected \stdClass $course; diff --git a/mod/scorm/tests/formatduration_test.php b/mod/scorm/tests/formatduration_test.php index 102aa425660..0578d3492a5 100644 --- a/mod/scorm/tests/formatduration_test.php +++ b/mod/scorm/tests/formatduration_test.php @@ -30,7 +30,7 @@ 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 { +final class formatduration_test extends \basic_testcase { public function test_scorm2004_format(): void { $stryears = get_string('years'); $strmonths = trim(get_string('nummonths')); diff --git a/mod/scorm/tests/generator_test.php b/mod/scorm/tests/generator_test.php index 050fdfdc050..6801efeb694 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(): void { global $DB, $CFG, $USER; diff --git a/mod/scorm/tests/lib_test.php b/mod/scorm/tests/lib_test.php index 01fb3cd6d5a..44aea07742d 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 { /** @var \stdClass course record. */ protected \stdClass $course; diff --git a/mod/scorm/tests/locallib_test.php b/mod/scorm/tests/locallib_test.php index b120f96671c..100c8a0c34a 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 39d67dc6191..5721fe27169 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 a6bd492d380..04f266bf7de 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 d88ba393b6d..d6094815607 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(): void { global $DB; diff --git a/mod/survey/tests/custom_completion_test.php b/mod/survey/tests/custom_completion_test.php index d2bb3d9583d..f603307b779 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 cc25489f45c..002c42e3c56 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 d2c182217ad..b52d4eca200 100644 --- a/mod/survey/tests/externallib_test.php +++ b/mod/survey/tests/externallib_test.php @@ -36,7 +36,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 { /** @var \stdClass course record. */ protected $course; diff --git a/mod/survey/tests/generator_test.php b/mod/survey/tests/generator_test.php index a038c4add09..425eb020c7e 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 { /** * Setup testcase. diff --git a/mod/survey/tests/lib_test.php b/mod/survey/tests/lib_test.php index eb5704f9a09..adba504082e 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 f8d50e9fb7c..e58879cb505 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 0144108c594..7acce60718f 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 { /** * Setup testcase. diff --git a/mod/url/tests/externallib_test.php b/mod/url/tests/externallib_test.php index 8ca15c724bf..8d5a4241770 100644 --- a/mod/url/tests/externallib_test.php +++ b/mod/url/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 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 5903940bf49..3885fdca384 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(): void { global $DB; diff --git a/mod/url/tests/lib_test.php b/mod/url/tests/lib_test.php index b3a676a6b8f..5d9273ae693 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 fc6cd95236a..4f90feb02ac 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 bbf7b9a08f7..5b0e7fcb381 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 c7832fe54d9..4f4178e5d44 100644 --- a/mod/wiki/tests/externallib_test.php +++ b/mod/wiki/tests/externallib_test.php @@ -36,7 +36,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 { /** @var \stdClass course record. */ protected $course; diff --git a/mod/wiki/tests/generator_test.php b/mod/wiki/tests/generator_test.php index ad60062e91d..0f465f2715d 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(): void { global $DB; diff --git a/mod/wiki/tests/lib_test.php b/mod/wiki/tests/lib_test.php index 69a495297a7..36c253e17e4 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 2a442027468..ed714af7d47 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 c91457d4712..a56fccc83d2 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 a03f63fae58..ead65ac1155 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 b91733fef76..4dee9b7f113 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 9fe1ac79ce1..e4fee8bb33e 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 5a9bb7c1f1c..fc139bdcff6 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 544d04251de..e51bcc014d9 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 f042e36ea9a..c9063fe0cf0 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 a26c540dd91..7353f102521 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 { /** @var \testing_data_generator data generator. */ protected $generator; diff --git a/mod/workshop/form/comments/tests/privacy/provider_test.php b/mod/workshop/form/comments/tests/privacy/provider_test.php index 66968bac091..bdbdcbb8e77 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 { /** @var \testing_data_generator data generator. */ protected $generator; diff --git a/mod/workshop/form/numerrors/tests/lib_test.php b/mod/workshop/form/numerrors/tests/lib_test.php index 90ac415c3e5..24d6d916f2c 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 7264b4fbc37..00c2c820e9c 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 { /** @var \testing_data_generator data generator. */ protected $generator; diff --git a/mod/workshop/form/rubric/tests/lib_test.php b/mod/workshop/form/rubric/tests/lib_test.php index a229ac64b32..ee7e76880b9 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 a862af47792..3420c495093 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 { /** @var \testing_data_generator data generator. */ protected $generator; diff --git a/mod/workshop/tests/backup/restore_date_test.php b/mod/workshop/tests/backup/restore_date_test.php index eeca68bb6ff..ae6ed45629b 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 de97fc52ba1..0746a5de981 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 4ca548ba5dd..ff60ab8c45b 100644 --- a/mod/workshop/tests/event/events_test.php +++ b/mod/workshop/tests/event/events_test.php @@ -38,7 +38,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 c2a5953fbc5..34383a11a12 100644 --- a/mod/workshop/tests/external/external_test.php +++ b/mod/workshop/tests/external/external_test.php @@ -47,7 +47,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 9c39434f645..3703039490a 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(): void { global $DB; diff --git a/mod/workshop/tests/lib_test.php b/mod/workshop/tests/lib_test.php index 014c4767006..d4708007cd6 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 97dc91e66e3..a19f4636adc 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 811930f6716..12a99a22e4e 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 dc5104a6534..2d835b2a2a5 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 715aad9e2a5..eeaeffdab3b 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 b743890ef0a..d3ed82db95c 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/external/view_page_test.php b/my/tests/external/view_page_test.php index 0e8fca66962..d44e91b9589 100644 --- a/my/tests/external/view_page_test.php +++ b/my/tests/external/view_page_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @since Moodle 4.3 * @covers \core_my\external\view_page */ -class view_page_test extends externallib_advanced_testcase { +final class view_page_test extends externallib_advanced_testcase { /** * Set up for every test. diff --git a/my/tests/privacy/provider_test.php b/my/tests/privacy/provider_test.php index 52261ea133e..bf184170deb 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 50bb407ccd8..c7e4ee7d162 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 3aae3ddf14f..6a08874b9d2 100644 --- a/notes/tests/externallib_test.php +++ b/notes/tests/externallib_test.php @@ -36,7 +36,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 f87fd7cef7d..6afad6d4037 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(): void { diff --git a/notes/tests/lib_test.php b/notes/tests/lib_test.php index c7638803af7..9c02c54827e 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 240e83c202b..01aaeab0b25 100644 --- a/notes/tests/privacy/provider_test.php +++ b/notes/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_notes\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_contexts_for_userid(). diff --git a/notes/tests/reportbuilder/datasource/notes_test.php b/notes/tests/reportbuilder/datasource/notes_test.php index ee4b504f6ef..0ccdd0dd21c 100644 --- a/notes/tests/reportbuilder/datasource/notes_test.php +++ b/notes/tests/reportbuilder/datasource/notes_test.php @@ -36,7 +36,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 aed7bfb176f..240c8c51bf8 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(): void { global $DB; diff --git a/payment/tests/helper_test.php b/payment/tests/helper_test.php index c68c9cd730d..bc13c482570 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 09c08a8dd72..d0c56256c9b 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 826caf38081..d57a5236234 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 ff0c19a6e33..a3de9640a37 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 617b78f8e74..78530af082c 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 1935a29d892..252c9bf117b 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 338dc0ea7a3..2a3bc9f8347 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 997ea469ba1..bed33ae6cb1 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 698700675c0..26192a91f8d 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 9b43d6eb53d..e3199615ada 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 9b10532e8ae..55776d42487 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 6c9e5407a55..6e62ce03eea 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 4bc9cfd0f8a..3e05c049d34 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 098bcdada95..6ba455838de 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 75cd66feb42..7ecd7523274 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 2d69f1cd9b7..1ac8f2eede7 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 0f8aeea288c..342a857c20e 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 087f9e4ee35..5c25dfc0144 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 045312940e1..da39c3b66c4 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 bb8b97b08a6..829d916676b 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 0375919b05a..d7c959558ab 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 e70c18f1d54..73af628e6f0 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 fe0aee5aabc..a1d4707e210 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 ceb6a3c6639..215556cc4ef 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 51fea8c0ee2..4a9b7719e11 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 8c5ae16a5d9..1c206dd45a8 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 cffd1024e1d..c0d0019ddd8 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 7ebdf246ab6..663f283c9db 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 cb2d775390e..dec8fa8a62b 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 dc8638c4ac1..2dab44dca7f 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 c03da55fc93..0319dc2adbf 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 08e8c83251c..8d780652202 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 * @covers \qbank_columnsortorder\column_manager */ -class column_manager_test extends advanced_testcase { +final class column_manager_test extends advanced_testcase { /** * Generate a course and return a question bank view for the course context. diff --git a/question/bank/columnsortorder/tests/external/set_column_size_test.php b/question/bank/columnsortorder/tests/external/set_column_size_test.php index 523e13b41c5..51ce01f4e3a 100644 --- a/question/bank/columnsortorder/tests/external/set_column_size_test.php +++ b/question/bank/columnsortorder/tests/external/set_column_size_test.php @@ -31,7 +31,7 @@ use qbank_columnsortorder\tests\external_function_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_columnsortorder\external\set_column_size */ -class set_column_size_test extends external_function_testcase { +final class set_column_size_test extends external_function_testcase { /** * @var string Fully-qualified external function class to test. */ diff --git a/question/bank/columnsortorder/tests/external/set_columnbank_order_test.php b/question/bank/columnsortorder/tests/external/set_columnbank_order_test.php index c22fe3edd33..c0182d33dda 100644 --- a/question/bank/columnsortorder/tests/external/set_columnbank_order_test.php +++ b/question/bank/columnsortorder/tests/external/set_columnbank_order_test.php @@ -31,7 +31,7 @@ use qbank_columnsortorder\tests\external_function_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_columnsortorder\external\set_columnbank_order */ -class set_columnbank_order_test extends external_function_testcase { +final class set_columnbank_order_test extends external_function_testcase { /** * @var string Fully-qualified external function class to test. diff --git a/question/bank/columnsortorder/tests/external/set_hidden_columns_test.php b/question/bank/columnsortorder/tests/external/set_hidden_columns_test.php index d38352a3aa3..2a8ac13301d 100644 --- a/question/bank/columnsortorder/tests/external/set_hidden_columns_test.php +++ b/question/bank/columnsortorder/tests/external/set_hidden_columns_test.php @@ -31,7 +31,7 @@ use qbank_columnsortorder\tests\external_function_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_columnsortorder\external\set_hidden_columns */ -class set_hidden_columns_test extends external_function_testcase { +final class set_hidden_columns_test extends external_function_testcase { /** * @var string Fully-qualified external function class to test. */ diff --git a/question/bank/comment/tests/backup_test.php b/question/bank/comment/tests/backup_test.php index f908e16979c..198beb4fb0d 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 f169af8770c..37a033859bb 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/event/question_deleted_observer_test.php b/question/bank/comment/tests/event/question_deleted_observer_test.php index f31c3f71ef0..ccc780a4028 100644 --- a/question/bank/comment/tests/event/question_deleted_observer_test.php +++ b/question/bank/comment/tests/event/question_deleted_observer_test.php @@ -25,7 +25,7 @@ namespace qbank_comment\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_comment\event\question_deleted_observer */ -class question_deleted_observer_test extends \advanced_testcase { +final class question_deleted_observer_test extends \advanced_testcase { /** * Deleting a question with comments should also delete the comments diff --git a/question/bank/comment/tests/lib_test.php b/question/bank/comment/tests/lib_test.php index 5cad82bab9a..d4bc3c232b1 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 ffe903849ee..2c7aeea753d 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/event/question_deleted_observer_test.php b/question/bank/customfields/tests/event/question_deleted_observer_test.php index bcbde6aa7b9..0465247d6aa 100644 --- a/question/bank/customfields/tests/event/question_deleted_observer_test.php +++ b/question/bank/customfields/tests/event/question_deleted_observer_test.php @@ -25,7 +25,7 @@ namespace qbank_customfields\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_customfields\event\question_deleted_observer */ -class question_deleted_observer_test extends \advanced_testcase { +final class question_deleted_observer_test extends \advanced_testcase { /** * Deleting a question with customfield data should also delete the data. 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 b6b70578a7f..4333d1c9bb6 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 2e2857de475..0b8a5af414c 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 { /** @var \stdClass course record. */ protected $course; diff --git a/question/bank/exporttoxml/tests/helper_test.php b/question/bank/exporttoxml/tests/helper_test.php index 9cb308fa73f..dbc9355b9cc 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 9694f184661..20dde9375c9 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 6fef1e127d9..4b88cd8a3ce 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/helper_test.php b/question/bank/managecategories/tests/helper_test.php index 9d09116bde6..52ab6f363f0 100644 --- a/question/bank/managecategories/tests/helper_test.php +++ b/question/bank/managecategories/tests/helper_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 * @coversDefaultClass \qbank_managecategories\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/question/bank/managecategories/tests/question_category_object_test.php b/question/bank/managecategories/tests/question_category_object_test.php index b08f4f66e65..f64218d42e1 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 35dc14c518c..1239e0f3633 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 b6131885d57..2dec158f3fc 100644 --- a/question/bank/statistics/tests/helper_test.php +++ b/question/bank/statistics/tests/helper_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @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 { use \quiz_question_helper_test_trait; diff --git a/question/bank/tagquestion/tests/event/question_deleted_observer_test.php b/question/bank/tagquestion/tests/event/question_deleted_observer_test.php index a4d13efa22b..a0ebe49a07c 100644 --- a/question/bank/tagquestion/tests/event/question_deleted_observer_test.php +++ b/question/bank/tagquestion/tests/event/question_deleted_observer_test.php @@ -25,7 +25,7 @@ namespace qbank_tagquestion\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbank_tagquestion\event\question_deleted_observer */ -class question_deleted_observer_test extends \advanced_testcase { +final class question_deleted_observer_test extends \advanced_testcase { /** * Deleting a question with tags should also delete the tags. diff --git a/question/bank/tagquestion/tests/external/submit_tags_test.php b/question/bank/tagquestion/tests/external/submit_tags_test.php index 22ab07e1043..d03ab7dacc3 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 { /** @var \stdClass course record. */ protected $course; diff --git a/question/bank/usage/tests/helper_test.php b/question/bank/usage/tests/helper_test.php index 0f6c651762c..68ecfb1aa9a 100644 --- a/question/bank/usage/tests/helper_test.php +++ b/question/bank/usage/tests/helper_test.php @@ -32,7 +32,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 * @coversDefaultClass \qbank_usage\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/question/bank/usage/tests/question_usage_test.php b/question/bank/usage/tests/question_usage_test.php index be5d8054817..16f29c1ba7b 100644 --- a/question/bank/usage/tests/question_usage_test.php +++ b/question/bank/usage/tests/question_usage_test.php @@ -28,7 +28,7 @@ use mod_quiz\quiz_attempt; * @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 9d3093b2481..bbaed8fe474 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 388ceee3007..9175203591b 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 c52ecfbd658..56b61443ce5 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 b15683e521a..0ea160f5346 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 74786831905..8256241a9e3 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 fafa7633935..c93e26cfe70 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(): void { $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 f4b7344bf89..4593058f272 100644 --- a/question/behaviour/deferredcbm/tests/walkthrough_test.php +++ b/question/behaviour/deferredcbm/tests/walkthrough_test.php @@ -33,7 +33,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_deferred_cbm_truefalse_high_certainty(): void { // Create a true-false question with correct answer true. diff --git a/question/behaviour/deferredfeedback/tests/behaviour_type_test.php b/question/behaviour/deferredfeedback/tests/behaviour_type_test.php index 3a634bfa425..f93e9a31ef1 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 4b9227d7a9b..403e4eb70aa 100644 --- a/question/behaviour/deferredfeedback/tests/walkthrough_test.php +++ b/question/behaviour/deferredfeedback/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 { public function test_deferredfeedback_feedback_truefalse(): void { // Create a true-false question with correct answer true. diff --git a/question/behaviour/immediatecbm/tests/behaviour_type_test.php b/question/behaviour/immediatecbm/tests/behaviour_type_test.php index 958a34e7f82..34800813e46 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 b13a2c05241..0b6936d607b 100644 --- a/question/behaviour/immediatecbm/tests/walkthrough_test.php +++ b/question/behaviour/immediatecbm/tests/walkthrough_test.php @@ -33,7 +33,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_immediatecbm_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. diff --git a/question/behaviour/immediatefeedback/tests/behaviour_type_test.php b/question/behaviour/immediatefeedback/tests/behaviour_type_test.php index 89a66ed5475..78df27a034a 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 b2ba5f90351..5df4698d599 100644 --- a/question/behaviour/immediatefeedback/tests/walkthrough_test.php +++ b/question/behaviour/immediatefeedback/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 { public function test_immediatefeedback_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. diff --git a/question/behaviour/informationitem/tests/behaviour_type_test.php b/question/behaviour/informationitem/tests/behaviour_type_test.php index 7477a8683c5..5026b4eba04 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 f22b5cf7c44..d18f4281277 100644 --- a/question/behaviour/informationitem/tests/walkthrough_test.php +++ b/question/behaviour/informationitem/tests/walkthrough_test.php @@ -34,7 +34,7 @@ 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 { +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. diff --git a/question/behaviour/interactive/tests/behaviour_type_test.php b/question/behaviour/interactive/tests/behaviour_type_test.php index ecb29a7edcc..b57abf8f097 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 7d32412e088..1fcbbcb5a50 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(): void { diff --git a/question/behaviour/interactivecountback/tests/behaviour_type_test.php b/question/behaviour/interactivecountback/tests/behaviour_type_test.php index 6d9918747b5..b95fd437e1d 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 3c6f70490b1..e9740b619f4 100644 --- a/question/behaviour/interactivecountback/tests/walkthrough_test.php +++ b/question/behaviour/interactivecountback/tests/walkthrough_test.php @@ -33,7 +33,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_match_reset(): void { // Create a matching question. diff --git a/question/behaviour/manualgraded/tests/behaviour_type_test.php b/question/behaviour/manualgraded/tests/behaviour_type_test.php index c976634985d..d3fb3a65d33 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 304a88bcd98..53ec37c0fad 100644 --- a/question/behaviour/manualgraded/tests/walkthrough_test.php +++ b/question/behaviour/manualgraded/tests/walkthrough_test.php @@ -33,7 +33,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_manual_graded_essay(): void { global $PAGE; diff --git a/question/behaviour/missing/tests/behaviour_type_test.php b/question/behaviour/missing/tests/behaviour_type_test.php index 06fb6c7d63e..df4d6b7309c 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 9d572f919af..ff7e01f7331 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(): void { $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 f6fff104e37..8e6bb24a3cb 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 eed25ae429c..f694a7066f5 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 10af1785718..a42d6f7448b 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 4fba2e0c2c5..f8fc7e8a84e 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 52c885c6b38..cba3910abab 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(): void { global $DB; diff --git a/question/engine/tests/questionattempt_db_test.php b/question/engine/tests/questionattempt_db_test.php index f5d9ffe0e57..93d5270e0db 100644 --- a/question/engine/tests/questionattempt_db_test.php +++ b/question/engine/tests/questionattempt_db_test.php @@ -41,7 +41,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_db_test extends \data_loading_method_test_base { +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', diff --git a/question/engine/tests/questionattempt_test.php b/question/engine/tests/questionattempt_test.php index 5bca0d39bac..1ea49baea28 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 c97d972da88..925345bdc73 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 14e00362498..52670dfebbe 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 2437ad0e3b5..76a3fba0889 100644 --- a/question/engine/tests/questionattemptstep_db_test.php +++ b/question/engine/tests/questionattemptstep_db_test.php @@ -34,7 +34,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 questionattemptstep_db_test extends \data_loading_method_test_base { +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'), diff --git a/question/engine/tests/questionattemptstep_test.php b/question/engine/tests/questionattemptstep_test.php index d27ecc55dce..376dc3dbc6c 100644 --- a/question/engine/tests/questionattemptstep_test.php +++ b/question/engine/tests/questionattemptstep_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 questionattemptstep_test extends \advanced_testcase { +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 0756d126265..b45a3ba1c6d 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 0d4e63f6d64..2e603f7e83a 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(): void { $config = new \stdClass(); diff --git a/question/engine/tests/questionstate_test.php b/question/engine/tests/questionstate_test.php index 74e3ec58468..e88da160c75 100644 --- a/question/engine/tests/questionstate_test.php +++ b/question/engine/tests/questionstate_test.php @@ -33,7 +33,7 @@ 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 { +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()); diff --git a/question/engine/tests/questionusage_autosave_test.php b/question/engine/tests/questionusage_autosave_test.php index 185ca19e4d0..487bda108b5 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(): void { $this->resetAfterTest(); diff --git a/question/engine/tests/questionusagebyactivity_data_test.php b/question/engine/tests/questionusagebyactivity_data_test.php index 1333c638a39..f8f4e86b1d6 100644 --- a/question/engine/tests/questionusagebyactivity_data_test.php +++ b/question/engine/tests/questionusagebyactivity_data_test.php @@ -34,7 +34,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 questionusagebyactivity_data_test extends \data_loading_method_test_base { +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( diff --git a/question/engine/tests/questionusagebyactivity_test.php b/question/engine/tests/questionusagebyactivity_test.php index c934e60b482..edf7aac072a 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(): void { // Set up diff --git a/question/engine/tests/questionutils_test.php b/question/engine/tests/questionutils_test.php index 55470b11d6d..90257a37ca1 100644 --- a/question/engine/tests/questionutils_test.php +++ b/question/engine/tests/questionutils_test.php @@ -31,7 +31,7 @@ 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 { +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(), diff --git a/question/engine/tests/unitofwork_test.php b/question/engine/tests/unitofwork_test.php index 8b62abb8e32..5458800d847 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 e5bd464069e..14f6dea7e4f 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(): void { diff --git a/question/format/aiken/tests/aikenformat_test.php b/question/format/aiken/tests/aikenformat_test.php index 871cf345bb7..1bee9832ea6 100644 --- a/question/format/aiken/tests/aikenformat_test.php +++ b/question/format/aiken/tests/aikenformat_test.php @@ -38,7 +38,7 @@ 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 { +final class aikenformat_test extends question_testcase { public function test_readquestions(): void { global $CFG; diff --git a/question/format/aiken/tests/qformat_aiken_export_test.php b/question/format/aiken/tests/qformat_aiken_export_test.php index 785d2c0a5a6..60a0463b5a2 100644 --- a/question/format/aiken/tests/qformat_aiken_export_test.php +++ b/question/format/aiken/tests/qformat_aiken_export_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qformat_aiken */ -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 f11184c250b..4f6c22e4cc8 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 5e92e8929e3..4f8c77998be 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 690a990ec56..8e57dc132f5 100644 --- a/question/format/gift/tests/giftformat_test.php +++ b/question/format/gift/tests/giftformat_test.php @@ -36,7 +36,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( phpunit_util::normalise_line_endings($expectedtext), diff --git a/question/format/multianswer/tests/multianswerformat_test.php b/question/format/multianswer/tests/multianswerformat_test.php index ad86c976309..2ba045c4468 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(): void { $lines = file(self::get_fixture_path(__NAMESPACE__, '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 5b5bdea9a5a..e97a3ae5664 100644 --- a/question/format/xml/tests/qformat_xml_import_export_test.php +++ b/question/format/xml/tests/qformat_xml_import_export_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qformat_xml */ -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 4f9ebe19a84..a27978d03e6 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 make_test_question() { global $USER; $q = new \stdClass(); diff --git a/question/tests/backup_test.php b/question/tests/backup_test.php index f439617aa9d..ba48ff27553 100644 --- a/question/tests/backup_test.php +++ b/question/tests/backup_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @covers \restore_qtype_plugin * @covers \restore_create_categories_and_questions */ -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 f62be2eb3aa..990b33148fb 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 371d4944082..2a8335f0686 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 6a0855985e5..c09824c399e 100644 --- a/question/tests/externallib_test.php +++ b/question/tests/externallib_test.php @@ -37,7 +37,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 { /** @var \stdClass course record. */ protected $course; diff --git a/question/tests/generator_test.php b/question/tests/generator_test.php index 34fea6a21c0..3d2df271e40 100644 --- a/question/tests/generator_test.php +++ b/question/tests/generator_test.php @@ -31,7 +31,7 @@ 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 { +final class generator_test extends \advanced_testcase { public function test_create(): void { global $DB; diff --git a/question/tests/importexport_test.php b/question/tests/importexport_test.php index 24a42dd008f..6d4932c5009 100644 --- a/question/tests/importexport_test.php +++ b/question/tests/importexport_test.php @@ -55,7 +55,7 @@ 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 { +final class importexport_test extends \advanced_testcase { public function test_assemble_category_path(): void { $format = new testable_qformat(); $pathsections = [ diff --git a/question/tests/least_used_variant_strategy_test.php b/question/tests/least_used_variant_strategy_test.php index c30349c62f1..608bbee4192 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(): void { $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 2e2a0f90c66..1eef4667da6 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(): void { $this->resetAfterTest(); diff --git a/question/tests/privacy/provider_test.php b/question/tests/privacy/provider_test.php index 059a8e29d17..6d84d0d685b 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 e659a76d12a..d6e88dd2404 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 ca98a234ac6..41e9151a0fc 100644 --- a/question/tests/version_test.php +++ b/question/tests/version_test.php @@ -29,7 +29,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 23ac14058c7..6e919894d49 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 7cd5545ec4b..7e4c22bcfe6 100644 --- a/question/type/calculated/tests/question_test.php +++ b/question/type/calculated/tests/question_test.php @@ -37,7 +37,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 question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { /** * Test is complete response * diff --git a/question/type/calculated/tests/question_type_test.php b/question/type/calculated/tests/question_type_test.php index f638bcdb29e..6d7e4c85c2e 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 f3b4230f56f..79895934dc3 100644 --- a/question/type/calculated/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculated/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ 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 { +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', diff --git a/question/type/calculated/tests/variablesubstituter_test.php b/question/type/calculated/tests/variablesubstituter_test.php index 298b1d4648a..aab16b6197a 100644 --- a/question/type/calculated/tests/variablesubstituter_test.php +++ b/question/type/calculated/tests/variablesubstituter_test.php @@ -31,7 +31,7 @@ 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 { +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 804ab6ba09b..cc75a11e4ca 100644 --- a/question/type/calculated/tests/walkthrough_test.php +++ b/question/type/calculated/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(): void { // Create a gapselect question. diff --git a/question/type/calculatedmulti/tests/question_test.php b/question/type/calculatedmulti/tests/question_test.php index e5ddd29195a..2ad571d1e4a 100644 --- a/question/type/calculatedmulti/tests/question_test.php +++ b/question/type/calculatedmulti/tests/question_test.php @@ -33,7 +33,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 question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculated'); 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 4a830c3a316..e8ae6deaaa6 100644 --- a/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ 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 { +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', diff --git a/question/type/calculatedmulti/tests/walkthrough_test.php b/question/type/calculatedmulti/tests/walkthrough_test.php index cb9c2430f26..5c4fc5baa63 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(): void { diff --git a/question/type/calculatedsimple/tests/question_test.php b/question/type/calculatedsimple/tests/question_test.php index d3ab48a3744..975fdaa0cf3 100644 --- a/question/type/calculatedsimple/tests/question_test.php +++ b/question/type/calculatedsimple/tests/question_test.php @@ -33,7 +33,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 question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculatedsimple'); diff --git a/question/type/calculatedsimple/tests/question_type_test.php b/question/type/calculatedsimple/tests/question_type_test.php index 3f2db4e008f..a7a7b3bb107 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 fec0c738722..c608e057a62 100644 --- a/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ 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 { +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', diff --git a/question/type/calculatedsimple/tests/walkthrough_test.php b/question/type/calculatedsimple/tests/walkthrough_test.php index f430b3fbcf2..2999eea994b 100644 --- a/question/type/calculatedsimple/tests/walkthrough_test.php +++ b/question/type/calculatedsimple/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(): void { // Create a gapselect question. diff --git a/question/type/ddimageortext/tests/form/edit_form_test.php b/question/type/ddimageortext/tests/form/edit_form_test.php index 3e5b18c2107..9a0142770ed 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 0d5f297f26a..0fa0caf1e93 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(): void { diff --git a/question/type/ddimageortext/tests/question_type_test.php b/question/type/ddimageortext/tests/question_type_test.php index 116352f01da..5a3341006ba 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 e3ebfb8d306..fd98d4e5ab2 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 0343df6f337..0a0ab72dd80 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 fb48153e653..6ceecfd6279 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(): void { diff --git a/question/type/ddmarker/tests/question_type_test.php b/question/type/ddmarker/tests/question_type_test.php index eac56135479..e0eaacad188 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 d6988180c5a..a826d3a46ad 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(): void { $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 feb0a5881c0..38b8f29a989 100644 --- a/question/type/ddmarker/tests/walkthrough_test.php +++ b/question/type/ddmarker/tests/walkthrough_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/tests/helper.php'); * @covers \qtype_ddmarker_renderer * @covers \question_hint_ddmarker */ -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 4627790b824..9d2dedb2bda 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 481b2cda10e..f4a6863e151 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(): void { diff --git a/question/type/ddwtos/tests/question_test.php b/question/type/ddwtos/tests/question_test.php index 39c952f5770..4e40a455ed4 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(): void { $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 75c6c5e3745..55dc2c3e499 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 a4274e115dc..a83f5a46d32 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 b282af10478..1306a09be27 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 12294f3f1bd..988ced7c0a2 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(): void { $quiz = (object) array( diff --git a/question/type/description/tests/walkthrough_test.php b/question/type/description/tests/walkthrough_test.php index a57894da5ae..fedca2bb731 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(): void { 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 a4eb87bee50..8abfb723bce 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(): void { diff --git a/question/type/essay/tests/question_test.php b/question/type/essay/tests/question_test.php index 778afa39fc9..31c4821b838 100644 --- a/question/type/essay/tests/question_test.php +++ b/question/type/essay/tests/question_test.php @@ -32,7 +32,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 question_test extends \advanced_testcase { +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'; diff --git a/question/type/essay/tests/question_type_test.php b/question/type/essay/tests/question_type_test.php index a6737e6455d..be00164f816 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 9d3d2eda89e..36c69dbd5fd 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 92707e425ea..81f11a24f2b 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(): void { $quiz = (object) array( diff --git a/question/type/essay/tests/walkthrough_test.php b/question/type/essay/tests/walkthrough_test.php index fd9afb11b54..3971d57ee0c 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 77f2aaac73d..33083ce5761 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 e19ca06ce62..d97a974a248 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(): void { diff --git a/question/type/gapselect/tests/question_test.php b/question/type/gapselect/tests/question_test.php index 348fa4b88bb..f647a155a3b 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(): void { $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 f05e1aecd9f..3056beff6a7 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 06a808101db..25d6d10863f 100644 --- a/question/type/gapselect/tests/walkthrough_test.php +++ b/question/type/gapselect/tests/walkthrough_test.php @@ -33,7 +33,7 @@ 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 { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_behaviour(): void { // Create a gapselect question. diff --git a/question/type/match/tests/backup_test.php b/question/type/match/tests/backup_test.php index bca4a5a9694..13d376d8db8 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 0717e8765ae..eafd2eeb8d7 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(): void { diff --git a/question/type/match/tests/question_test.php b/question/type/match/tests/question_test.php index d5e95a5353d..5385f8e190b 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(): void { $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 969559b8e8f..c1d7e6d58b2 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 fa17020ec18..a907ecc7436 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(): void { $quiz = (object) array( diff --git a/question/type/match/tests/walkthrough_test.php b/question/type/match/tests/walkthrough_test.php index a35c940e3f6..2769eef0529 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(): void { diff --git a/question/type/missingtype/tests/missingtype_test.php b/question/type/missingtype/tests/missingtype_test.php index f68ddefd1e8..c1ea26f4d28 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 9c9526bfe13..829508b68e9 100644 --- a/question/type/multianswer/tests/question_test.php +++ b/question/type/multianswer/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_multianswer_question */ -class question_test extends \advanced_testcase { +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, diff --git a/question/type/multianswer/tests/question_type_test.php b/question/type/multianswer/tests/question_type_test.php index 6cc5a6aba2e..f3d3bdfe4ce 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 0b988a1860b..f3f6564b2d0 100644 --- a/question/type/multianswer/tests/upgrade_old_attempt_data_test.php +++ b/question/type/multianswer/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ 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 { +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', diff --git a/question/type/multianswer/tests/walkthrough_test.php b/question/type/multianswer/tests/walkthrough_test.php index 87220b86328..8d93956486b 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 d2b6592ab93..a4336fb015f 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(): void { diff --git a/question/type/multichoice/tests/question_multi_test.php b/question/type/multichoice/tests/question_multi_test.php index 918824ca900..efe1b89685d 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(): void { $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 12aeaa8b5e9..ce36180e7b8 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(): void { $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 a7f145f135a..1853adb7829 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 658de33fa10..8a18e4c478b 100644 --- a/question/type/multichoice/tests/walkthrough_test.php +++ b/question/type/multichoice/tests/walkthrough_test.php @@ -38,7 +38,7 @@ 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 { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_deferredfeedback_feedback_multichoice_single(): void { // Create a multichoice, single question. diff --git a/question/type/numerical/tests/answer_test.php b/question/type/numerical/tests/answer_test.php index c3a2774f132..1342d9c0430 100644 --- a/question/type/numerical/tests/answer_test.php +++ b/question/type/numerical/tests/answer_test.php @@ -32,7 +32,7 @@ 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 { +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); diff --git a/question/type/numerical/tests/answerprocessor_test.php b/question/type/numerical/tests/answerprocessor_test.php index 51b8f4a1f76..d03eaf086b6 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 1a074f4ede4..aacf9d0b07f 100644 --- a/question/type/numerical/tests/question_test.php +++ b/question/type/numerical/tests/question_test.php @@ -36,7 +36,7 @@ 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 { +final class question_test extends \advanced_testcase { public function test_is_complete_response(): void { $question = \test_question_maker::make_question('numerical'); diff --git a/question/type/numerical/tests/question_type_test.php b/question/type/numerical/tests/question_type_test.php index 6e64d880efe..03c1e648c39 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 5c851554961..7dcb59f76fa 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(): void { $quiz = (object) array( diff --git a/question/type/numerical/tests/walkthrough_test.php b/question/type/numerical/tests/walkthrough_test.php index a94bae62929..6e4c4406605 100644 --- a/question/type/numerical/tests/walkthrough_test.php +++ b/question/type/numerical/tests/walkthrough_test.php @@ -33,7 +33,7 @@ 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 { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_currency(): void { // Create a gapselect question. diff --git a/question/type/random/tests/question_type_test.php b/question/type/random/tests/question_type_test.php index c99ba338d53..c93cff9c2d2 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 e418c1a0a75..5e2dee2a1f9 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(): void { $quiz = (object) array( diff --git a/question/type/randomsamatch/tests/question_test.php b/question/type/randomsamatch/tests/question_test.php index 7baf119df64..92dc37575bc 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(): void { $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 2b98c9dbfe3..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,7 +29,7 @@ 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 { +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', diff --git a/question/type/randomsamatch/tests/walkthrough_test.php b/question/type/randomsamatch/tests/walkthrough_test.php index e4182ed0ae4..32fdf074384 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(): void { diff --git a/question/type/shortanswer/tests/privacy/provider_test.php b/question/type/shortanswer/tests/privacy/provider_test.php index 349de02c4cd..25983e0adeb 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(): void { diff --git a/question/type/shortanswer/tests/question_test.php b/question/type/shortanswer/tests/question_test.php index 6ffe428ef1a..a2d5f0ad740 100644 --- a/question/type/shortanswer/tests/question_test.php +++ b/question/type/shortanswer/tests/question_test.php @@ -36,7 +36,7 @@ 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 { +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( diff --git a/question/type/shortanswer/tests/question_type_test.php b/question/type/shortanswer/tests/question_type_test.php index 08d49389d69..e69eb6de035 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 64d4aab21af..4cdead01500 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(): void { $quiz = (object) array( diff --git a/question/type/tests/question_definition_test.php b/question/type/tests/question_definition_test.php index 4248154d014..d7154747867 100644 --- a/question/type/tests/question_definition_test.php +++ b/question/type/tests/question_definition_test.php @@ -28,7 +28,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 question_definition_test extends \advanced_testcase { +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(); 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 1071f8dd0d7..4f4b61b24bb 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 223cb4e5dcc..c3819af5d4f 100644 --- a/question/type/tests/question_hint_test.php +++ b/question/type/tests/question_hint_test.php @@ -31,7 +31,7 @@ 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 { +final class question_hint_test extends \advanced_testcase { public function test_basic(): void { $row = new \stdClass(); $row->id = 123; diff --git a/question/type/tests/question_type_test.php b/question/type/tests/question_type_test.php index 921899c6491..0ef9ec4a0db 100644 --- a/question/type/tests/question_type_test.php +++ b/question/type/tests/question_type_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/type/questiontypebase.php'); * * @covers \question_type */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { public function test_save_question_name(): void { $this->resetAfterTest(); diff --git a/question/type/truefalse/tests/question_test.php b/question/type/truefalse/tests/question_test.php index 7f0f6525dab..fe78eb4171a 100644 --- a/question/type/truefalse/tests/question_test.php +++ b/question/type/truefalse/tests/question_test.php @@ -34,7 +34,7 @@ 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 { +final class question_test extends \advanced_testcase { public function test_is_complete_response(): void { $question = \test_question_maker::make_question('truefalse', 'true'); diff --git a/question/type/truefalse/tests/question_type_test.php b/question/type/truefalse/tests/question_type_test.php index e0ec3fdcb66..e858a11ec2c 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 f1f69231e0d..cf6a92b5457 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(): void { $quiz = (object) array( diff --git a/question/type/truefalse/tests/walkthrough_test.php b/question/type/truefalse/tests/walkthrough_test.php index bbe1406f626..12ef07e849d 100644 --- a/question/type/truefalse/tests/walkthrough_test.php +++ b/question/type/truefalse/tests/walkthrough_test.php @@ -32,7 +32,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_truefalse_question */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +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. diff --git a/rating/tests/externallib_test.php b/rating/tests/externallib_test.php index 344f831eedf..a94b40a7afe 100644 --- a/rating/tests/externallib_test.php +++ b/rating/tests/externallib_test.php @@ -44,7 +44,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 { /** @var \stdClass course record. */ protected $course; diff --git a/rating/tests/privacy/provider_test.php b/rating/tests/privacy/provider_test.php index b1c06215eea..b11fe3fce25 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 a6cb028eb2a..d1a30cd2d11 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 4626027df60..d2b07bf9935 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 3593cc58d94..8f2fb1e5a27 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 b0abfcf8097..975e9811109 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 0e1985c5dc2..30d68957fb4 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 8afe9e42813..6d4ba5f80e3 100644 --- a/report/log/tests/renderable_test.php +++ b/report/log/tests/renderable_test.php @@ -26,7 +26,7 @@ use core_user; * @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. */ diff --git a/report/loglive/tests/event/events_test.php b/report/loglive/tests/event/events_test.php index 5a57cb038ca..fcab8c37f39 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 44e05514716..a97602feeb8 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/loglive/tests/table_log_test.php b/report/loglive/tests/table_log_test.php index 9f5dac1a14e..5140c9853b2 100644 --- a/report/loglive/tests/table_log_test.php +++ b/report/loglive/tests/table_log_test.php @@ -26,7 +26,7 @@ use core_user; * @copyright 2024 onwards Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class table_log_test extends advanced_testcase { +final class table_log_test extends advanced_testcase { /** * @var int The course with separate groups. */ diff --git a/report/outline/tests/lib_test.php b/report/outline/tests/lib_test.php index d88ed6d4efe..6506efad6b5 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 68ee91e1fb1..83902230397 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 5fe917bc8b5..66e3a94684a 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 4c302777029..4005699f059 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 2624a37f35e..b5ed14fb19c 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 8e93d1369c6..be2911e8f09 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/themeusage/tests/theme_usage_test.php b/report/themeusage/tests/theme_usage_test.php index 8682c1c2287..423ddec29f5 100644 --- a/report/themeusage/tests/theme_usage_test.php +++ b/report/themeusage/tests/theme_usage_test.php @@ -26,7 +26,7 @@ use core\output\theme_usage; * @copyright 2023 David Woloszyn * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class theme_usage_test extends \advanced_testcase { +final class theme_usage_test extends \advanced_testcase { /** @var testing_data_generator Data generator. */ private testing_data_generator $generator; diff --git a/report/usersessions/tests/lib_test.php b/report/usersessions/tests/lib_test.php index d9d2f969eae..e102b6945f0 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 8d87c303092..9a68008d0fe 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/add_test.php b/reportbuilder/tests/external/columns/add_test.php index f8ca3651dd1..e415fe61a5d 100644 --- a/reportbuilder/tests/external/columns/add_test.php +++ b/reportbuilder/tests/external/columns/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/columns/delete_test.php b/reportbuilder/tests/external/columns/delete_test.php index 5ba8d9ab454..a069c5b9b27 100644 --- a/reportbuilder/tests/external/columns/delete_test.php +++ b/reportbuilder/tests/external/columns/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/columns/reorder_test.php b/reportbuilder/tests/external/columns/reorder_test.php index ad727883b05..81c7a1e54e3 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 55dc1973471..1efa06252af 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/columns/sort/reorder_test.php b/reportbuilder/tests/external/columns/sort/reorder_test.php index 226cb2f21e1..d01c034b1f0 100644 --- a/reportbuilder/tests/external/columns/sort/reorder_test.php +++ b/reportbuilder/tests/external/columns/sort/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/toggle_test.php b/reportbuilder/tests/external/columns/sort/toggle_test.php index dd5bb53d4a4..216ed3c44f0 100644 --- a/reportbuilder/tests/external/columns/sort/toggle_test.php +++ b/reportbuilder/tests/external/columns/sort/toggle_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 toggle_test extends externallib_advanced_testcase { +final class toggle_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 fc89ad9f472..22fcfe6318b 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 dc236aac8f0..f220ac0e728 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 f87513d7893..557d67dc16b 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 de423e2a5f7..2bab2e2dd14 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 7c51c839ce7..3ac8dbd3e2d 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 06b9097f093..00948b00ea3 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_columns_sorting_exporter_test.php b/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php index 925b00b3051..fb4394843cd 100644 --- a/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php @@ -32,7 +32,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_columns_sorting_exporter_test extends advanced_testcase { +final class custom_report_columns_sorting_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 3b0502a66fd..f2cf5ae5c7d 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_details_exporter_test.php b/reportbuilder/tests/external/custom_report_details_exporter_test.php index 4e143003e8b..a50731120ac 100644 --- a/reportbuilder/tests/external/custom_report_details_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_details_exporter_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 custom_report_details_exporter_test extends advanced_testcase { +final class custom_report_details_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 6256826a7dd..e1fd3fa00ca 100644 --- a/reportbuilder/tests/external/custom_report_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_exporter_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 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 7f9fd84e3e8..14818f055b8 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 4e60a4aeca0..baa9507e244 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 ec51832bf02..b966bb84073 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 a05c52dd2c3..7b8949a3337 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 94a24d1fdfe..3efa9522e4f 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 758a92f372c..9419d0b0bc8 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 592c9f26332..c14000b187f 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 db56fd7098e..a325a04eb18 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/listing_test.php b/reportbuilder/tests/external/reports/listing_test.php index 8325f6d4487..672248bdedb 100644 --- a/reportbuilder/tests/external/reports/listing_test.php +++ b/reportbuilder/tests/external/reports/listing_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 listing_test extends externallib_advanced_testcase { +final class listing_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/reports/retrieve_test.php b/reportbuilder/tests/external/reports/retrieve_test.php index ac50ab448ac..9cb333d03b8 100644 --- a/reportbuilder/tests/external/reports/retrieve_test.php +++ b/reportbuilder/tests/external/reports/retrieve_test.php @@ -37,7 +37,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 retrieve_test extends externallib_advanced_testcase { +final class retrieve_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/reports/view_test.php b/reportbuilder/tests/external/reports/view_test.php index a2b165de4fd..d9e3ee92f69 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 3bfdea2f0f7..3d99073ebfd 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 6ec59e27bce..ca7bb24f0b6 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 b5bdc4f9493..43480cedd65 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_data_exporter_test.php b/reportbuilder/tests/external/system_report_data_exporter_test.php index 637615c49f1..9f1fb650805 100644 --- a/reportbuilder/tests/external/system_report_data_exporter_test.php +++ b/reportbuilder/tests/external/system_report_data_exporter_test.php @@ -33,7 +33,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_data_exporter_test extends advanced_testcase { +final class system_report_data_exporter_test extends advanced_testcase { /** * Test exported data structure diff --git a/reportbuilder/tests/external/system_report_exporter_test.php b/reportbuilder/tests/external/system_report_exporter_test.php index dd36c9631fc..49fbe144364 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/external/systemreports/can_view_test.php b/reportbuilder/tests/external/systemreports/can_view_test.php index 22c50823064..b492eee9a68 100644 --- a/reportbuilder/tests/external/systemreports/can_view_test.php +++ b/reportbuilder/tests/external/systemreports/can_view_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class can_view_test extends externallib_advanced_testcase { +final class can_view_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/external/systemreports/retrieve_test.php b/reportbuilder/tests/external/systemreports/retrieve_test.php index 0a410ad6bf0..39f0b4c41c0 100644 --- a/reportbuilder/tests/external/systemreports/retrieve_test.php +++ b/reportbuilder/tests/external/systemreports/retrieve_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/webservice/tests/helpers.php"); * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class retrieve_test extends externallib_advanced_testcase { +final class retrieve_test extends externallib_advanced_testcase { /** * Text execute method diff --git a/reportbuilder/tests/generator_test.php b/reportbuilder/tests/generator_test.php index 1c9a13f6033..34a2c38a76a 100644 --- a/reportbuilder/tests/generator_test.php +++ b/reportbuilder/tests/generator_test.php @@ -35,7 +35,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/lib_test.php b/reportbuilder/tests/lib_test.php index 1a01a141157..c67dde163e7 100644 --- a/reportbuilder/tests/lib_test.php +++ b/reportbuilder/tests/lib_test.php @@ -35,7 +35,7 @@ require_once("{$CFG->dirroot}/reportbuilder/lib.php"); * @copyright 2023 Paul Holden * @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 getting tagged reports diff --git a/reportbuilder/tests/local/aggregation/avg_test.php b/reportbuilder/tests/local/aggregation/avg_test.php index b03d254b950..58b3cfdb0e1 100644 --- a/reportbuilder/tests/local/aggregation/avg_test.php +++ b/reportbuilder/tests/local/aggregation/avg_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 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 70f82ce3388..872c05e74ac 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 e8a09081978..93ad2aef7dc 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 0d0dd50ca06..66e849dd596 100644 --- a/reportbuilder/tests/local/aggregation/groupconcat_test.php +++ b/reportbuilder/tests/local/aggregation/groupconcat_test.php @@ -40,7 +40,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 1753b88beb3..487cfaf1040 100644 --- a/reportbuilder/tests/local/aggregation/groupconcatdistinct_test.php +++ b/reportbuilder/tests/local/aggregation/groupconcatdistinct_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 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 1b034c93f67..16b5b41ac42 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 6de8117e3f0..f2171faa372 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 82d1c8481ce..f6a2b221d29 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 ba081838211..c6428386d57 100644 --- a/reportbuilder/tests/local/aggregation/sum_test.php +++ b/reportbuilder/tests/local/aggregation/sum_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 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/base_test.php b/reportbuilder/tests/local/entities/base_test.php index 58330dbeb72..c88c6833b3b 100644 --- a/reportbuilder/tests/local/entities/base_test.php +++ b/reportbuilder/tests/local/entities/base_test.php @@ -43,7 +43,7 @@ defined('MOODLE_INTERNAL') || die(); * @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 { /** * Test entity table alias diff --git a/reportbuilder/tests/local/entities/user_test.php b/reportbuilder/tests/local/entities/user_test.php index a227bcd36b2..dfe6ed751a7 100644 --- a/reportbuilder/tests/local/entities/user_test.php +++ b/reportbuilder/tests/local/entities/user_test.php @@ -29,7 +29,7 @@ use core\context\system; * @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 2a898317940..572a34f6944 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/cohort_test.php b/reportbuilder/tests/local/filters/cohort_test.php index d6d2e007332..3201823145b 100644 --- a/reportbuilder/tests/local/filters/cohort_test.php +++ b/reportbuilder/tests/local/filters/cohort_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2024 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cohort_test extends advanced_testcase { +final class cohort_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/date_test.php b/reportbuilder/tests/local/filters/date_test.php index 9a9b40480ad..0bcfeadddd5 100644 --- a/reportbuilder/tests/local/filters/date_test.php +++ b/reportbuilder/tests/local/filters/date_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 date_test extends advanced_testcase { +final class date_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/duration_test.php b/reportbuilder/tests/local/filters/duration_test.php index ee903b52787..26a8d1a996f 100644 --- a/reportbuilder/tests/local/filters/duration_test.php +++ b/reportbuilder/tests/local/filters/duration_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 duration_test extends advanced_testcase { +final class duration_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/filesize_test.php b/reportbuilder/tests/local/filters/filesize_test.php index 47bced2f62d..7aab35a90c9 100644 --- a/reportbuilder/tests/local/filters/filesize_test.php +++ b/reportbuilder/tests/local/filters/filesize_test.php @@ -31,7 +31,7 @@ use lang_string; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filesize_test extends advanced_testcase { +final class filesize_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/number_test.php b/reportbuilder/tests/local/filters/number_test.php index 963fee2d4d1..2d3e650f344 100644 --- a/reportbuilder/tests/local/filters/number_test.php +++ b/reportbuilder/tests/local/filters/number_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 number_test extends advanced_testcase { +final class number_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} 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 9d42c591eb8..e8aaebe8524 100644 --- a/reportbuilder/tests/local/filters/tags_test.php +++ b/reportbuilder/tests/local/filters/tags_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 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 e5aaa01d5e8..06eb79e2ace 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/audience_test.php b/reportbuilder/tests/local/helpers/audience_test.php index 1ad90c64669..78a04bdebb9 100644 --- a/reportbuilder/tests/local/helpers/audience_test.php +++ b/reportbuilder/tests/local/helpers/audience_test.php @@ -34,7 +34,7 @@ use invalid_parameter_exception; * @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 { /** * Test reports list is empty for a normal user without any audience records configured diff --git a/reportbuilder/tests/local/helpers/custom_fields_test.php b/reportbuilder/tests/local/helpers/custom_fields_test.php index 468f2a63526..2054259ae09 100644 --- a/reportbuilder/tests/local/helpers/custom_fields_test.php +++ b/reportbuilder/tests/local/helpers/custom_fields_test.php @@ -43,7 +43,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_fields_test extends core_reportbuilder_testcase { +final class custom_fields_test extends core_reportbuilder_testcase { /** * Generate custom fields, one of each type diff --git a/reportbuilder/tests/local/helpers/format_test.php b/reportbuilder/tests/local/helpers/format_test.php index e354b2f5531..15febb049c9 100644 --- a/reportbuilder/tests/local/helpers/format_test.php +++ b/reportbuilder/tests/local/helpers/format_test.php @@ -29,7 +29,7 @@ use stdClass; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_test extends advanced_testcase { +final class format_test extends advanced_testcase { /** * Test userdate method diff --git a/reportbuilder/tests/local/helpers/report_test.php b/reportbuilder/tests/local/helpers/report_test.php index b7b2da60c5c..14b91e2200d 100644 --- a/reportbuilder/tests/local/helpers/report_test.php +++ b/reportbuilder/tests/local/helpers/report_test.php @@ -35,7 +35,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 report_test extends advanced_testcase { +final class report_test extends advanced_testcase { /** * Test creation report diff --git a/reportbuilder/tests/local/helpers/schedule_test.php b/reportbuilder/tests/local/helpers/schedule_test.php index 98d6363f2f4..94b61082b1e 100644 --- a/reportbuilder/tests/local/helpers/schedule_test.php +++ b/reportbuilder/tests/local/helpers/schedule_test.php @@ -34,7 +34,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 schedule_test extends advanced_testcase { +final class schedule_test extends advanced_testcase { /** * Test create schedule 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/helpers/user_profile_fields_test.php b/reportbuilder/tests/local/helpers/user_profile_fields_test.php index 06c2cde55cf..76d917b6046 100644 --- a/reportbuilder/tests/local/helpers/user_profile_fields_test.php +++ b/reportbuilder/tests/local/helpers/user_profile_fields_test.php @@ -42,7 +42,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_profile_fields_test extends core_reportbuilder_testcase { +final class user_profile_fields_test extends core_reportbuilder_testcase { /** * Generate custom profile fields, one of each type 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 25c71114834..bd5f15f48ac 100644 --- a/reportbuilder/tests/local/report/base_test.php +++ b/reportbuilder/tests/local/report/base_test.php @@ -35,7 +35,7 @@ use ReflectionClass; * @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/local/report/column_test.php b/reportbuilder/tests/local/report/column_test.php index 3b29dba4dc1..9749dcbfb5d 100644 --- a/reportbuilder/tests/local/report/column_test.php +++ b/reportbuilder/tests/local/report/column_test.php @@ -32,7 +32,7 @@ use core_reportbuilder\local\helpers\database; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class column_test extends advanced_testcase { +final class column_test extends advanced_testcase { /** * Test column name getter/setter diff --git a/reportbuilder/tests/local/report/filter_test.php b/reportbuilder/tests/local/report/filter_test.php index 299d599a11a..266a67359ab 100644 --- a/reportbuilder/tests/local/report/filter_test.php +++ b/reportbuilder/tests/local/report/filter_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\filters\text; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends advanced_testcase { +final class filter_test extends advanced_testcase { /** * Test getting filter 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/permission_test.php b/reportbuilder/tests/permission_test.php index f0806880b89..4cf67d163c1 100644 --- a/reportbuilder/tests/permission_test.php +++ b/reportbuilder/tests/permission_test.php @@ -33,7 +33,7 @@ use core_reportbuilder\reportbuilder\audience\manual; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class permission_test extends advanced_testcase { +final class permission_test extends advanced_testcase { /** * Test whether user can view reports list 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 9e63827a7d3..6aff1393f1f 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 3185e260be5..c6595b33301 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 0c21e1c1b57..6ad07614a97 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 b4031a9fd9a..8269aaa424b 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/equella/tests/lib_test.php b/repository/equella/tests/lib_test.php index 5028858794e..d7857fe5a19 100644 --- a/repository/equella/tests/lib_test.php +++ b/repository/equella/tests/lib_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir . '/webdavlib.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 null|\repository_equella the repository_equella object, which the tests are run on. */ private $repo = null; diff --git a/repository/filesystem/tests/repository_filesystem_test.php b/repository/filesystem/tests/repository_filesystem_test.php index f9a200364e2..cdc4d3c9e97 100644 --- a/repository/filesystem/tests/repository_filesystem_test.php +++ b/repository/filesystem/tests/repository_filesystem_test.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \repository_filesystem */ -class repository_filesystem_test extends \advanced_testcase { +final class repository_filesystem_test extends \advanced_testcase { public function test_get_listing(): void { global $CFG; diff --git a/repository/flickr/tests/privacy/provider_test.php b/repository/flickr/tests/privacy/provider_test.php index ebb4ccbad40..9a53c66ee85 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 30612363bd2..3c60a23be3c 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 2af91467ab4..c6fc8e17ecc 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 fd49b64ea77..8dadb1b37d9 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 34502e55623..c2384f6b65d 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 79584fe8ecc..4b54099a2b0 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 d79c84ff3ac..e8a5301fbde 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 e787852c6e5..dc8ad1d85c0 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 df11a0f0c8c..4f862a497a7 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 291adbdf5fc..866937eb5ec 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 560ae6f7d44..2a25eb3b10c 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 5b71b4aa236..a2d53c1fbbc 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 e7d8aef6bc5..5b6fd71d2f5 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 75c69e13a4a..f96da73069b 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 ca8a3612ac9..2e96c701ace 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 7fa21c90105..42b074b112b 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 b78ff9d96dd..feff8fa169c 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 { /** @var \search_simpledb\engine database engine. */ protected $engine; diff --git a/search/engine/solr/tests/privacy/provider_test.php b/search/engine/solr/tests/privacy/provider_test.php index 7c7f361a478..fc8d122d239 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 e9f5e5f4465..74de9e20c3a 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 48f501686fd..0c909d89fcb 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 2b30d9b6821..0828b32b69e 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 4b93836ded0..ed552a54a04 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 b0d8fe33b0a..1aac754c53b 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 170bd19f5fa..2c51b9c6336 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 08059b820a9..774d6eb5a03 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 d66076164ed..e678cd1dbb8 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/get_results_test.php b/search/tests/external/get_results_test.php index 414c212e359..1585736e533 100644 --- a/search/tests/external/get_results_test.php +++ b/search/tests/external/get_results_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\external\get_results */ -class get_results_test extends \externallib_advanced_testcase { +final class get_results_test extends \externallib_advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/external/get_search_areas_list_test.php b/search/tests/external/get_search_areas_list_test.php index 8ed8bb7492c..ad6a1cc4573 100644 --- a/search/tests/external/get_search_areas_list_test.php +++ b/search/tests/external/get_search_areas_list_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\external\get_search_areas_list */ -class get_search_areas_list_test extends \externallib_advanced_testcase { +final class get_search_areas_list_test extends \externallib_advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/external/get_top_results_test.php b/search/tests/external/get_top_results_test.php index 8e034d2f3c7..bcefcc543ea 100644 --- a/search/tests/external/get_top_results_test.php +++ b/search/tests/external/get_top_results_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\external\get_top_results */ -class get_top_results_test extends \externallib_advanced_testcase { +final class get_top_results_test extends \externallib_advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/external/view_results_test.php b/search/tests/external/view_results_test.php index 76ba009833d..d2f74641d94 100644 --- a/search/tests/external/view_results_test.php +++ b/search/tests/external/view_results_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\external\view_results */ -class view_results_test extends \externallib_advanced_testcase { +final class view_results_test extends \externallib_advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/external_test.php b/search/tests/external_test.php index b6ca543d78f..4022d21de06 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 be0ebe5da9e..8b7209475a8 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 081630861b6..cfa2d1e8c69 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 7a69a8f846d..795182f3ffb 100644 --- a/search/tests/top_result_test.php +++ b/search/tests/top_result_test.php @@ -32,7 +32,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 6a7fe02f836..1912b72db88 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 d308df958b7..fd2ce78e83e 100644 --- a/tag/tests/external/external_test.php +++ b/tag/tests/external/external_test.php @@ -34,7 +34,7 @@ global $CFG; 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 a07b1bb5606..502107eea05 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 417feb9d9ff..0350ed6cf04 100644 --- a/tag/tests/reportbuilder/datasource/tags_test.php +++ b/tag/tests/reportbuilder/datasource/tags_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 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 96206f69bf4..01d2b7bbdff 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 0afb84eab4f..2368d07c396 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 8be3e307313..e1e08da2b32 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 0d57b8f76d7..a1c82a94486 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 b8653d2120a..3f2454dc33a 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/checkbox/tests/profile_field_checkbox_test.php b/user/profile/field/checkbox/tests/profile_field_checkbox_test.php index d008e859519..ff24aece141 100644 --- a/user/profile/field/checkbox/tests/profile_field_checkbox_test.php +++ b/user/profile/field/checkbox/tests/profile_field_checkbox_test.php @@ -27,7 +27,7 @@ use profile_field_checkbox; * @copyright 2024 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profile_field_checkbox_test extends advanced_testcase { +final class profile_field_checkbox_test extends advanced_testcase { /** * Load required test libraries diff --git a/user/profile/field/datetime/tests/privacy/provider_test.php b/user/profile/field/datetime/tests/privacy/provider_test.php index 28d2209db98..717d6a124da 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 673b2944d2b..551af6f6b18 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 790079af343..1beaf6b352e 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 23a987f798d..2e1dee73df6 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 e7ec984728f..2c6a7d625f2 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 54e81178ffc..210f0af151c 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 337a01280f8..fd6d9244e75 100644 --- a/user/tests/devicekey_test.php +++ b/user/tests/devicekey_test.php @@ -24,7 +24,7 @@ use stdClass; * @package core_user * @covers \core_user\devicekey */ -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 f09d87f42a2..71ff93407f0 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 b4badbcb0e3..fbb458ad93a 100644 --- a/user/tests/external/update_user_device_public_key_test.php +++ b/user/tests/external/update_user_device_public_key_test.php @@ -25,7 +25,7 @@ use stdClass; * @package core_user * @covers \core_user\external\update_user_device_public_key */ -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 240ddfb7989..5d4ce905861 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 9235ecd719b..9ab5b06874a 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 c5fece62fcb..5c0af1bde88 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/privacy/provider_test.php b/user/tests/privacy/provider_test.php index 21b5d2564ab..15e91d52d9e 100644 --- a/user/tests/privacy/provider_test.php +++ b/user/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . "/user/lib.php"); * @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 { /** * Check that context information is returned correctly. diff --git a/user/tests/profilelib_test.php b/user/tests/profilelib_test.php index 444652fbf49..bbc545cf1c6 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/reportbuilder/datasource/users_test.php b/user/tests/reportbuilder/datasource/users_test.php index 29e6d45a374..2ec13c08208 100644 --- a/user/tests/reportbuilder/datasource/users_test.php +++ b/user/tests/reportbuilder/datasource/users_test.php @@ -40,7 +40,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 users_test extends core_reportbuilder_testcase { +final class users_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/user/tests/search/search_test.php b/user/tests/search/search_test.php index 8bbebdcbfdd..4f3a663d09a 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 19c51c12cb9..8780046f336 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 9a8fd072881..6a8e3705960 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 d18778f5660..065bc91e449 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 07c89c77f93..3c0d0af0555 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 899a51d6f7f..3b128b6f1e6 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/externallib_test.php b/webservice/tests/externallib_test.php index 9dbce930e0b..e4daf7732c4 100644 --- a/webservice/tests/externallib_test.php +++ b/webservice/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2012 Paul Charsley * @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 { public function setUp(): void { // Calling parent is good, always diff --git a/webservice/tests/lib_test.php b/webservice/tests/lib_test.php index 010f7506f63..c16bb71734a 100644 --- a/webservice/tests/lib_test.php +++ b/webservice/tests/lib_test.php @@ -43,7 +43,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.