diff --git a/admin/presets/tests/generator_test.php b/admin/presets/tests/generator_test.php index a8bef76ceed..8c5d6b9d92e 100644 --- a/admin/presets/tests/generator_test.php +++ b/admin/presets/tests/generator_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass core_adminpresets_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Test the behaviour of create_preset() method. diff --git a/admin/presets/tests/helper_test.php b/admin/presets/tests/helper_test.php index eea7ddc2595..4acb34cb839 100644 --- a/admin/presets/tests/helper_test.php +++ b/admin/presets/tests/helper_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test the behaviour of create_preset() method. diff --git a/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php b/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php index 4f6a59a5a65..a040691bb44 100644 --- a/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php +++ b/admin/presets/tests/local/setting/adminpresets_admin_setting_bloglevel_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_bloglevel */ -class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase { +final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php b/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php index de2f2159800..ba0c9f8b460 100644 --- a/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php +++ b/admin/presets/tests/local/setting/adminpresets_admin_setting_sitesettext_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext */ -class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase { +final class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/local/setting/adminpresets_setting_test.php b/admin/presets/tests/local/setting/adminpresets_setting_test.php index e57dbb9ed0e..b44e7f4f3e0 100644 --- a/admin/presets/tests/local/setting/adminpresets_setting_test.php +++ b/admin/presets/tests/local/setting/adminpresets_setting_test.php @@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\local\setting\adminpresets_setting */ -class adminpresets_setting_test extends \advanced_testcase { +final class adminpresets_setting_test extends \advanced_testcase { /** * Test the behaviour of save_value() method. diff --git a/admin/presets/tests/manager_test.php b/admin/presets/tests/manager_test.php index ba69733a3ee..77425d4c6ab 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 fb2bfbdc9c0..dc9020aeb78 100644 --- a/admin/presets/tests/privacy/privacy_provider_test.php +++ b/admin/presets/tests/privacy/privacy_provider_test.php @@ -30,7 +30,7 @@ use core_privacy\tests\provider_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_adminpresets\privacy\provider */ -class privacy_provider_test extends provider_testcase { +final class privacy_provider_test extends provider_testcase { /** * Test for provider::get_metadata(). diff --git a/admin/roles/tests/preset_test.php b/admin/roles/tests/preset_test.php index 370a3e2de80..b00b26ccd12 100644 --- a/admin/roles/tests/preset_test.php +++ b/admin/roles/tests/preset_test.php @@ -26,8 +26,8 @@ use core_role_preset; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class preset_test extends \advanced_testcase { - public function test_xml() { +final class preset_test extends \advanced_testcase { + public function test_xml(): void { global $DB; $roles = $DB->get_records('role'); diff --git a/admin/roles/tests/privacy/provider_test.php b/admin/roles/tests/privacy/provider_test.php index 4846ac74b5e..b3ba4b56877 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/tool/admin_presets/tests/event/preset_deleted_test.php b/admin/tool/admin_presets/tests/event/preset_deleted_test.php index 0f4a4928a98..78925b3b821 100644 --- a/admin/tool/admin_presets/tests/event/preset_deleted_test.php +++ b/admin/tool/admin_presets/tests/event/preset_deleted_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_deleted */ -class preset_deleted_test extends \advanced_testcase { +final class preset_deleted_test extends \advanced_testcase { /** * Test preset_deleted event. diff --git a/admin/tool/admin_presets/tests/event/preset_downloaded_test.php b/admin/tool/admin_presets/tests/event/preset_downloaded_test.php index dba509b7897..395862f84ed 100644 --- a/admin/tool/admin_presets/tests/event/preset_downloaded_test.php +++ b/admin/tool/admin_presets/tests/event/preset_downloaded_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_downloaded */ -class preset_downloaded_test extends \advanced_testcase { +final class preset_downloaded_test extends \advanced_testcase { /** * Test preset_downloaded event. diff --git a/admin/tool/admin_presets/tests/event/preset_exported_test.php b/admin/tool/admin_presets/tests/event/preset_exported_test.php index 2f3d8e9d6db..60ca5063e8a 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 6d290895e57..588402b694e 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 455e3beb790..1374d70b1e3 100644 --- a/admin/tool/admin_presets/tests/event/preset_loaded_test.php +++ b/admin/tool/admin_presets/tests/event/preset_loaded_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_loaded */ -class preset_loaded_test extends \advanced_testcase { +final class preset_loaded_test extends \advanced_testcase { /** * Test preset_loaded event. diff --git a/admin/tool/admin_presets/tests/event/preset_previewed_test.php b/admin/tool/admin_presets/tests/event/preset_previewed_test.php index 2a27ca117eb..473e1843ba1 100644 --- a/admin/tool/admin_presets/tests/event/preset_previewed_test.php +++ b/admin/tool/admin_presets/tests/event/preset_previewed_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\preset_previewed */ -class preset_previewed_test extends \advanced_testcase { +final class preset_previewed_test extends \advanced_testcase { /** * Test preset_previewed event. diff --git a/admin/tool/admin_presets/tests/event/preset_reverted_test.php b/admin/tool/admin_presets/tests/event/preset_reverted_test.php index 9dfe8d9f377..4bb94a741df 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 5fe3c8429fa..f6faf5a55bd 100644 --- a/admin/tool/admin_presets/tests/event/presets_listed_test.php +++ b/admin/tool/admin_presets/tests/event/presets_listed_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \tool_admin_presets\event\presets_listed */ -class presets_listed_test extends \advanced_testcase { +final class presets_listed_test extends \advanced_testcase { /** * Test presets_listed event. diff --git a/admin/tool/admin_presets/tests/local/action/base_test.php b/admin/tool/admin_presets/tests/local/action/base_test.php index de2b8354057..50d437f895d 100644 --- a/admin/tool/admin_presets/tests/local/action/base_test.php +++ b/admin/tool/admin_presets/tests/local/action/base_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\base */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** * Test the behaviour of log() method. diff --git a/admin/tool/admin_presets/tests/local/action/delete_test.php b/admin/tool/admin_presets/tests/local/action/delete_test.php index 4b808394102..95b47007d15 100644 --- a/admin/tool/admin_presets/tests/local/action/delete_test.php +++ b/admin/tool/admin_presets/tests/local/action/delete_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\delete */ -class delete_test extends \advanced_testcase { +final class delete_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/export_test.php b/admin/tool/admin_presets/tests/local/action/export_test.php index 0a7660b7939..0a1ae11dc73 100644 --- a/admin/tool/admin_presets/tests/local/action/export_test.php +++ b/admin/tool/admin_presets/tests/local/action/export_test.php @@ -27,7 +27,7 @@ use core_adminpresets\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\export */ -class export_test extends \advanced_testcase { +final class export_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/import_test.php b/admin/tool/admin_presets/tests/local/action/import_test.php index 9369100a93b..09f10a43314 100644 --- a/admin/tool/admin_presets/tests/local/action/import_test.php +++ b/admin/tool/admin_presets/tests/local/action/import_test.php @@ -27,7 +27,7 @@ use core_adminpresets\manager; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\import */ -class import_test extends \advanced_testcase { +final class import_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/admin_presets/tests/local/action/load_test.php b/admin/tool/admin_presets/tests/local/action/load_test.php index 459203899ed..937c61eb354 100644 --- a/admin/tool/admin_presets/tests/local/action/load_test.php +++ b/admin/tool/admin_presets/tests/local/action/load_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\load */ -class load_test extends \advanced_testcase { +final class load_test extends \advanced_testcase { /** * Test the behaviour of show() method when the preset id doesn't exist. diff --git a/admin/tool/admin_presets/tests/local/action/rollback_test.php b/admin/tool/admin_presets/tests/local/action/rollback_test.php index 52cb6e49f97..d0742b3932c 100644 --- a/admin/tool/admin_presets/tests/local/action/rollback_test.php +++ b/admin/tool/admin_presets/tests/local/action/rollback_test.php @@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_admin_presets\local\action\rollback */ -class rollback_test extends \advanced_testcase { +final class rollback_test extends \advanced_testcase { /** * Test the behaviour of execute() method. diff --git a/admin/tool/analytics/tests/external/external_test.php b/admin/tool/analytics/tests/external/external_test.php index fd1fc45e0dc..3e880d9a173 100644 --- a/admin/tool/analytics/tests/external/external_test.php +++ b/admin/tool/analytics/tests/external/external_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/analytics/tests/fixtures/test_target_course_level * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { /** * test_potential_contexts description diff --git a/admin/tool/behat/tests/behat_form_text_test.php b/admin/tool/behat/tests/behat_form_text_test.php index 2ec6720aa38..80148deb7cf 100644 --- a/admin/tool/behat/tests/behat_form_text_test.php +++ b/admin/tool/behat/tests/behat_form_text_test.php @@ -46,7 +46,7 @@ require_once($CFG->libdir . '/behat/form_field/behat_form_text.php'); * @covers \behat_form_text * @covers \behat_form_field */ -class behat_form_text_test extends \basic_testcase { +final class behat_form_text_test extends \basic_testcase { /** * Data provider for the test_set_get_value() method. diff --git a/admin/tool/behat/tests/external/get_entity_generator_test.php b/admin/tool/behat/tests/external/get_entity_generator_test.php index 5ab04fd041e..829ab904f9e 100644 --- a/admin/tool/behat/tests/external/get_entity_generator_test.php +++ b/admin/tool/behat/tests/external/get_entity_generator_test.php @@ -30,7 +30,7 @@ namespace tool_behat\external; * * @covers \tool_behat\external\get_entity_generator */ -class get_entity_generator_test extends \advanced_testcase { +final class get_entity_generator_test extends \advanced_testcase { /** * Log in as admin diff --git a/admin/tool/behat/tests/manager_util_test.php b/admin/tool/behat/tests/manager_util_test.php index 5bb6627231c..7fe02d5a221 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 21cb64d8f5e..c9c1c1de3b2 100644 --- a/admin/tool/brickfield/tests/accessibility_test.php +++ b/admin/tool/brickfield/tests/accessibility_test.php @@ -26,7 +26,7 @@ use tool_brickfield\local\tool\filter; * @author Jay Churchward (jay@brickfieldlabs.ie) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class accessibility_test extends \advanced_testcase { +final class accessibility_test extends \advanced_testcase { /** * Test get_title(). diff --git a/admin/tool/brickfield/tests/area_test.php b/admin/tool/brickfield/tests/area_test.php index 6e88895c10a..14643f5adae 100644 --- a/admin/tool/brickfield/tests/area_test.php +++ b/admin/tool/brickfield/tests/area_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/admin/tool/brickfield/tests/area_test_base.php'); * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class area_test extends area_test_base { +final class area_test extends area_test_base { /** * Test for the area assign intro */ diff --git a/admin/tool/brickfield/tests/filters_test.php b/admin/tool/brickfield/tests/filters_test.php index edb5cde5b33..2fe78a5f2d6 100644 --- a/admin/tool/brickfield/tests/filters_test.php +++ b/admin/tool/brickfield/tests/filters_test.php @@ -26,8 +26,8 @@ use tool_brickfield\local\tool\filter; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filters_test extends \advanced_testcase { - public function test_constructor() { +final class filters_test extends \advanced_testcase { + public function test_constructor(): void { $this->resetAfterTest(); // Variables. diff --git a/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php b/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php index 30d7c842384..26b27b5ba3f 100644 --- a/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php +++ b/admin/tool/brickfield/tests/local/areas/core_question/questionanswers_test.php @@ -23,7 +23,7 @@ namespace tool_brickfield\local\areas\core_question; * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionanswers_test extends \advanced_testcase { +final class questionanswers_test extends \advanced_testcase { /** * Set up before class. diff --git a/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php b/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php index 4e90f2f932d..99e8ba98ad6 100644 --- a/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php +++ b/admin/tool/brickfield/tests/local/areas/core_question/questiontext_test.php @@ -30,7 +30,7 @@ use tool_brickfield\area_test_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \tool_brickfield\local\areas\core_question\base */ -class questiontext_test extends area_test_base { +final class questiontext_test extends area_test_base { /** * Set up before class. */ diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php index 2902dd9a6e1..19357b64f44 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_links_dont_open_new_window_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_links_dont_open_new_window_testcase */ -class a_links_dont_open_new_window_test extends all_checks { +final class a_links_dont_open_new_window_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_links_dont_open_new_window'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php index 840258a47b5..3c5a0b49a11 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_must_contain_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_must_contain_text_testcase */ -class a_must_contain_text_test extends all_checks { +final class a_must_contain_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_must_contain_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php index 61e55df229f..f43005394f4 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/a_suspicious_link_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class a_suspicious_link_text */ -class a_suspicious_link_text_test extends all_checks { +final class a_suspicious_link_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'a_suspicious_link_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php index 119acc2d7de..9445e37db57 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_dont_open_new_window_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class area_dont_open_new_window_testcase */ -class area_dont_open_new_window_test extends all_checks { +final class area_dont_open_new_window_test extends all_checks { /** @var string Check type */ protected $checktype = 'area_dont_open_new_window'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php index 216b24e6d89..df0729c1fb9 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/area_has_alt_value_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class area_has_alt_value_testcase */ -class area_has_alt_value_test extends all_checks { +final class area_has_alt_value_test extends all_checks { /** @var string Check type */ protected $checktype = 'area_has_alt_value'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php index e1bca45514f..7a667f83ec7 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/basefont_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class basefont_is_not_used_testcase */ -class basefont_is_not_used_test extends all_checks { +final class basefont_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'basefont_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php index 66a4ce965ac..22ed04817c1 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/blink_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class blink_is_not_used_testcase */ -class blink_is_not_used_test extends all_checks { +final class blink_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'blink_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php index a99978976b5..981cadec22c 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/bold_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class bold_is_not_used_testcase */ -class bold_is_not_used_test extends all_checks { +final class bold_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'bold_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php index a5a6702b1d1..f4f564c9d45 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/content_too_long_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class content_too_long_testcase */ -class content_too_long_test extends all_checks { +final class content_too_long_test extends all_checks { /** @var string Check type */ protected $checktype = 'content_too_long'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php index 64e283f91d1..d60884df2fb 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/embed_has_associated_no_embed_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class embed_has_associated_no_embed_testcase */ -class embed_has_associated_no_embed_test extends all_checks { +final class embed_has_associated_no_embed_test extends all_checks { /** @var string Check type */ protected $checktype = 'embed_has_associated_no_embed'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php index 2941ebe595c..b03c887e3ff 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/header_h3_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class header_h3_testcase */ -class header_h3_test extends all_checks { +final class header_h3_test extends all_checks { /** @var string Check type */ protected $checktype = 'header_h3'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php index 43b55534f77..5118bdb0687 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/headers_have_text_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class headers_have_text_testcase */ -class headers_have_text_test extends all_checks { +final class headers_have_text_test extends all_checks { /** @var string Check type */ protected $checktype = 'headers_have_text'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php index 29bea3ea8be..fbf198cbd08 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/i_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class i_is_not_used_testcase */ -class i_is_not_used_test extends all_checks { +final class i_is_not_used_test extends all_checks { /** @var string Check type */ protected $checktype = 'i_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php index c9c420bc8d5..c33c100aa11 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_different_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_is_different_testcase */ -class img_alt_is_different_test extends all_checks { +final class img_alt_is_different_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_is_different'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php index c5ab718e4d7..b3f17d0e1fa 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_is_too_long_testcase */ -class img_alt_is_too_long_test extends all_checks { +final class img_alt_is_too_long_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_is_too_long'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php index ecfeb860d9b..e92f806a92a 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_empty_in_anchor_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_not_empty_in_anchor_testcase */ -class img_alt_not_empty_in_anchor_test extends all_checks { +final class img_alt_not_empty_in_anchor_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_not_empty_in_anchor'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php index 85fd7f5a0c2..2e89145c3f1 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_not_place_holder_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_alt_not_placeholder_testcase */ -class img_alt_not_place_holder_test extends all_checks { +final class img_alt_not_place_holder_test extends all_checks { /** @var string Check type */ protected $checktype = 'img_alt_not_place_holder'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php index 14d9941f6d9..aa2df0b3fbd 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_has_alt_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class test_css_text_has_contrast_testcase */ -class img_has_alt_test extends all_checks { +final class img_has_alt_test extends all_checks { /** @var string Check type */ public $checktype = 'img_has_alt'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php index 991742a627c..a89002955d8 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_with_map_has_use_map_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class img_with_map_has_use_map_test */ -class img_with_map_has_use_map_test extends all_checks { +final class img_with_map_has_use_map_test extends all_checks { /** @var string Check type */ public $checktype = 'img_with_map_has_use_map'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php index 76a631f2fbc..73f35d41d30 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/legend_text_not_empty_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class legend_text_not_empty_test */ -class legend_text_not_empty_test extends all_checks { +final class legend_text_not_empty_test extends all_checks { /** @var string Check type */ public $checktype = 'legend_text_not_empty'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php index 3730b03e22a..b1d6794173c 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/no_headings_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class no_headings_test */ -class no_headings_test extends all_checks { +final class no_headings_test extends all_checks { /** @var string Check type */ public $checktype = 'no_headings'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php index f560f92aecf..e5dc312a16f 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_embed_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_embeded_test */ -class object_must_have_embed_test extends all_checks { +final class object_must_have_embed_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_embed'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php index 7235169afdd..8b6f6cf4593 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_title_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_title_test */ -class object_must_have_title_test extends all_checks { +final class object_must_have_title_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_title'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php index 17498863a0d..9670292a23d 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/object_must_have_valid_title_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class object_must_have_valid_title_test */ -class object_must_have_valid_title_test extends all_checks { +final class object_must_have_valid_title_test extends all_checks { /** @var string Check type */ public $checktype = 'object_must_have_valid_title'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php index 2d89dbc5d89..f07b25df7aa 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/strike_is_not_used_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class strike_is_not_used_testcase */ -class strike_is_not_used_test extends all_checks { +final class strike_is_not_used_test extends all_checks { /** @var string Check type */ public $checktype = 'strike_is_not_used'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php index ba703684ff8..1896743aa32 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_data_should_have_th_test */ -class table_data_should_have_th_test extends all_checks { +final class table_data_should_have_th_test extends all_checks { /** @var string Check type */ public $checktype = 'table_data_should_have_th'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php index 03df83ff36a..d1288a94dd3 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_summary_does_not_duplicate_caption_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_summary_does_not_duplicate_caption_test */ -class table_summary_does_not_duplicate_caption_test extends all_checks { +final class table_summary_does_not_duplicate_caption_test extends all_checks { /** @var string Check type */ public $checktype = 'table_summary_does_not_duplicate_caption'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php index 11c7b087040..cf4298330b8 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_td_should_not_merge_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_td_should_not_merge_test */ -class table_td_should_not_merge_test extends all_checks { +final class table_td_should_not_merge_test extends all_checks { /** @var string Check type */ public $checktype = 'table_td_should_not_merge'; diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php index 709fb4edef0..da128fd4eb3 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_th_should_have_scope_test.php @@ -31,7 +31,7 @@ require_once('all_checks.php'); /** * Class table_th_should_have_scope_test */ -class table_th_should_have_scope_test extends all_checks { +final class table_th_should_have_scope_test extends all_checks { /** @var string Check type */ public $checktype = 'table_th_should_have_scope'; diff --git a/admin/tool/brickfield/tests/local/tool/activityresults_test.php b/admin/tool/brickfield/tests/local/tool/activityresults_test.php index badaf54fd45..b35f5faf82f 100644 --- a/admin/tool/brickfield/tests/local/tool/activityresults_test.php +++ b/admin/tool/brickfield/tests/local/tool/activityresults_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activityresults_test extends \advanced_testcase { +final class activityresults_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php b/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php index e79bab3eafa..e4806c980af 100644 --- a/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php +++ b/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class checktyperesults_test extends \advanced_testcase { +final class checktyperesults_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/errors_test.php b/admin/tool/brickfield/tests/local/tool/errors_test.php index dd78e10facc..80980735390 100644 --- a/admin/tool/brickfield/tests/local/tool/errors_test.php +++ b/admin/tool/brickfield/tests/local/tool/errors_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class errors_test extends \advanced_testcase { +final class errors_test extends \advanced_testcase { public function test_toolname() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/local/tool/printable_test.php b/admin/tool/brickfield/tests/local/tool/printable_test.php index ca8300b7cc0..eee557a8188 100644 --- a/admin/tool/brickfield/tests/local/tool/printable_test.php +++ b/admin/tool/brickfield/tests/local/tool/printable_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class printable_test extends \advanced_testcase { +final class printable_test extends \advanced_testcase { /** * Test tool name. diff --git a/admin/tool/brickfield/tests/manager_test.php b/admin/tool/brickfield/tests/manager_test.php index 9e01f9ddeb6..702052a1850 100644 --- a/admin/tool/brickfield/tests/manager_test.php +++ b/admin/tool/brickfield/tests/manager_test.php @@ -23,7 +23,7 @@ namespace tool_brickfield; * @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Tests for the function manager::get_all_areas() diff --git a/admin/tool/brickfield/tests/registration_test.php b/admin/tool/brickfield/tests/registration_test.php index 6015eba03bf..1800b6261a0 100644 --- a/admin/tool/brickfield/tests/registration_test.php +++ b/admin/tool/brickfield/tests/registration_test.php @@ -28,7 +28,7 @@ namespace tool_brickfield; * Unit tests for {@registration tool_brickfield\registration.php}. * @group tool_brickfield */ -class registration_test extends \advanced_testcase { +final class registration_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; diff --git a/admin/tool/brickfield/tests/scheduler_test.php b/admin/tool/brickfield/tests/scheduler_test.php index 07fc7d6dc22..f5207486a02 100644 --- a/admin/tool/brickfield/tests/scheduler_test.php +++ b/admin/tool/brickfield/tests/scheduler_test.php @@ -24,7 +24,7 @@ namespace tool_brickfield; * @author Jay Churchward (jay@brickfieldlabs.ie) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scheduler_test extends \advanced_testcase { +final class scheduler_test extends \advanced_testcase { public function test_request_analysis() { $this->resetAfterTest(); diff --git a/admin/tool/brickfield/tests/tool_test.php b/admin/tool/brickfield/tests/tool_test.php index 1144e766837..9e592f9cf1f 100644 --- a/admin/tool/brickfield/tests/tool_test.php +++ b/admin/tool/brickfield/tests/tool_test.php @@ -27,7 +27,7 @@ use tool_brickfield\local\tool\tool; * @author Jay Churchward (jay.churchward@poetopensource.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_test extends \advanced_testcase { +final class tool_test extends \advanced_testcase { /** @var string base 64 image */ protected static string $base64img = <<dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php' /** * Tests for the capability overview helper functions. */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Test the function that gets the data - simple case. diff --git a/admin/tool/cohortroles/tests/api_test.php b/admin/tool/cohortroles/tests/api_test.php index 08ca2061e22..e6e7aae387e 100644 --- a/admin/tool/cohortroles/tests/api_test.php +++ b/admin/tool/cohortroles/tests/api_test.php @@ -23,7 +23,7 @@ namespace tool_cohortroles; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** @var \stdClass $cohort */ protected $cohort = null; diff --git a/admin/tool/cohortroles/tests/privacy/provider_test.php b/admin/tool/cohortroles/tests/privacy/provider_test.php index deb05db61fa..301d5d6e832 100644 --- a/admin/tool/cohortroles/tests/privacy/provider_test.php +++ b/admin/tool/cohortroles/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/admin/tool/customlang/tests/local/mlang/langstring_test.php b/admin/tool/customlang/tests/local/mlang/langstring_test.php index 17f72da2b1c..da4fe405e94 100644 --- a/admin/tool/customlang/tests/local/mlang/langstring_test.php +++ b/admin/tool/customlang/tests/local/mlang/langstring_test.php @@ -36,7 +36,7 @@ use moodle_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class langstring_test extends advanced_testcase { +final class langstring_test extends advanced_testcase { /** * Sanity 1.x string diff --git a/admin/tool/customlang/tests/local/mlang/phpparser_test.php b/admin/tool/customlang/tests/local/mlang/phpparser_test.php index fe6e6bce28d..5835b470203 100644 --- a/admin/tool/customlang/tests/local/mlang/phpparser_test.php +++ b/admin/tool/customlang/tests/local/mlang/phpparser_test.php @@ -34,7 +34,7 @@ use moodle_exception; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class phpparser_test extends advanced_testcase { +final class phpparser_test extends advanced_testcase { /** diff --git a/admin/tool/dataprivacy/tests/api_test.php b/admin/tool/dataprivacy/tests/api_test.php index 4d0a8fbcea2..8cf9f36e406 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 cc234cb134d..eadf99db67c 100644 --- a/admin/tool/dataprivacy/tests/data_registry_test.php +++ b/admin/tool/dataprivacy/tests/data_registry_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_registry_test extends \advanced_testcase { +final class data_registry_test extends \advanced_testcase { /** * Ensure that the get_effective_context_value only errors if provided an inappropriate element. diff --git a/admin/tool/dataprivacy/tests/data_request_test.php b/admin/tool/dataprivacy/tests/data_request_test.php index a0f5ebcb177..7250491b9b3 100644 --- a/admin/tool/dataprivacy/tests/data_request_test.php +++ b/admin/tool/dataprivacy/tests/data_request_test.php @@ -28,7 +28,7 @@ require_once('data_privacy_testcase.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_request_test extends data_privacy_testcase { +final class data_request_test extends data_privacy_testcase { /** * Data provider for testing is_resettable, and is_active. diff --git a/admin/tool/dataprivacy/tests/expired_contexts_test.php b/admin/tool/dataprivacy/tests/expired_contexts_test.php index 91add391e99..da3ae12cbf3 100644 --- a/admin/tool/dataprivacy/tests/expired_contexts_test.php +++ b/admin/tool/dataprivacy/tests/expired_contexts_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class expired_contexts_test extends \advanced_testcase { +final class expired_contexts_test extends \advanced_testcase { /** * Setup the basics with the specified retention period. diff --git a/admin/tool/dataprivacy/tests/external/external_test.php b/admin/tool/dataprivacy/tests/external/external_test.php index 3c15c55b054..9eff2116805 100644 --- a/admin/tool/dataprivacy/tests/external/external_test.php +++ b/admin/tool/dataprivacy/tests/external/external_test.php @@ -42,7 +42,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 06d21dd596b..81c89076ddb 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 216cbfbaa85..82ff3c07e57 100644 --- a/admin/tool/dataprivacy/tests/filtered_userlist_test.php +++ b/admin/tool/dataprivacy/tests/filtered_userlist_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filtered_userlist_test extends \advanced_testcase { +final class filtered_userlist_test extends \advanced_testcase { /** * Test the apply_expired_contexts_filters function with arange of options. * diff --git a/admin/tool/dataprivacy/tests/manager_observer_test.php b/admin/tool/dataprivacy/tests/manager_observer_test.php index de898abf7d0..9a922042ac9 100644 --- a/admin/tool/dataprivacy/tests/manager_observer_test.php +++ b/admin/tool/dataprivacy/tests/manager_observer_test.php @@ -28,7 +28,7 @@ require_once('data_privacy_testcase.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_observer_test extends data_privacy_testcase { +final class manager_observer_test extends data_privacy_testcase { /** * Ensure that when users are configured as DPO, they are sent an message upon failure. */ diff --git a/admin/tool/dataprivacy/tests/metadata_registry_test.php b/admin/tool/dataprivacy/tests/metadata_registry_test.php index 2288507e745..fab74772be6 100644 --- a/admin/tool/dataprivacy/tests/metadata_registry_test.php +++ b/admin/tool/dataprivacy/tests/metadata_registry_test.php @@ -23,7 +23,7 @@ namespace tool_dataprivacy; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class metadata_registry_test extends \advanced_testcase { +final class metadata_registry_test extends \advanced_testcase { /** * Fetch the meta data and return it in a form that we can easily unit test. diff --git a/admin/tool/dataprivacy/tests/privacy/provider_test.php b/admin/tool/dataprivacy/tests/privacy/provider_test.php index 97397816505..5e1243f66e9 100644 --- a/admin/tool/dataprivacy/tests/privacy/provider_test.php +++ b/admin/tool/dataprivacy/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use tool_dataprivacy\privacy\provider; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test provider get_contexts_for_userid method diff --git a/admin/tool/dataprivacy/tests/task/task_test.php b/admin/tool/dataprivacy/tests/task/task_test.php index 87e82d103d5..d745759da9d 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 f5839891c47..4d4dce750c1 100644 --- a/admin/tool/dataprivacy/tests/user_deleted_observer_test.php +++ b/admin/tool/dataprivacy/tests/user_deleted_observer_test.php @@ -25,7 +25,7 @@ use tool_dataprivacy\event\user_deleted_observer; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_deleted_observer_test extends \advanced_testcase { +final class user_deleted_observer_test extends \advanced_testcase { /** * Ensure that a delete data request is created upon user deletion. diff --git a/admin/tool/filetypes/tests/tool_filetypes_test.php b/admin/tool/filetypes/tests/tool_filetypes_test.php index 348757f63cd..a7351138d21 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/maketestcourse_test.php b/admin/tool/generator/tests/maketestcourse_test.php index 6960dd2c294..93b4b3b56da 100644 --- a/admin/tool/generator/tests/maketestcourse_test.php +++ b/admin/tool/generator/tests/maketestcourse_test.php @@ -26,7 +26,7 @@ use tool_generator_course_backend; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class maketestcourse_test extends \advanced_testcase { +final class maketestcourse_test extends \advanced_testcase { /** * Creates a small test course and checks all the components have been put in place. */ diff --git a/admin/tool/generator/tests/maketestsite_test.php b/admin/tool/generator/tests/maketestsite_test.php index e345b16eeee..8fd09b9b342 100644 --- a/admin/tool/generator/tests/maketestsite_test.php +++ b/admin/tool/generator/tests/maketestsite_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2013 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class maketestsite_test extends \advanced_testcase { +final class maketestsite_test extends \advanced_testcase { /** * Checks that site courses shortnames are properly generated. diff --git a/admin/tool/httpsreplace/tests/httpsreplace_test.php b/admin/tool/httpsreplace/tests/httpsreplace_test.php index c02ca75a635..4cfd915a9b1 100644 --- a/admin/tool/httpsreplace/tests/httpsreplace_test.php +++ b/admin/tool/httpsreplace/tests/httpsreplace_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright Copyright (c) 2016 Blackboard Inc. (http://www.blackboard.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class httpsreplace_test extends \advanced_testcase { +final class httpsreplace_test extends \advanced_testcase { /** * Data provider for test_upgrade_http_links diff --git a/admin/tool/installaddon/tests/installer_test.php b/admin/tool/installaddon/tests/installer_test.php index 38d900669a4..d0c13ea9320 100644 --- a/admin/tool/installaddon/tests/installer_test.php +++ b/admin/tool/installaddon/tests/installer_test.php @@ -33,7 +33,7 @@ require_once(__DIR__.'/fixtures/testable_installer.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class installer_test extends \advanced_testcase { +final class installer_test extends \advanced_testcase { public function test_get_addons_repository_url() { $installer = testable_tool_installaddon_installer::instance(); diff --git a/admin/tool/langimport/tests/controller_test.php b/admin/tool/langimport/tests/controller_test.php index 008dd470dca..dea6ba0ff8a 100644 --- a/admin/tool/langimport/tests/controller_test.php +++ b/admin/tool/langimport/tests/controller_test.php @@ -25,7 +25,7 @@ namespace tool_langimport; * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class controller_test extends \advanced_testcase { +final class controller_test extends \advanced_testcase { /** * Test uninstall of language with invalid values. diff --git a/admin/tool/langimport/tests/event/events_test.php b/admin/tool/langimport/tests/event/events_test.php index e08d5d32c91..880b0284613 100644 --- a/admin/tool/langimport/tests/event/events_test.php +++ b/admin/tool/langimport/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace tool_langimport\event; * @copyright 2014 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/admin/tool/licensemanager/tests/helper_test.php b/admin/tool/licensemanager/tests/helper_test.php index 14c34c6a137..d23a9ac05e0 100644 --- a/admin/tool/licensemanager/tests/helper_test.php +++ b/admin/tool/licensemanager/tests/helper_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @group tool_licensemanager */ -class helper_test extends advanced_testcase { +final class helper_test extends advanced_testcase { public function test_convert_version_to_epoch() { diff --git a/admin/tool/licensemanager/tests/manager_test.php b/admin/tool/licensemanager/tests/manager_test.php index 2b9763c4ed4..605e887f142 100644 --- a/admin/tool/licensemanager/tests/manager_test.php +++ b/admin/tool/licensemanager/tests/manager_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/licenselib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @group tool_licensemanager */ -class manager_test extends advanced_testcase { +final class manager_test extends advanced_testcase { /** * Test editing a license. diff --git a/admin/tool/log/store/database/tests/privacy/provider_test.php b/admin/tool/log/store/database/tests/privacy/provider_test.php index 31d9f2bb328..5756efbbddc 100644 --- a/admin/tool/log/store/database/tests/privacy/provider_test.php +++ b/admin/tool/log/store/database/tests/privacy/provider_test.php @@ -49,7 +49,7 @@ require_once(__DIR__ . '/../fixtures/event.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/log/store/database/tests/store_test.php b/admin/tool/log/store/database/tests/store_test.php index 0a833172ce8..2f35d7ef154 100644 --- a/admin/tool/log/store/database/tests/store_test.php +++ b/admin/tool/log/store/database/tests/store_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/store.php'); * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \advanced_testcase { +final class store_test extends \advanced_testcase { /** * Tests log writing. * diff --git a/admin/tool/log/store/standard/tests/privacy/provider_test.php b/admin/tool/log/store/standard/tests/privacy/provider_test.php index 670039668e7..d5534eb58b1 100644 --- a/admin/tool/log/store/standard/tests/privacy/provider_test.php +++ b/admin/tool/log/store/standard/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once(__DIR__ . '/../fixtures/event.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/admin/tool/log/store/standard/tests/store_test.php b/admin/tool/log/store/standard/tests/store_test.php index dad69f335f4..a0b73df16ef 100644 --- a/admin/tool/log/store/standard/tests/store_test.php +++ b/admin/tool/log/store/standard/tests/store_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/restore_hack.php'); * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \advanced_testcase { +final class store_test extends \advanced_testcase { /** * @var bool Determine if we disabled the GC, so it can be re-enabled in tearDown. */ diff --git a/admin/tool/log/tests/manager_test.php b/admin/tool/log/tests/manager_test.php index a9fb357117a..f41edf3ca33 100644 --- a/admin/tool/log/tests/manager_test.php +++ b/admin/tool/log/tests/manager_test.php @@ -23,8 +23,8 @@ namespace tool_log; * @copyright 2014 Petr Skoda {@link http://skodak.org/} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { - public function test_get_log_manager() { +final class manager_test extends \advanced_testcase { + public function test_get_log_manager(): void { global $CFG; $this->resetAfterTest(); diff --git a/admin/tool/log/tests/privacy/provider_test.php b/admin/tool/log/tests/privacy/provider_test.php index 0d078ee1c1c..c892616bb2e 100644 --- a/admin/tool/log/tests/privacy/provider_test.php +++ b/admin/tool/log/tests/privacy/provider_test.php @@ -50,7 +50,7 @@ require_once($CFG->dirroot . '/admin/tool/log/store/standard/tests/fixtures/even * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/admin/tool/lp/tests/externallib_test.php b/admin/tool/lp/tests/externallib_test.php index cefd95248c0..e6a056d3e97 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 976381df63f..5d32bde5dd8 100644 --- a/admin/tool/lpimportcsv/tests/import_test.php +++ b/admin/tool/lpimportcsv/tests/import_test.php @@ -25,7 +25,7 @@ use core_competency\api; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_test extends \advanced_testcase { +final class import_test extends \advanced_testcase { public function test_import_framework() { $this->resetAfterTest(true); diff --git a/admin/tool/lpmigrate/tests/processor_test.php b/admin/tool/lpmigrate/tests/processor_test.php index 5d1c427ba7b..f6c3fa0d0e6 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 41045357c65..ae4b18fdedd 100644 --- a/admin/tool/messageinbound/tests/manager_test.php +++ b/admin/tool/messageinbound/tests/manager_test.php @@ -31,7 +31,7 @@ use tool_messageinbound\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends provider_testcase { +final class manager_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/messageinbound/tests/privacy/provider_test.php b/admin/tool/messageinbound/tests/privacy/provider_test.php index 9feca9ad908..a01c5cc552f 100644 --- a/admin/tool/messageinbound/tests/privacy/provider_test.php +++ b/admin/tool/messageinbound/tests/privacy/provider_test.php @@ -45,7 +45,7 @@ use tool_messageinbound\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $CFG; diff --git a/admin/tool/mfa/factor/cohort/tests/factor_test.php b/admin/tool/mfa/factor/cohort/tests/factor_test.php index 08bf79df398..31d4a008869 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 e0923555e70..ce2ba651114 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 140f29b7b26..8de9caba0ea 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 ec89a97aced..3c414f34070 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/token/tests/factor_test.php b/admin/tool/mfa/factor/token/tests/factor_test.php index cc569e1b5af..03800fd266c 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/tests/admin_setting_managemfa_test.php b/admin/tool/mfa/tests/admin_setting_managemfa_test.php index d4a28294e4a..cef845680ac 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 10fad3b8ce0..f608e44c4a1 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 a2ab262b167..a677bb31e18 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 c1c21a6d33b..b6e774d0673 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 5ad87b21db0..2b0420a8039 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 e778a278612..c5a8f12fd12 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 0de73f4a6ed..60f6e6eebfa 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 d85ee43cf91..a69cd07e6b5 100644 --- a/admin/tool/mobile/tests/privacy/provider_test.php +++ b/admin/tool/mobile/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use tool_mobile\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/admin/tool/monitor/tests/event/events_test.php b/admin/tool/monitor/tests/event/events_test.php index 8fc0c503d14..754b5a6780f 100644 --- a/admin/tool/monitor/tests/event/events_test.php +++ b/admin/tool/monitor/tests/event/events_test.php @@ -28,7 +28,7 @@ namespace tool_monitor\event; /** * Tests that the tool_monitor events are valid and triggered correctly. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/admin/tool/monitor/tests/eventobservers_test.php b/admin/tool/monitor/tests/eventobservers_test.php index 323d842854a..8d426075d40 100644 --- a/admin/tool/monitor/tests/eventobservers_test.php +++ b/admin/tool/monitor/tests/eventobservers_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class eventobservers_test extends \advanced_testcase { +final class eventobservers_test extends \advanced_testcase { /** * Set up method. */ diff --git a/admin/tool/monitor/tests/generator_test.php b/admin/tool/monitor/tests/generator_test.php index d17694b1d40..56665c045c1 100644 --- a/admin/tool/monitor/tests/generator_test.php +++ b/admin/tool/monitor/tests/generator_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/privacy/provider_test.php b/admin/tool/monitor/tests/privacy/provider_test.php index 5d75717a3dc..14a425e93eb 100644 --- a/admin/tool/monitor/tests/privacy/provider_test.php +++ b/admin/tool/monitor/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/rule_manager_test.php b/admin/tool/monitor/tests/rule_manager_test.php index f29f2d9b886..24bdcf3fca6 100644 --- a/admin/tool/monitor/tests/rule_manager_test.php +++ b/admin/tool/monitor/tests/rule_manager_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_manager_test extends \advanced_testcase { +final class rule_manager_test extends \advanced_testcase { /** * Set up method. diff --git a/admin/tool/monitor/tests/subscription_manager_test.php b/admin/tool/monitor/tests/subscription_manager_test.php index 39975523f5e..46f06438901 100644 --- a/admin/tool/monitor/tests/subscription_manager_test.php +++ b/admin/tool/monitor/tests/subscription_manager_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscription_manager_test extends \advanced_testcase { +final class subscription_manager_test extends \advanced_testcase { /** * Test count_rule_subscriptions method. diff --git a/admin/tool/monitor/tests/subscription_test.php b/admin/tool/monitor/tests/subscription_test.php index 53e5e17188b..f9f98cbdc96 100644 --- a/admin/tool/monitor/tests/subscription_test.php +++ b/admin/tool/monitor/tests/subscription_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscription_test extends \advanced_testcase { +final class subscription_test extends \advanced_testcase { /** * @var \tool_monitor\subscription $subscription object. diff --git a/admin/tool/monitor/tests/task_check_subscriptions_test.php b/admin/tool/monitor/tests/task_check_subscriptions_test.php index 85d252e83f9..14b9823a070 100644 --- a/admin/tool/monitor/tests/task_check_subscriptions_test.php +++ b/admin/tool/monitor/tests/task_check_subscriptions_test.php @@ -25,7 +25,7 @@ namespace tool_monitor; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_check_subscriptions_test extends \advanced_testcase { +final class task_check_subscriptions_test extends \advanced_testcase { private $course; private $user; diff --git a/admin/tool/monitor/tests/task_clean_events_test.php b/admin/tool/monitor/tests/task_clean_events_test.php index 94c8c3c48bb..6696547b532 100644 --- a/admin/tool/monitor/tests/task_clean_events_test.php +++ b/admin/tool/monitor/tests/task_clean_events_test.php @@ -24,7 +24,7 @@ namespace tool_monitor; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_clean_events_test extends \advanced_testcase { +final class task_clean_events_test extends \advanced_testcase { /** * Test set up. diff --git a/admin/tool/moodlenet/tests/import_backup_helper_test.php b/admin/tool/moodlenet/tests/import_backup_helper_test.php index a6d47020261..bb0a52167e2 100644 --- a/admin/tool/moodlenet/tests/import_backup_helper_test.php +++ b/admin/tool/moodlenet/tests/import_backup_helper_test.php @@ -24,7 +24,7 @@ namespace tool_moodlenet; * @copyright 2020 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_backup_helper_test extends \advanced_testcase { +final class import_backup_helper_test extends \advanced_testcase { /** * Test that the first available context with the capability to upload backup files is returned. diff --git a/admin/tool/moodlenet/tests/lib_test.php b/admin/tool/moodlenet/tests/lib_test.php index 5fafc586070..ab397507282 100644 --- a/admin/tool/moodlenet/tests/lib_test.php +++ b/admin/tool/moodlenet/tests/lib_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/admin/tool/moodlenet/lib.php'); /** * Test moodlenet functions */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test the generate_mnet_endpoint function diff --git a/admin/tool/moodlenet/tests/local/import_handler_info_test.php b/admin/tool/moodlenet/tests/local/import_handler_info_test.php index 239ec3ebd91..7191ce790a9 100644 --- a/admin/tool/moodlenet/tests/local/import_handler_info_test.php +++ b/admin/tool/moodlenet/tests/local/import_handler_info_test.php @@ -28,7 +28,7 @@ use tool_moodlenet\local\import_strategy_file; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_handler_info_test extends \advanced_testcase { +final class import_handler_info_test extends \advanced_testcase { /** * Test init and the getters. diff --git a/admin/tool/moodlenet/tests/local/import_handler_registry_test.php b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php index 0c679515f03..c51e086086e 100644 --- a/admin/tool/moodlenet/tests/local/import_handler_registry_test.php +++ b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php @@ -31,7 +31,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_handler_registry_test extends \advanced_testcase { +final class import_handler_registry_test extends \advanced_testcase { /** * Test confirming the behaviour of get_resource_handlers_for_strategy with different params. diff --git a/admin/tool/moodlenet/tests/local/import_info_test.php b/admin/tool/moodlenet/tests/local/import_info_test.php index 754fbbce8f1..96bd58d1fb8 100644 --- a/admin/tool/moodlenet/tests/local/import_info_test.php +++ b/admin/tool/moodlenet/tests/local/import_info_test.php @@ -28,7 +28,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_info_test extends \advanced_testcase { +final class import_info_test extends \advanced_testcase { /** * Create some test objects. diff --git a/admin/tool/moodlenet/tests/local/import_processor_test.php b/admin/tool/moodlenet/tests/local/import_processor_test.php index 26f73f668b1..4596ae978f8 100644 --- a/admin/tool/moodlenet/tests/local/import_processor_test.php +++ b/admin/tool/moodlenet/tests/local/import_processor_test.php @@ -31,7 +31,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class import_processor_test extends \advanced_testcase { +final class import_processor_test extends \advanced_testcase { /** * An integration test, this confirms the ability to construct an import processor and run the import for the current user. diff --git a/admin/tool/moodlenet/tests/local/remote_resource_test.php b/admin/tool/moodlenet/tests/local/remote_resource_test.php index 6d474a4f7b2..84c05e1dab6 100644 --- a/admin/tool/moodlenet/tests/local/remote_resource_test.php +++ b/admin/tool/moodlenet/tests/local/remote_resource_test.php @@ -27,7 +27,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class remote_resource_test extends \advanced_testcase { +final class remote_resource_test extends \advanced_testcase { /** * Test getters. diff --git a/admin/tool/moodlenet/tests/local/url_test.php b/admin/tool/moodlenet/tests/local/url_test.php index e7137c2f52b..0a25f7955be 100644 --- a/admin/tool/moodlenet/tests/local/url_test.php +++ b/admin/tool/moodlenet/tests/local/url_test.php @@ -26,7 +26,7 @@ use tool_moodlenet\local\url; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class url_test extends \advanced_testcase { +final class url_test extends \advanced_testcase { /** * Test the parsing to host + path components. diff --git a/admin/tool/moodlenet/tests/profile_manager_test.php b/admin/tool/moodlenet/tests/profile_manager_test.php index 7d6de581cf1..aac0508865f 100644 --- a/admin/tool/moodlenet/tests/profile_manager_test.php +++ b/admin/tool/moodlenet/tests/profile_manager_test.php @@ -24,7 +24,7 @@ namespace tool_moodlenet; * @copyright 2020 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profile_manager_test extends \advanced_testcase { +final class profile_manager_test extends \advanced_testcase { /** * Test that on this site we use the user table to hold moodle net profile information. diff --git a/admin/tool/policy/tests/api_test.php b/admin/tool/policy/tests/api_test.php index 66ecaf83cf8..b7582edef8e 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 6d502866235..81ed727cef0 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 3b70138f9c2..6aee9299c3c 100644 --- a/admin/tool/policy/tests/privacy/provider_test.php +++ b/admin/tool/policy/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The user object. */ protected $user; diff --git a/admin/tool/policy/tests/sitepolicy_handler_test.php b/admin/tool/policy/tests/sitepolicy_handler_test.php index 51ec55afa4c..3278d8e83f7 100644 --- a/admin/tool/policy/tests/sitepolicy_handler_test.php +++ b/admin/tool/policy/tests/sitepolicy_handler_test.php @@ -27,7 +27,7 @@ use tool_policy\test\helper; * @copyright 2018 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sitepolicy_handler_test extends \advanced_testcase { +final class sitepolicy_handler_test extends \advanced_testcase { /** * Test behaviour of the {@link \tool_policy\privacy\local\sitepolicy\handler::get_redirect_url()} method. diff --git a/admin/tool/recyclebin/tests/category_bin_test.php b/admin/tool/recyclebin/tests/category_bin_test.php index 6e03d76c11a..8c1ddb473b1 100644 --- a/admin/tool/recyclebin/tests/category_bin_test.php +++ b/admin/tool/recyclebin/tests/category_bin_test.php @@ -23,7 +23,7 @@ namespace tool_recyclebin; * @copyright 2015 University of Kent * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class category_bin_test extends \advanced_testcase { +final class category_bin_test extends \advanced_testcase { /** * @var \stdClass $course diff --git a/admin/tool/recyclebin/tests/course_bin_test.php b/admin/tool/recyclebin/tests/course_bin_test.php index b3c1dcff285..795e02c000a 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 7cdcf42053d..d0639dc1ca1 100644 --- a/admin/tool/recyclebin/tests/event/events_test.php +++ b/admin/tool/recyclebin/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace tool_recyclebin\event; * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/admin/tool/task/tests/form_test.php b/admin/tool/task/tests/form_test.php index 8cbb40d189f..760c79cdac2 100644 --- a/admin/tool/task/tests/form_test.php +++ b/admin/tool/task/tests/form_test.php @@ -23,7 +23,7 @@ namespace tool_task; * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ -class form_test extends \advanced_testcase { +final class form_test extends \advanced_testcase { /** * Test validations for minute field. diff --git a/admin/tool/templatelibrary/tests/externallib_test.php b/admin/tool/templatelibrary/tests/externallib_test.php index 87144cddef3..1977dcab12a 100644 --- a/admin/tool/templatelibrary/tests/externallib_test.php +++ b/admin/tool/templatelibrary/tests/externallib_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test list all. diff --git a/admin/tool/uploadcourse/tests/course_test.php b/admin/tool/uploadcourse/tests/course_test.php index a7ef8ad3595..f517e090c75 100644 --- a/admin/tool/uploadcourse/tests/course_test.php +++ b/admin/tool/uploadcourse/tests/course_test.php @@ -26,7 +26,7 @@ use tool_uploadcourse_course; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ -class course_test extends \advanced_testcase { +final class course_test extends \advanced_testcase { public function test_proceed_without_prepare() { $this->resetAfterTest(true); diff --git a/admin/tool/uploadcourse/tests/helper_test.php b/admin/tool/uploadcourse/tests/helper_test.php index e2253dbd133..de1ad0d55f1 100644 --- a/admin/tool/uploadcourse/tests/helper_test.php +++ b/admin/tool/uploadcourse/tests/helper_test.php @@ -25,7 +25,7 @@ use tool_uploadcourse_helper; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { public function test_generate_shortname() { $data = (object) array('fullname' => 'Ah bh Ch 01 02 03', 'idnumber' => 'ID123'); diff --git a/admin/tool/uploadcourse/tests/processor_test.php b/admin/tool/uploadcourse/tests/processor_test.php index c18218b875e..f73137e20cd 100644 --- a/admin/tool/uploadcourse/tests/processor_test.php +++ b/admin/tool/uploadcourse/tests/processor_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/csvlib.class.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class processor_test extends \advanced_testcase { +final class processor_test extends \advanced_testcase { public function test_basic() { global $DB; diff --git a/admin/tool/uploaduser/tests/cli_test.php b/admin/tool/uploaduser/tests/cli_test.php index f053eec7dea..650b0564852 100644 --- a/admin/tool/uploaduser/tests/cli_test.php +++ b/admin/tool/uploaduser/tests/cli_test.php @@ -23,7 +23,7 @@ namespace tool_uploaduser; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cli_test extends \advanced_testcase { +final class cli_test extends \advanced_testcase { /** * Generate cli_helper and mock $_SERVER['argv'] diff --git a/admin/tool/uploaduser/tests/field_value_validators_test.php b/admin/tool/uploaduser/tests/field_value_validators_test.php index e3650d4bd28..a9375a21fd1 100644 --- a/admin/tool/uploaduser/tests/field_value_validators_test.php +++ b/admin/tool/uploaduser/tests/field_value_validators_test.php @@ -25,7 +25,7 @@ use tool_uploaduser\local\field_value_validators; * @copyright 2019 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class field_value_validators_test extends \advanced_testcase { +final class field_value_validators_test extends \advanced_testcase { /** * Data provider for \field_value_validators_testcase::test_validate_theme(). diff --git a/admin/tool/uploaduser/tests/upload_users_test.php b/admin/tool/uploaduser/tests/upload_users_test.php index 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 ae2b2732344..712d5ba7872 100644 --- a/admin/tool/usertours/tests/accessdate_filter_test.php +++ b/admin/tool/usertours/tests/accessdate_filter_test.php @@ -25,8 +25,7 @@ use tool_usertours\local\filter\accessdate; * @copyright 2019 Tom Dickman * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class accessdate_filter_test extends \advanced_testcase { - +final class accessdate_filter_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(true); } diff --git a/admin/tool/usertours/tests/cache_test.php b/admin/tool/usertours/tests/cache_test.php index 9ba765a1162..6f96c45e646 100644 --- a/admin/tool/usertours/tests/cache_test.php +++ b/admin/tool/usertours/tests/cache_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cache_test extends \advanced_testcase { +final class cache_test extends \advanced_testcase { // There are shared helpers for these tests in the helper trait. use \tool_usertours_helper_trait; diff --git a/admin/tool/usertours/tests/manager_test.php b/admin/tool/usertours/tests/manager_test.php index 0310f3169f1..09c509e636c 100644 --- a/admin/tool/usertours/tests/manager_test.php +++ b/admin/tool/usertours/tests/manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/helper_trait.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { // There are shared helpers for these tests in the helper trait. use \tool_usertours_helper_trait; diff --git a/admin/tool/usertours/tests/privacy/provider_test.php b/admin/tool/usertours/tests/privacy/provider_test.php index 907feb48352..f23e2736b26 100644 --- a/admin/tool/usertours/tests/privacy/provider_test.php +++ b/admin/tool/usertours/tests/privacy/provider_test.php @@ -37,8 +37,7 @@ use tool_usertours\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { - +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Helper method for creating a tour * diff --git a/admin/tool/usertours/tests/role_filter_test.php b/admin/tool/usertours/tests/role_filter_test.php index 20ee1be9629..4edc75833f1 100644 --- a/admin/tool/usertours/tests/role_filter_test.php +++ b/admin/tool/usertours/tests/role_filter_test.php @@ -23,8 +23,7 @@ namespace tool_usertours; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class role_filter_test extends \advanced_testcase { - +final class role_filter_test extends \advanced_testcase { /** * @var $course Test course */ diff --git a/admin/tool/usertours/tests/step_test.php b/admin/tool/usertours/tests/step_test.php index 55ddda887e5..42b69bc17f8 100644 --- a/admin/tool/usertours/tests/step_test.php +++ b/admin/tool/usertours/tests/step_test.php @@ -28,8 +28,7 @@ require_once($CFG->libdir . '/formslib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class step_test extends \advanced_testcase { - +final class step_test extends \advanced_testcase { /** * @var moodle_database */ diff --git a/admin/tool/usertours/tests/theme_filter_test.php b/admin/tool/usertours/tests/theme_filter_test.php index cd63ee2d7b2..caf2ad10fdd 100644 --- a/admin/tool/usertours/tests/theme_filter_test.php +++ b/admin/tool/usertours/tests/theme_filter_test.php @@ -23,8 +23,7 @@ namespace tool_usertours; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class theme_filter_test extends \advanced_testcase { - +final class theme_filter_test extends \advanced_testcase { /** * Data Provider for filter_matches function. * diff --git a/admin/tool/usertours/tests/tour_test.php b/admin/tool/usertours/tests/tour_test.php index e9c75462366..e05cd83da7b 100644 --- a/admin/tool/usertours/tests/tour_test.php +++ b/admin/tool/usertours/tests/tour_test.php @@ -28,8 +28,7 @@ require_once($CFG->libdir . '/formslib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tour_test extends \advanced_testcase { - +final class tour_test extends \advanced_testcase { /** * @var moodle_database */ diff --git a/analytics/tests/analysis_test.php b/analytics/tests/analysis_test.php index 9d458a3aa57..e0f275cc7fd 100644 --- a/analytics/tests/analysis_test.php +++ b/analytics/tests/analysis_test.php @@ -23,7 +23,7 @@ namespace core_analytics; * @copyright 2019 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class analysis_test extends \advanced_testcase { +final class analysis_test extends \advanced_testcase { /** * Test fill_firstanalyses_cache. diff --git a/analytics/tests/course_test.php b/analytics/tests/course_test.php index bff564b4ead..44f6f32ad99 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 ab7c28a9681..35a71df106a 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 884ef3e610d..ad9136a13ef 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 e463a7aebf8..72194f86570 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 63e1b3c463a..712caeee9d7 100644 --- a/analytics/tests/prediction_test.php +++ b/analytics/tests/prediction_test.php @@ -46,7 +46,7 @@ require_once(__DIR__ . '/../../course/lib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class prediction_test extends \advanced_testcase { +final class prediction_test extends \advanced_testcase { /** * Purge all the mlbackend outputs. diff --git a/analytics/tests/privacy/provider_test.php b/analytics/tests/privacy/provider_test.php index 06ed516d99c..d611228b89d 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 5d8f3019c5c..77abb83f1ce 100644 --- a/analytics/tests/stats_test.php +++ b/analytics/tests/stats_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/test_target_shortname.php'); * @copyright 2019 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stats_test extends \advanced_testcase { +final class stats_test extends \advanced_testcase { /** * Set up the test environment. diff --git a/analytics/tests/time_splittings_test.php b/analytics/tests/time_splittings_test.php index cd5026c08fe..18c44ee73ba 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 0e98f086714..10abad9e1aa 100644 --- a/auth/db/tests/db_test.php +++ b/auth/db/tests/db_test.php @@ -25,7 +25,7 @@ namespace auth_db; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class db_test extends \advanced_testcase { +final class db_test extends \advanced_testcase { /** @var string Original error log */ protected $oldlog; diff --git a/auth/email/tests/external/external_test.php b/auth/email/tests/external/external_test.php index 79cd4226fff..f40f3d0c79f 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/plugin_test.php b/auth/ldap/tests/plugin_test.php index b3e40c500ec..aeb3874ac31 100644 --- a/auth/ldap/tests/plugin_test.php +++ b/auth/ldap/tests/plugin_test.php @@ -33,8 +33,7 @@ namespace auth_ldap; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { - +final class plugin_test extends \advanced_testcase { /** * Data provider for auth_ldap tests * diff --git a/auth/lti/tests/auth_test.php b/auth/lti/tests/auth_test.php index f4a00bbb0e1..30063a6e083 100644 --- a/auth/lti/tests/auth_test.php +++ b/auth/lti/tests/auth_test.php @@ -24,7 +24,7 @@ namespace auth_lti; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_plugin_lti */ -class auth_test extends \advanced_testcase { +final class auth_test extends \advanced_testcase { /** @var string issuer URL used for test cases. */ protected static string $issuer = 'https://lms.example.org'; diff --git a/auth/lti/tests/privacy/provider_test.php b/auth/lti/tests/privacy/provider_test.php index d58146f9463..efb5a5f6728 100644 --- a/auth/lti/tests/privacy/provider_test.php +++ b/auth/lti/tests/privacy/provider_test.php @@ -30,7 +30,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_lti\privacy\provider */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/manual/tests/manual_test.php b/auth/manual/tests/manual_test.php index 77503b18e87..208837900b9 100644 --- a/auth/manual/tests/manual_test.php +++ b/auth/manual/tests/manual_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/auth/manual/auth.php'); * @copyright 2014 Gilles-Philippe Leblanc * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manual_test extends \advanced_testcase { +final class manual_test extends \advanced_testcase { /** @var auth_plugin_manual Keeps the authentication plugin. */ protected $authplugin; diff --git a/auth/manual/tests/privacy/provider_test.php b/auth/manual/tests/privacy/provider_test.php index 178f3673368..abf995d8435 100644 --- a/auth/manual/tests/privacy/provider_test.php +++ b/auth/manual/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use auth_manual\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var \auth_plugin_manual Keeps the authentication plugin. */ protected $authplugin; diff --git a/auth/mnet/tests/privacy/provider_test.php b/auth/mnet/tests/privacy/provider_test.php index a41ac4de0f8..720dbc828b2 100644 --- a/auth/mnet/tests/privacy/provider_test.php +++ b/auth/mnet/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Victor Deniz * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/oauth2/tests/api_test.php b/auth/oauth2/tests/api_test.php index 627d4fd2f8e..f69230fcb9a 100644 --- a/auth/oauth2/tests/api_test.php +++ b/auth/oauth2/tests/api_test.php @@ -23,7 +23,7 @@ namespace auth_oauth2; * @copyright 2017 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test the cleaning of orphaned linked logins for all issuers. diff --git a/auth/oauth2/tests/auth_test.php b/auth/oauth2/tests/auth_test.php index 29dc8f8b15c..47a224d39c7 100644 --- a/auth/oauth2/tests/auth_test.php +++ b/auth/oauth2/tests/auth_test.php @@ -25,7 +25,7 @@ namespace auth_oauth2; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \auth_oauth2\auth */ -class auth_test extends \advanced_testcase { +final class auth_test extends \advanced_testcase { public function test_get_password_change_info() { $this->resetAfterTest(); diff --git a/auth/oauth2/tests/privacy/provider_test.php b/auth/oauth2/tests/privacy/provider_test.php index d398182fac0..2cd81f7e3c3 100644 --- a/auth/oauth2/tests/privacy/provider_test.php +++ b/auth/oauth2/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Set up method. */ diff --git a/auth/tests/digital_consent_test.php b/auth/tests/digital_consent_test.php index 8ad2d411b15..cc0579271b6 100644 --- a/auth/tests/digital_consent_test.php +++ b/auth/tests/digital_consent_test.php @@ -23,7 +23,7 @@ namespace core_auth; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class digital_consent_test extends \advanced_testcase { +final class digital_consent_test extends \advanced_testcase { public function test_is_age_digital_consent_verification_enabled() { global $CFG; diff --git a/auth/tests/external/external_test.php b/auth/tests/external/external_test.php index 07a47aa39c6..052961f8c2b 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 6e041552087..d6d0c4749d3 100644 --- a/auth/tests/privacy/provider_test.php +++ b/auth/tests/privacy/provider_test.php @@ -42,7 +42,7 @@ use core_auth\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/availability/condition/completion/tests/condition_test.php b/availability/condition/completion/tests/condition_test.php index 21e1c9d3425..df6bdf5b593 100644 --- a/availability/condition/completion/tests/condition_test.php +++ b/availability/condition/completion/tests/condition_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/availability/condition/date/tests/condition_test.php b/availability/condition/date/tests/condition_test.php index e34f6681feb..6985aecbd5f 100644 --- a/availability/condition/date/tests/condition_test.php +++ b/availability/condition/date/tests/condition_test.php @@ -25,7 +25,7 @@ use core_availability\tree; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/grade/tests/condition_test.php b/availability/condition/grade/tests/condition_test.php index 28c0b35b0e0..fed782b0158 100644 --- a/availability/condition/grade/tests/condition_test.php +++ b/availability/condition/grade/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_grade; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Tests constructing and using grade condition. */ diff --git a/availability/condition/group/tests/condition_test.php b/availability/condition/group/tests/condition_test.php index ca5cb2b609b..8c7abf0366b 100644 --- a/availability/condition/group/tests/condition_test.php +++ b/availability/condition/group/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_group; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/grouping/tests/condition_test.php b/availability/condition/grouping/tests/condition_test.php index 0de2be5aa28..2cefb187675 100644 --- a/availability/condition/grouping/tests/condition_test.php +++ b/availability/condition/grouping/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_grouping; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** * Load required classes. */ diff --git a/availability/condition/profile/tests/condition_test.php b/availability/condition/profile/tests/condition_test.php index e8a61f4bb8c..9e201676bbd 100644 --- a/availability/condition/profile/tests/condition_test.php +++ b/availability/condition/profile/tests/condition_test.php @@ -23,7 +23,7 @@ namespace availability_profile; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class condition_test extends \advanced_testcase { +final class condition_test extends \advanced_testcase { /** @var profile_define_text Profile field for testing */ protected $profilefield; diff --git a/availability/tests/capability_checker_test.php b/availability/tests/capability_checker_test.php index b228a2f55f4..6a8428bc9c8 100644 --- a/availability/tests/capability_checker_test.php +++ b/availability/tests/capability_checker_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class capability_checker_test extends \advanced_testcase { +final class capability_checker_test extends \advanced_testcase { /** * Tests loading a class from /availability/classes. */ diff --git a/availability/tests/component_test.php b/availability/tests/component_test.php index 993c778361e..3588fe82ba4 100644 --- a/availability/tests/component_test.php +++ b/availability/tests/component_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class component_test extends \advanced_testcase { +final class component_test extends \advanced_testcase { /** * Tests loading a class from /availability/classes. */ diff --git a/availability/tests/info_test.php b/availability/tests/info_test.php index 0e8d01fd5b6..091d807f833 100644 --- a/availability/tests/info_test.php +++ b/availability/tests/info_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class info_test extends \advanced_testcase { +final class info_test extends \advanced_testcase { public function setUp(): void { // Load the mock condition so that it can be used. require_once(__DIR__ . '/fixtures/mock_condition.php'); diff --git a/availability/tests/tree_test.php b/availability/tests/tree_test.php index 3720e816f34..f9ccffcae16 100644 --- a/availability/tests/tree_test.php +++ b/availability/tests/tree_test.php @@ -23,7 +23,7 @@ namespace core_availability; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tree_test extends \advanced_testcase { +final class tree_test extends \advanced_testcase { public function setUp(): void { // Load the mock classes so they can be used. require_once(__DIR__ . '/fixtures/mock_condition.php'); diff --git a/backup/controller/tests/controller_test.php b/backup/controller/tests/controller_test.php index f2ade3d6136..b19668619c2 100644 --- a/backup/controller/tests/controller_test.php +++ b/backup/controller/tests/controller_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class controller_test extends \advanced_testcase { +final class controller_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/converter/moodle1/tests/moodle1_converter_test.php b/backup/converter/moodle1/tests/moodle1_converter_test.php index b11f5058d11..b4cb09c1ae7 100644 --- a/backup/converter/moodle1/tests/moodle1_converter_test.php +++ b/backup/converter/moodle1/tests/moodle1_converter_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/backup/converter/moodle1/lib.php'); * @copyright 2011 Mark Nielsen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class moodle1_converter_test extends \advanced_testcase { +final class moodle1_converter_test extends \advanced_testcase { /** @var string the name of the directory containing the unpacked Moodle 1.9 backup */ protected $tempdir; diff --git a/backup/moodle2/tests/backup_encrypted_content_test.php b/backup/moodle2/tests/backup_encrypted_content_test.php index 5323b93cecf..12ce523cc77 100644 --- a/backup/moodle2/tests/backup_encrypted_content_test.php +++ b/backup/moodle2/tests/backup_encrypted_content_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_custom_fields.php'); * @copyright 2016 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_encrypted_content_test extends \advanced_testcase { +final class backup_encrypted_content_test extends \advanced_testcase { public function setUp(): void { if (!function_exists('openssl_encrypt')) { diff --git a/backup/moodle2/tests/backup_xml_transformer_test.php b/backup/moodle2/tests/backup_xml_transformer_test.php index 83c19a44c04..6b58d25b674 100644 --- a/backup/moodle2/tests/backup_xml_transformer_test.php +++ b/backup/moodle2/tests/backup_xml_transformer_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php'); * @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_xml_transformer_test extends \advanced_testcase { +final class backup_xml_transformer_test extends \advanced_testcase { /** * Initial set up. diff --git a/backup/moodle2/tests/moodle2_course_format_test.php b/backup/moodle2/tests/moodle2_course_format_test.php index 1712348315e..6e9ffde34c7 100644 --- a/backup/moodle2/tests/moodle2_course_format_test.php +++ b/backup/moodle2/tests/moodle2_course_format_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/moodle2/tests/fixtures/format_test_cs_opti * @copyright 2014 Russell Smith * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class moodle2_course_format_test extends \advanced_testcase { +final class moodle2_course_format_test extends \advanced_testcase { /** * Tests a backup and restore adds the required section option data diff --git a/backup/moodle2/tests/restore_gradebook_structure_step_test.php b/backup/moodle2/tests/restore_gradebook_structure_step_test.php index 70a8e7ccbdd..1410ba091b1 100644 --- a/backup/moodle2/tests/restore_gradebook_structure_step_test.php +++ b/backup/moodle2/tests/restore_gradebook_structure_step_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_gradebook_structure_step_test extends \advanced_testcase { +final class restore_gradebook_structure_step_test extends \advanced_testcase { /** * Provide tests for rewrite_step_backup_file_for_legacy_freeze based upon fixtures. diff --git a/backup/moodle2/tests/restore_stepslib_date_test.php b/backup/moodle2/tests/restore_stepslib_date_test.php index 4c79d86a1cb..abd257fac9e 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/tests/async_backup_test.php b/backup/tests/async_backup_test.php index ebb5711ac69..92cd6f63823 100644 --- a/backup/tests/async_backup_test.php +++ b/backup/tests/async_backup_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_backup_test extends \advanced_testcase { +final class async_backup_test extends \advanced_testcase { /** * Tests the asynchronous backup. diff --git a/backup/tests/async_restore_test.php b/backup/tests/async_restore_test.php index 01faf9a1731..9a43001732e 100644 --- a/backup/tests/async_restore_test.php +++ b/backup/tests/async_restore_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_restore_test extends \advanced_testcase { +final class async_restore_test extends \advanced_testcase { /** * Tests the asynchronous backup. diff --git a/backup/tests/automated_backup_test.php b/backup/tests/automated_backup_test.php index 26831d2ab43..2b963da9029 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 0a10bd65ccd..d502f96a821 100644 --- a/backup/tests/backup_cleanup_task_test.php +++ b/backup/tests/backup_cleanup_task_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2021 Mikhail Golenkov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_cleanup_task_test extends \advanced_testcase { +final class backup_cleanup_task_test extends \advanced_testcase { /** * Set up tasks for all tests. diff --git a/backup/tests/backup_restore_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 fed9e126755..206725e1a25 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 11627c5e26e..10306d9c991 100644 --- a/backup/tests/privacy/provider_test.php +++ b/backup/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/backup/tests/quiz_restore_decode_links_test.php b/backup/tests/quiz_restore_decode_links_test.php index e4117d508d9..471f1ca5dea 100644 --- a/backup/tests/quiz_restore_decode_links_test.php +++ b/backup/tests/quiz_restore_decode_links_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2020 Ilya Tregubov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_restore_decode_links_test extends \advanced_testcase { +final class quiz_restore_decode_links_test extends \advanced_testcase { /** * Test restore_decode_rule class diff --git a/backup/tests/roles_backup_restore_test.php b/backup/tests/roles_backup_restore_test.php index 5e2ac5b8c91..d595a24b27c 100644 --- a/backup/tests/roles_backup_restore_test.php +++ b/backup/tests/roles_backup_restore_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class roles_backup_restore_test extends advanced_testcase { +final class roles_backup_restore_test extends advanced_testcase { /** * Create a course where the (non-editing) Teacher role is overridden diff --git a/backup/util/checks/tests/checks_test.php b/backup/util/checks/tests/checks_test.php index d94f7eff417..b3ad67c5454 100644 --- a/backup/util/checks/tests/checks_test.php +++ b/backup/util/checks/tests/checks_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class checks_test extends \advanced_testcase { +final class checks_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/dbops/tests/backup_dbops_test.php b/backup/util/dbops/tests/backup_dbops_test.php index e644b42d88c..14006474705 100644 --- a/backup/util/dbops/tests/backup_dbops_test.php +++ b/backup/util/dbops/tests/backup_dbops_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_dbops_test extends \advanced_testcase { +final class backup_dbops_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/dbops/tests/backup_structure_dbops_test.php b/backup/util/dbops/tests/backup_structure_dbops_test.php index 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 6252b5e0a9f..0454f06a3aa 100644 --- a/backup/util/dbops/tests/restore_dbops_test.php +++ b/backup/util/dbops/tests/restore_dbops_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_dbops_test extends \advanced_testcase { +final class restore_dbops_test extends \advanced_testcase { /** * Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected. diff --git a/backup/util/destinations/tests/destinations_test.php b/backup/util/destinations/tests/destinations_test.php index ef0b4f346f7..dccf670c785 100644 --- a/backup/util/destinations/tests/destinations_test.php +++ b/backup/util/destinations/tests/destinations_test.php @@ -22,7 +22,7 @@ namespace core_backup; * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class destinations_test extends \basic_testcase { +final class destinations_test extends \basic_testcase { /** * test backup_destination class diff --git a/backup/util/factories/tests/factories_test.php b/backup/util/factories/tests/factories_test.php index d67f6defc02..45f06a69fe2 100644 --- a/backup/util/factories/tests/factories_test.php +++ b/backup/util/factories/tests/factories_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/factories/backup_factory.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class factories_test extends \advanced_testcase { +final class factories_test extends \advanced_testcase { public function setUp(): void { global $CFG; diff --git a/backup/util/helper/tests/async_helper_test.php b/backup/util/helper/tests/async_helper_test.php index 8fd9b48c583..21310e387f8 100644 --- a/backup/util/helper/tests/async_helper_test.php +++ b/backup/util/helper/tests/async_helper_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class async_helper_test extends \advanced_testcase { +final class async_helper_test extends \advanced_testcase { /** * Tests sending message for asynchronous backup. diff --git a/backup/util/helper/tests/backup_encode_content_test.php b/backup/util/helper/tests/backup_encode_content_test.php index 570c22440ab..e12c1e946ee 100644 --- a/backup/util/helper/tests/backup_encode_content_test.php +++ b/backup/util/helper/tests/backup_encode_content_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_course_task.class.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_encode_content_test extends \basic_testcase { +final class backup_encode_content_test extends \basic_testcase { /** * Test the encode_content_links method for course. diff --git a/backup/util/helper/tests/converterhelper_test.php b/backup/util/helper/tests/converterhelper_test.php index 6086c10f08a..137a9d329d4 100644 --- a/backup/util/helper/tests/converterhelper_test.php +++ b/backup/util/helper/tests/converterhelper_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/backup/util/helper/convert_helper.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converterhelper_test extends \basic_testcase { +final class converterhelper_test extends \basic_testcase { public function test_choose_conversion_path() { diff --git a/backup/util/helper/tests/copy_helper_test.php b/backup/util/helper/tests/copy_helper_test.php index 1080fe56e66..40b014654ef 100644 --- a/backup/util/helper/tests/copy_helper_test.php +++ b/backup/util/helper/tests/copy_helper_test.php @@ -34,7 +34,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \copy_helper */ -class copy_helper_test extends \advanced_testcase { +final class copy_helper_test extends \advanced_testcase { /** * diff --git a/backup/util/helper/tests/cronhelper_test.php b/backup/util/helper/tests/cronhelper_test.php index 23ed6687dd4..69e0b51202b 100644 --- a/backup/util/helper/tests/cronhelper_test.php +++ b/backup/util/helper/tests/cronhelper_test.php @@ -43,7 +43,7 @@ require_once("$CFG->dirroot/backup/backup.class.php"); * @copyright 2012 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cronhelper_test extends \advanced_testcase { +final class cronhelper_test extends \advanced_testcase { /** * Test {@link backup_cron_automated_helper::calculate_next_automated_backup}. */ diff --git a/backup/util/helper/tests/decode_test.php b/backup/util/helper/tests/decode_test.php index 772c0ec2256..e722d8bc5f0 100644 --- a/backup/util/helper/tests/decode_test.php +++ b/backup/util/helper/tests/decode_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class decode_test extends \basic_testcase { +final class decode_test extends \basic_testcase { /** * test restore_decode_rule class diff --git a/backup/util/helper/tests/helper_test.php b/backup/util/helper/tests/helper_test.php index fe1392764c6..ca7449a1645 100644 --- a/backup/util/helper/tests/helper_test.php +++ b/backup/util/helper/tests/helper_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/backup/util/helper/backup_general_helper.class.ph * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \basic_testcase { +final class helper_test extends \basic_testcase { /* * test backup_helper class diff --git a/backup/util/helper/tests/restore_log_rule_test.php b/backup/util/helper/tests/restore_log_rule_test.php index 58c0cfc6ffa..26852177c5e 100644 --- a/backup/util/helper/tests/restore_log_rule_test.php +++ b/backup/util/helper/tests/restore_log_rule_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_log_rule_test extends \basic_testcase { +final class restore_log_rule_test extends \basic_testcase { function test_process_keeps_log_unmodified() { diff --git a/backup/util/helper/tests/restore_structure_parser_processor_test.php b/backup/util/helper/tests/restore_structure_parser_processor_test.php index 0edfb84baf1..096672e1978 100644 --- a/backup/util/helper/tests/restore_structure_parser_processor_test.php +++ b/backup/util/helper/tests/restore_structure_parser_processor_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/util/helper/restore_structure_parser_proce * @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_structure_parser_processor_test extends advanced_testcase { +final class restore_structure_parser_processor_test extends advanced_testcase { /** * Initial set up. diff --git a/backup/util/loggers/tests/logger_test.php b/backup/util/loggers/tests/logger_test.php index bbcdc4fcedb..e4ed29acdf7 100644 --- a/backup/util/loggers/tests/logger_test.php +++ b/backup/util/loggers/tests/logger_test.php @@ -55,7 +55,7 @@ require_once($CFG->dirroot . '/backup/util/loggers/file_logger.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class logger_test extends \basic_testcase { +final class logger_test extends \basic_testcase { /** * test base_logger class diff --git a/backup/util/plan/tests/plan_test.php b/backup/util/plan/tests/plan_test.php index 8c9c9c9bbec..edc7f7ea00c 100644 --- a/backup/util/plan/tests/plan_test.php +++ b/backup/util/plan/tests/plan_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plan_test extends \advanced_testcase { +final class plan_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/plan/tests/step_test.php b/backup/util/plan/tests/step_test.php index 81c62b3c3fc..0aa98e39105 100644 --- a/backup/util/plan/tests/step_test.php +++ b/backup/util/plan/tests/step_test.php @@ -42,7 +42,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class step_test extends \advanced_testcase { +final class step_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/plan/tests/task_test.php b/backup/util/plan/tests/task_test.php index b928222e90b..16aaced4925 100644 --- a/backup/util/plan/tests/task_test.php +++ b/backup/util/plan/tests/task_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/plan_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_test extends \advanced_testcase { +final class task_test extends \advanced_testcase { protected $moduleid; // course_modules id used for testing protected $sectionid; // course_sections id used for testing diff --git a/backup/util/settings/tests/settings_test.php b/backup/util/settings/tests/settings_test.php index a11279ca419..4531d4ef9d4 100644 --- a/backup/util/settings/tests/settings_test.php +++ b/backup/util/settings/tests/settings_test.php @@ -58,7 +58,7 @@ require_once($CFG->dirroot . '/backup/util/ui/backup_ui_setting.class.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class settings_test extends \basic_testcase { +final class settings_test extends \basic_testcase { /** * test base_setting class diff --git a/backup/util/structure/tests/baseatom_test.php b/backup/util/structure/tests/baseatom_test.php index 98070cd1b95..401a22e73ff 100644 --- a/backup/util/structure/tests/baseatom_test.php +++ b/backup/util/structure/tests/baseatom_test.php @@ -36,7 +36,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseatom_test extends \basic_testcase { +final class baseatom_test extends \basic_testcase { /** * Correct base_atom_tests diff --git a/backup/util/structure/tests/baseattribute_test.php b/backup/util/structure/tests/baseattribute_test.php index e8248c0311e..78a8fb24784 100644 --- a/backup/util/structure/tests/baseattribute_test.php +++ b/backup/util/structure/tests/baseattribute_test.php @@ -35,7 +35,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseattribute_test extends \basic_testcase { +final class baseattribute_test extends \basic_testcase { /** * Correct base_attribute tests diff --git a/backup/util/structure/tests/basefinalelement_test.php b/backup/util/structure/tests/basefinalelement_test.php index 93ce518bce6..d22d66f25ef 100644 --- a/backup/util/structure/tests/basefinalelement_test.php +++ b/backup/util/structure/tests/basefinalelement_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class basefinalelement_test extends \basic_testcase { +final class basefinalelement_test extends \basic_testcase { /** * Correct base_final_element tests diff --git a/backup/util/structure/tests/basenestedelement_test.php b/backup/util/structure/tests/basenestedelement_test.php index 50ce8b8003e..9614987498f 100644 --- a/backup/util/structure/tests/basenestedelement_test.php +++ b/backup/util/structure/tests/basenestedelement_test.php @@ -39,7 +39,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class basenestedelement_test extends \basic_testcase { +final class basenestedelement_test extends \basic_testcase { /** * Correct creation tests (attributes and final elements) diff --git a/backup/util/structure/tests/baseoptigroup_test.php b/backup/util/structure/tests/baseoptigroup_test.php index baa782ddb0b..e9d4c7527c5 100644 --- a/backup/util/structure/tests/baseoptigroup_test.php +++ b/backup/util/structure/tests/baseoptigroup_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/fixtures/structure_fixtures.php'); * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class baseoptigroup_test extends \basic_testcase { +final class baseoptigroup_test extends \basic_testcase { /** * Correct creation tests (s) diff --git a/backup/util/structure/tests/structure_test.php b/backup/util/structure/tests/structure_test.php index 4b2a8b1b37e..3abdf81b48d 100644 --- a/backup/util/structure/tests/structure_test.php +++ b/backup/util/structure/tests/structure_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/backup/util/xml/output/memory_xml_output.class.ph * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class structure_test extends \advanced_testcase { +final class structure_test extends \advanced_testcase { /** @var int Store the inserted forum->id for use in test functions */ protected $forumid; diff --git a/backup/util/ui/tests/base_setting_ui_test.php b/backup/util/ui/tests/base_setting_ui_test.php index 801bd7c0f0c..7c4f548ebe9 100644 --- a/backup/util/ui/tests/base_setting_ui_test.php +++ b/backup/util/ui/tests/base_setting_ui_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/backup/util/settings/tests/settings_test.php'); * @copyright 2021 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_setting_ui_test extends \advanced_testcase { +final class base_setting_ui_test extends \advanced_testcase { /** * Tests set_label(). * diff --git a/backup/util/ui/tests/ui_test.php b/backup/util/ui/tests/ui_test.php index 7494909e903..020a6e38123 100644 --- a/backup/util/ui/tests/ui_test.php +++ b/backup/util/ui/tests/ui_test.php @@ -23,7 +23,7 @@ namespace core_backup; * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ui_test extends \basic_testcase { +final class ui_test extends \basic_testcase { /** * Test backup_ui class diff --git a/backup/util/xml/output/tests/output_test.php b/backup/util/xml/output/tests/output_test.php index 9deba27581a..cece2c746f1 100644 --- a/backup/util/xml/output/tests/output_test.php +++ b/backup/util/xml/output/tests/output_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/backup/util/xml/output/file_xml_output.class.php' * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class output_test extends \advanced_testcase { +final class output_test extends \advanced_testcase { /* * test memory_xml_output diff --git a/backup/util/xml/parser/tests/parser_test.php b/backup/util/xml/parser/tests/parser_test.php index 06acf90c5f8..66af1f55da0 100644 --- a/backup/util/xml/parser/tests/parser_test.php +++ b/backup/util/xml/parser/tests/parser_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/backup/util/xml/parser/processors/grouped_parser_ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class parser_test extends \advanced_testcase { +final class parser_test extends \advanced_testcase { /* * test progressive_parser public methods diff --git a/backup/util/xml/tests/writer_test.php b/backup/util/xml/tests/writer_test.php index 2e5c4543551..191a816ecda 100644 --- a/backup/util/xml/tests/writer_test.php +++ b/backup/util/xml/tests/writer_test.php @@ -48,7 +48,7 @@ require_once($CFG->dirroot . '/backup/util/xml/contenttransformer/xml_contenttra * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class writer_test extends \basic_testcase { +final class writer_test extends \basic_testcase { /** * test xml_writer public methods diff --git a/badges/tests/badgeslib_test.php b/badges/tests/badgeslib_test.php index ac8e38f74f1..68070c2ad67 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,130 +37,7 @@ 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() { + public function test_create_badge(): void { $badge = new badge($this->badgeid); $this->assertInstanceOf('badge', $badge); @@ -1657,6 +1527,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, @@ -1711,6 +1582,8 @@ class badgeslib_test extends advanced_testcase { * @return array */ public static function badgr_open_url_generator(): array { + static::load_requirements(); + return [ 'Badgr Assertion URL test' => [ OPEN_BADGES_V2_TYPE_ASSERTION, "https://api.ca.badgr.io/public/assertions/123455" diff --git a/badges/tests/classes/badges_testcase.php b/badges/tests/classes/badges_testcase.php new file mode 100644 index 00000000000..930de11c619 --- /dev/null +++ b/badges/tests/classes/badges_testcase.php @@ -0,0 +1,184 @@ +. + +namespace core_badges\tests; + +use badge; +use core_tag_tag; +use stdClass; + +/** + * Unit tests for badges + * + * @package core_badges + * @copyright 2013 onwards Totara Learning Solutions Ltd {@link http://www.totaralms.com/} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @author Yuliya Bozhko + */ +abstract class badges_testcase extends \advanced_testcase { + protected $badgeid; + protected $course; + protected $user; + protected $module; + protected $coursebadge; + protected $assertion; + + /** @var $assertion2 to define json format for Open badge version 2 */ + protected $assertion2; + + #[\Override] + public static function setUpBeforeClass(): void { + parent::setUpBeforeClass(); + static::load_requirements(); + } + + /** + * Helper to load class dependencies. + * + * Note: This must be called in any data providers. + */ + protected static function load_requirements(): void { + global $CFG; + + require_once($CFG->libdir . '/badgeslib.php'); + require_once($CFG->dirroot . '/badges/lib.php'); + } + + #[\Override] + protected function setUp(): void { + global $DB, $CFG; + parent::setUp(); + $this->resetAfterTest(true); + $CFG->enablecompletion = true; + $user = $this->getDataGenerator()->create_user(); + $fordb = new stdClass(); + $fordb->id = null; + $fordb->name = "Test badge with 'apostrophe' and other friends (<>&@#)"; + $fordb->description = "Testing badges"; + $fordb->timecreated = time(); + $fordb->timemodified = time(); + $fordb->usercreated = $user->id; + $fordb->usermodified = $user->id; + $fordb->issuername = "Test issuer"; + $fordb->issuerurl = "http://issuer-url.domain.co.nz"; + $fordb->issuercontact = "issuer@example.com"; + $fordb->expiredate = null; + $fordb->expireperiod = null; + $fordb->type = BADGE_TYPE_SITE; + $fordb->version = 1; + $fordb->language = 'en'; + $fordb->courseid = null; + $fordb->messagesubject = "Test message subject"; + $fordb->message = "Test message body"; + $fordb->attachment = 1; + $fordb->notification = 0; + $fordb->imageauthorname = "Image Author 1"; + $fordb->imageauthoremail = "author@example.com"; + $fordb->imageauthorurl = "http://author-url.example.com"; + $fordb->imagecaption = "Test caption image"; + $fordb->status = BADGE_STATUS_INACTIVE; + + $this->badgeid = $DB->insert_record('badge', $fordb, true); + + // Set the default Issuer (because OBv2 needs them). + set_config('badges_defaultissuername', $fordb->issuername); + set_config('badges_defaultissuercontact', $fordb->issuercontact); + + // Create a course with activity and auto completion tracking. + $this->course = $this->getDataGenerator()->create_course(array('enablecompletion' => true)); + $this->user = $this->getDataGenerator()->create_user(); + $studentrole = $DB->get_record('role', array('shortname' => 'student')); + $this->assertNotEmpty($studentrole); + + // Get manual enrolment plugin and enrol user. + require_once($CFG->dirroot.'/enrol/manual/locallib.php'); + $manplugin = enrol_get_plugin('manual'); + $maninstance = $DB->get_record('enrol', array('courseid' => $this->course->id, 'enrol' => 'manual'), '*', MUST_EXIST); + $manplugin->enrol_user($maninstance, $this->user->id, $studentrole->id); + $this->assertEquals(1, $DB->count_records('user_enrolments')); + $completionauto = array('completion' => COMPLETION_TRACKING_AUTOMATIC); + $this->module = $this->getDataGenerator()->create_module('forum', array('course' => $this->course->id), $completionauto); + + // Build badge and criteria. + $fordb->type = BADGE_TYPE_COURSE; + $fordb->courseid = $this->course->id; + $fordb->status = BADGE_STATUS_ACTIVE; + $this->coursebadge = $DB->insert_record('badge', $fordb, true); + + // Insert Endorsement. + $endorsement = new stdClass(); + $endorsement->badgeid = $this->coursebadge; + $endorsement->issuername = "Issuer 123"; + $endorsement->issueremail = "issuer123@email.com"; + $endorsement->issuerurl = "https://example.org/issuer-123"; + $endorsement->dateissued = 1524567747; + $endorsement->claimid = "https://example.org/robotics-badge.json"; + $endorsement->claimcomment = "Test endorser comment"; + $DB->insert_record('badge_endorsement', $endorsement, true); + + // Insert related badges. + $badge = new badge($this->coursebadge); + $clonedid = $badge->make_clone(); + $badgeclone = new badge($clonedid); + $badgeclone->status = BADGE_STATUS_ACTIVE; + $badgeclone->save(); + + $relatebadge = new stdClass(); + $relatebadge->badgeid = $this->coursebadge; + $relatebadge->relatedbadgeid = $clonedid; + $relatebadge->relatedid = $DB->insert_record('badge_related', $relatebadge, true); + + // Insert a aligment. + $alignment = new stdClass(); + $alignment->badgeid = $this->coursebadge; + $alignment->targetname = 'CCSS.ELA-Literacy.RST.11-12.3'; + $alignment->targeturl = 'http://www.corestandards.org/ELA-Literacy/RST/11-12/3'; + $alignment->targetdescription = 'Test target description'; + $alignment->targetframework = 'CCSS.RST.11-12.3'; + $alignment->targetcode = 'CCSS.RST.11-12.3'; + $DB->insert_record('badge_alignment', $alignment, true); + + // Insert tags. + core_tag_tag::set_item_tags('core_badges', 'badge', $badge->id, $badge->get_context(), ['tag1', 'tag2']); + + $this->assertion = new stdClass(); + $this->assertion->badge = '{"uid":"%s","recipient":{"identity":"%s","type":"email","hashed":true,"salt":"%s"},' . + '"badge":"%s","verify":{"type":"hosted","url":"%s"},"issuedOn":"%d","evidence":"%s","tags":%s}'; + $this->assertion->class = '{"name":"%s","description":"%s","image":"%s","criteria":"%s","issuer":"%s","tags":%s}'; + $this->assertion->issuer = '{"name":"%s","url":"%s","email":"%s"}'; + // Format JSON-LD for Openbadge specification version 2.0. + $this->assertion2 = new stdClass(); + $this->assertion2->badge = '{"recipient":{"identity":"%s","type":"email","hashed":true,"salt":"%s"},' . + '"badge":{"name":"%s","description":"%s","image":"%s",' . + '"criteria":{"id":"%s","narrative":"%s"},"issuer":{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"},' . + '"tags":%s,"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"BadgeClass","version":"%s",' . + '"@language":"en","related":[{"id":"%s","version":"%s","@language":"%s"}],"endorsement":"%s",' . + '"alignments":[{"targetName":"%s","targetUrl":"%s","targetDescription":"%s","targetFramework":"%s",' . + '"targetCode":"%s"}]},"verify":{"type":"hosted","url":"%s"},"issuedOn":"%s","evidence":"%s","tags":%s,' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","type":"Assertion","id":"%s"}'; + + $this->assertion2->class = '{"name":"%s","description":"%s","image":"%s",' . + '"criteria":{"id":"%s","narrative":"%s"},"issuer":{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"},' . + '"tags":%s,"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"BadgeClass","version":"%s",' . + '"@language":"%s","related":[{"id":"%s","version":"%s","@language":"%s"}],"endorsement":"%s",' . + '"alignments":[{"targetName":"%s","targetUrl":"%s","targetDescription":"%s","targetFramework":"%s",' . + '"targetCode":"%s"}]}'; + $this->assertion2->issuer = '{"name":"%s","url":"%s","email":"%s",' . + '"@context":"https:\/\/w3id.org\/openbadges\/v2","id":"%s","type":"Issuer"}'; + } +} diff --git a/badges/tests/events_test.php b/badges/tests/events_test.php index ab411a9b542..4d713b20150 100644 --- a/badges/tests/events_test.php +++ b/badges/tests/events_test.php @@ -13,16 +13,8 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Badge events tests. - * - * @package core_badges - * @copyright 2015 onwards Simey Lameze - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -defined('MOODLE_INTERNAL') || die(); -global $CFG; -require_once($CFG->dirroot . '/badges/tests/badgeslib_test.php'); + +use core_badges\tests\badges_testcase; /** * Badge events tests class. @@ -31,13 +23,11 @@ require_once($CFG->dirroot . '/badges/tests/badgeslib_test.php'); * @copyright 2015 onwards Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends badgeslib_test { - +final class events_test extends badges_testcase { /** * Test badge awarded event. */ public function test_badge_awarded() { - $systemcontext = context_system::instance(); $sink = $this->redirectEvents(); @@ -62,8 +52,7 @@ class events_test extends badgeslib_test { * There is no external API for creating a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_created() { - + public function test_badge_created(): void { $badge = new badge($this->badgeid); // Trigger an event: badge created. $eventparams = array( @@ -85,7 +74,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -107,10 +95,8 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } - /** * Test the badge updated event. * @@ -130,8 +116,8 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } + /** * Test the badge deleted event. */ @@ -150,7 +136,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -172,7 +157,6 @@ class events_test extends badgeslib_test { $this->assertEquals($newid, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -195,7 +179,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -218,7 +201,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->objectid); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -227,8 +209,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_created() { - + public function test_badge_criteria_created(): void { $badge = new badge($this->badgeid); // Trigger and capture the event. @@ -248,7 +229,6 @@ class events_test extends badgeslib_test { $this->assertEquals($criteriaprofile->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -257,8 +237,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_updated() { - + public function test_badge_criteria_updated(): void { $criteriaoverall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_OVERALL, 'badgeid' => $this->badgeid)); $criteriaoverall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ALL)); $criteriaprofile = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_PROFILE, 'badgeid' => $this->badgeid)); @@ -281,7 +260,6 @@ class events_test extends badgeslib_test { $this->assertEquals($this->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -290,8 +268,7 @@ class events_test extends badgeslib_test { * There is no external API for this, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_criteria_deleted() { - + public function test_badge_criteria_deleted(): void { $criteriaoverall = award_criteria::build(array('criteriatype' => BADGE_CRITERIA_TYPE_OVERALL, 'badgeid' => $this->badgeid)); $criteriaoverall->save(array('agg' => BADGE_CRITERIA_AGGREGATION_ALL)); $badge = new badge($this->badgeid); @@ -308,7 +285,6 @@ class events_test extends badgeslib_test { $this->assertEquals($criteriaoverall->badgeid, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -317,8 +293,7 @@ class events_test extends badgeslib_test { * There is no external API for viewing a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_viewed() { - + public function test_badge_viewed(): void { $badge = new badge($this->badgeid); // Trigger an event: badge viewed. $other = array('badgeid' => $badge->id, 'badgehash' => '12345678'); @@ -340,7 +315,6 @@ class events_test extends badgeslib_test { $this->assertEquals($badge->id, $event->other['badgeid']); $this->assertDebuggingNotCalled(); $sink->close(); - } /** @@ -349,8 +323,7 @@ class events_test extends badgeslib_test { * There is no external API for viewing a badge, so the unit test will simply * create and trigger the event and ensure data is returned as expected. */ - public function test_badge_listing_viewed() { - + public function test_badge_listing_viewed(): void { // Trigger an event: badge listing viewed. $context = context_system::instance(); $eventparams = array( @@ -370,6 +343,5 @@ class events_test extends badgeslib_test { $this->assertEquals(BADGE_TYPE_SITE, $event->other['badgetype']); $this->assertDebuggingNotCalled(); $sink->close(); - } } diff --git a/badges/tests/external/external_test.php b/badges/tests/external/external_test.php index 6bbd8c739ec..9165e75f5aa 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 55367228237..0c75e0f2303 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 e7047eae453..1d56b1c6cd8 100644 --- a/badges/tests/output/manage_badge_action_bar_test.php +++ b/badges/tests/output/manage_badge_action_bar_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manage_badge_action_bar_test extends \advanced_testcase { +final class manage_badge_action_bar_test extends \advanced_testcase { /** * Data provider for test_generate_badge_navigation * diff --git a/badges/tests/privacy/provider_test.php b/badges/tests/privacy/provider_test.php index 128a6fd8dac..b380bb770c5 100644 --- a/badges/tests/privacy/provider_test.php +++ b/badges/tests/privacy/provider_test.php @@ -47,7 +47,7 @@ require_once($CFG->libdir . '/badgeslib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/badges/tests/reportbuilder/datasource/users_test.php b/badges/tests/reportbuilder/datasource/users_test.php index a8a9bd3f5dc..790287ccfad 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 00f74ad458c..16ae0b8e85e 100644 --- a/blocks/accessreview/tests/accessibility_review_test.php +++ b/blocks/accessreview/tests/accessibility_review_test.php @@ -30,7 +30,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_accessreview */ -class accessibility_review_test extends advanced_testcase { +final class accessibility_review_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_accessreview.php'); diff --git a/blocks/badges/tests/badges_test.php b/blocks/badges/tests/badges_test.php index 2bd60e552f3..3c945958b43 100644 --- a/blocks/badges/tests/badges_test.php +++ b/blocks/badges/tests/badges_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_badges */ -class badges_test extends advanced_testcase { +final class badges_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_badges.php'); diff --git a/blocks/blog_menu/tests/blog_menu_test.php b/blocks/blog_menu/tests/blog_menu_test.php index be1d28e840e..f77c8bf7f38 100644 --- a/blocks/blog_menu/tests/blog_menu_test.php +++ b/blocks/blog_menu/tests/blog_menu_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_menu */ -class blog_menu_test extends advanced_testcase { +final class blog_menu_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_menu.php'); diff --git a/blocks/blog_recent/tests/blog_recent_test.php b/blocks/blog_recent/tests/blog_recent_test.php index 6b69e6156bf..7e1553b1c2b 100644 --- a/blocks/blog_recent/tests/blog_recent_test.php +++ b/blocks/blog_recent/tests/blog_recent_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_recent */ -class blog_recent_test extends advanced_testcase { +final class blog_recent_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_recent.php'); diff --git a/blocks/blog_tags/tests/blog_tags_test.php b/blocks/blog_tags/tests/blog_tags_test.php index 6244e7def80..7f5dc86eaad 100644 --- a/blocks/blog_tags/tests/blog_tags_test.php +++ b/blocks/blog_tags/tests/blog_tags_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_tags */ -class blog_tags_test extends advanced_testcase { +final class blog_tags_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_tags.php'); diff --git a/blocks/comments/tests/comments_test.php b/blocks/comments/tests/comments_test.php index e19eb26e23d..0bd090fc044 100644 --- a/blocks/comments/tests/comments_test.php +++ b/blocks/comments/tests/comments_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_comments */ -class comments_test extends advanced_testcase { +final class comments_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_comments.php'); diff --git a/blocks/comments/tests/event/events_test.php b/blocks/comments/tests/event/events_test.php index 980d497b371..62ddf012b17 100644 --- a/blocks/comments/tests/event/events_test.php +++ b/blocks/comments/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace block_comments\event; * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass Keeps course object */ private $course; diff --git a/blocks/comments/tests/privacy/provider_test.php b/blocks/comments/tests/privacy/provider_test.php index f68574c456f..c977989303b 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 3c94431fe65..e2fb7e83e03 100644 --- a/blocks/html/tests/block_html_test.php +++ b/blocks/html/tests/block_html_test.php @@ -26,7 +26,7 @@ namespace block_html; * * @coversDefaultClass \block_html */ -class block_html_test extends \advanced_testcase { +final class block_html_test extends \advanced_testcase { /** * Tests instance files copying. * @covers ::instance_copy diff --git a/blocks/html/tests/privacy/provider_test.php b/blocks/html/tests/privacy/provider_test.php index e776d0ae662..d9d9cbf7124 100644 --- a/blocks/html/tests/privacy/provider_test.php +++ b/blocks/html/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use block_html\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Get the list of standard format options for comparison. * diff --git a/blocks/html/tests/search_content_test.php b/blocks/html/tests/search_content_test.php index c31566d9c30..e3fdde8a546 100644 --- a/blocks/html/tests/search_content_test.php +++ b/blocks/html/tests/search_content_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_content_test extends \advanced_testcase { +final class search_content_test extends \advanced_testcase { /** * Creates an HTML block on a course. diff --git a/blocks/lp/tests/lp_test.php b/blocks/lp/tests/lp_test.php index d93d91c0521..42e3150300b 100644 --- a/blocks/lp/tests/lp_test.php +++ b/blocks/lp/tests/lp_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_lp */ -class lp_test extends advanced_testcase { +final class lp_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_lp.php'); diff --git a/blocks/mnet_hosts/tests/mnet_hosts_test.php b/blocks/mnet_hosts/tests/mnet_hosts_test.php index a15a2ec8d35..2ca407327dc 100644 --- a/blocks/mnet_hosts/tests/mnet_hosts_test.php +++ b/blocks/mnet_hosts/tests/mnet_hosts_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_mnet_hosts */ -class mnet_hosts_test extends advanced_testcase { +final class mnet_hosts_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_mnet_hosts.php'); diff --git a/blocks/myoverview/tests/myoverview_test.php b/blocks/myoverview/tests/myoverview_test.php index f667cdc9c22..4da3d485734 100644 --- a/blocks/myoverview/tests/myoverview_test.php +++ b/blocks/myoverview/tests/myoverview_test.php @@ -24,7 +24,7 @@ namespace block_myoverview; * @copyright 2019 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class myoverview_test extends \advanced_testcase { +final class myoverview_test extends \advanced_testcase { /** * Test getting block configuration diff --git a/blocks/myoverview/tests/privacy/provider_test.php b/blocks/myoverview/tests/privacy/provider_test.php index f071cffb405..690602bd172 100644 --- a/blocks/myoverview/tests/privacy/provider_test.php +++ b/blocks/myoverview/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use block_myoverview\privacy\provider; * @copyright 2018 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. */ diff --git a/blocks/online_users/tests/generator_test.php b/blocks/online_users/tests/generator_test.php index 01079660a6b..92ce18c9c9c 100644 --- a/blocks/online_users/tests/generator_test.php +++ b/blocks/online_users/tests/generator_test.php @@ -24,8 +24,8 @@ namespace block_online_users; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/blocks/online_users/tests/online_users_test.php b/blocks/online_users/tests/online_users_test.php index 2f653ca62a5..6ec8f98a3d3 100644 --- a/blocks/online_users/tests/online_users_test.php +++ b/blocks/online_users/tests/online_users_test.php @@ -25,7 +25,7 @@ namespace block_online_users; * @author Barry Oosthuizen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class online_users_test extends \advanced_testcase { +final class online_users_test extends \advanced_testcase { protected $data; diff --git a/blocks/recentlyaccesseditems/tests/externallib_test.php b/blocks/recentlyaccesseditems/tests/externallib_test.php index 0d98f1e90ec..4dbd7a1aa3f 100644 --- a/blocks/recentlyaccesseditems/tests/externallib_test.php +++ b/blocks/recentlyaccesseditems/tests/externallib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.6 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test the get_recent_items function. diff --git a/blocks/recentlyaccesseditems/tests/helper_test.php b/blocks/recentlyaccesseditems/tests/helper_test.php index 3eff6f7e09a..129382f7089 100644 --- a/blocks/recentlyaccesseditems/tests/helper_test.php +++ b/blocks/recentlyaccesseditems/tests/helper_test.php @@ -24,7 +24,7 @@ namespace block_recentlyaccesseditems; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Tests that the get recent items method can handle getting records when courses have been deleted. */ diff --git a/blocks/recentlyaccesseditems/tests/observer_test.php b/blocks/recentlyaccesseditems/tests/observer_test.php index 774cb86d972..f5929f5e636 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 de95e8bcfc5..465a383e412 100644 --- a/blocks/recentlyaccesseditems/tests/privacy/provider_test.php +++ b/blocks/recentlyaccesseditems/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.6 */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/blocks/rss_client/tests/cron_test.php b/blocks/rss_client/tests/cron_test.php index b90b73fcd7f..ac2cd67dcad 100644 --- a/blocks/rss_client/tests/cron_test.php +++ b/blocks/rss_client/tests/cron_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../block_rss_client.php'); * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cron_test extends \advanced_testcase { +final class cron_test extends \advanced_testcase { /** * Test that when a record has a skipuntil time that is greater * than the current time the attempt is skipped. diff --git a/blocks/rss_client/tests/privacy/provider_test.php b/blocks/rss_client/tests/privacy/provider_test.php index e04f0b4fd3a..319cb356fed 100644 --- a/blocks/rss_client/tests/privacy/provider_test.php +++ b/blocks/rss_client/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/blocks/tag_youtube/tests/block_tag_youtube_test.php b/blocks/tag_youtube/tests/block_tag_youtube_test.php index deae56cfbdc..d72bbdb24f9 100644 --- a/blocks/tag_youtube/tests/block_tag_youtube_test.php +++ b/blocks/tag_youtube/tests/block_tag_youtube_test.php @@ -24,7 +24,7 @@ namespace block_tag_youtube; * @copyright 2015 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class block_tag_youtube_test extends \advanced_testcase { +final class block_tag_youtube_test extends \advanced_testcase { /** * Testing the tag youtube block's initial state after a new installation. diff --git a/blocks/tags/tests/tags_test.php b/blocks/tags/tests/tags_test.php index 4c69a5870c2..6b4009f56ed 100644 --- a/blocks/tags/tests/tags_test.php +++ b/blocks/tags/tests/tags_test.php @@ -29,7 +29,7 @@ use context_course; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_tags */ -class tags_test extends advanced_testcase { +final class tags_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_tags.php'); diff --git a/blocks/tests/externallib_test.php b/blocks/tests/externallib_test.php index 5d5b92784d6..17998612d94 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 eb6bcf1618e..082f1720f86 100644 --- a/blocks/tests/privacy/provider_test.php +++ b/blocks/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_block\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/blocks/timeline/tests/privacy/provider_test.php b/blocks/timeline/tests/privacy/provider_test.php index 6596744fa7b..04dc937e253 100644 --- a/blocks/timeline/tests/privacy/provider_test.php +++ b/blocks/timeline/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use block_timeline\privacy\provider; * @copyright 2018 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Ensure that export_user_preferences returns no data if the user has not visited the myoverview block. diff --git a/blog/tests/event/events_test.php b/blog/tests/event/events_test.php index 23c5a5223d9..a9b91483bca 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 c1dc8f13b46..3b4b3aa7a83 100644 --- a/blog/tests/external/external_test.php +++ b/blog/tests/external/external_test.php @@ -39,8 +39,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); * @copyright 2018 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends \advanced_testcase { - +final class external_test extends \externallib_advanced_testcase { private $courseid; private $cmid; private $userid; diff --git a/blog/tests/lib_test.php b/blog/tests/lib_test.php index 345e9d2936e..0f2a652bcd4 100644 --- a/blog/tests/lib_test.php +++ b/blog/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/blog/lib.php'); /** * Test functions that rely on the DB tables */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { private $courseid; private $cmid; diff --git a/blog/tests/privacy/provider_test.php b/blog/tests/privacy/provider_test.php index a2fe8eb0de0..d4ab7b83484 100644 --- a/blog/tests/privacy/provider_test.php +++ b/blog/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/blog/tests/reportbuilder/datasource/blogs_test.php b/blog/tests/reportbuilder/datasource/blogs_test.php index e665e79f8a4..7521c59834d 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 975ac673897..e8da59b21d2 100644 --- a/cache/stores/apcu/tests/store_test.php +++ b/cache/stores/apcu/tests/store_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/cache/stores/apcu/lib.php'); * @copyright 2014 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the apcu class name * @return string diff --git a/cache/stores/file/tests/asyncpurge_test.php b/cache/stores/file/tests/asyncpurge_test.php index 6611aecf11e..2ebde57b2b1 100644 --- a/cache/stores/file/tests/asyncpurge_test.php +++ b/cache/stores/file/tests/asyncpurge_test.php @@ -29,7 +29,7 @@ use cachestore_file; * @author Jackson D'Souza * @coversDefaultClass \cachestore_file */ -class asyncpurge_test extends \advanced_testcase { +final class asyncpurge_test extends \advanced_testcase { /** * Testing Asynchronous file store cache purge diff --git a/cache/stores/file/tests/store_test.php b/cache/stores/file/tests/store_test.php index d39725bd2c7..21da9c6aeea 100644 --- a/cache/stores/file/tests/store_test.php +++ b/cache/stores/file/tests/store_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot.'/cache/stores/file/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \cachestore_file */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the file class name * @return string diff --git a/cache/stores/redis/tests/compressor_test.php b/cache/stores/redis/tests/compressor_test.php index 5158554eefd..a130586b1ca 100644 --- a/cache/stores/redis/tests/compressor_test.php +++ b/cache/stores/redis/tests/compressor_test.php @@ -36,7 +36,7 @@ require_once(__DIR__.'/../lib.php'); * @copyright 2018 Catalyst IT Australia {@link http://www.catalyst-au.net} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class compressor_test extends \advanced_testcase { +final class compressor_test extends \advanced_testcase { /** * Test set up diff --git a/cache/stores/redis/tests/store_test.php b/cache/stores/redis/tests/store_test.php index 525848bf06b..f4292715067 100644 --- a/cache/stores/redis/tests/store_test.php +++ b/cache/stores/redis/tests/store_test.php @@ -38,7 +38,7 @@ require_once(__DIR__.'/../lib.php'); * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * @var cachestore_redis */ diff --git a/cache/stores/session/tests/store_test.php b/cache/stores/session/tests/store_test.php index 0c9ec4a1e13..19b8ecefec6 100644 --- a/cache/stores/session/tests/store_test.php +++ b/cache/stores/session/tests/store_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/cache/stores/session/lib.php'); * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the session class name * @return string diff --git a/cache/stores/static/tests/store_test.php b/cache/stores/static/tests/store_test.php index 0e4615a42c8..38dba4c75df 100644 --- a/cache/stores/static/tests/store_test.php +++ b/cache/stores/static/tests/store_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/cache/stores/static/lib.php'); * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class store_test extends \cachestore_tests { +final class store_test extends \cachestore_tests { /** * Returns the static class name * @return string diff --git a/calendar/tests/action_event_test.php b/calendar/tests/action_event_test.php index ab77a88edf2..171831bfe80 100644 --- a/calendar/tests/action_event_test.php +++ b/calendar/tests/action_event_test.php @@ -41,7 +41,7 @@ defined('MOODLE_INTERNAL') || die; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_event_test extends \advanced_testcase { +final class action_event_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/action_factory_test.php b/calendar/tests/action_factory_test.php index e6e1507673d..70b4f62ed86 100644 --- a/calendar/tests/action_factory_test.php +++ b/calendar/tests/action_factory_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\entities\action_interface; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_factory_test extends \advanced_testcase { +final class action_factory_test extends \advanced_testcase { /** * Test action factory. */ diff --git a/calendar/tests/action_test.php b/calendar/tests/action_test.php index 553db87369d..e2f44f549b7 100644 --- a/calendar/tests/action_test.php +++ b/calendar/tests/action_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\action; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_test extends \advanced_testcase { +final class action_test extends \advanced_testcase { /** * Test action class getters. * diff --git a/calendar/tests/calendar_event_exporter_test.php b/calendar/tests/calendar_event_exporter_test.php index c146a11ed3a..d78c520dc49 100644 --- a/calendar/tests/calendar_event_exporter_test.php +++ b/calendar/tests/calendar_event_exporter_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_event_exporter_test extends \advanced_testcase { +final class calendar_event_exporter_test extends \advanced_testcase { /** * Data provider for the timestamp min limit test case to confirm * that the minimum time limit is set correctly on the boundary cases. diff --git a/calendar/tests/calendar_information_test.php b/calendar/tests/calendar_information_test.php index ac8761d9b8d..c7919f0fcb8 100644 --- a/calendar/tests/calendar_information_test.php +++ b/calendar/tests/calendar_information_test.php @@ -27,7 +27,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_information_test extends \advanced_testcase { +final class calendar_information_test extends \advanced_testcase { /** * Helper to mock a course and category structure. diff --git a/calendar/tests/calendartype_test.php b/calendar/tests/calendartype_test.php index 57d5038a2f8..51443036b2b 100644 --- a/calendar/tests/calendartype_test.php +++ b/calendar/tests/calendartype_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/user/profile/definelib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.6 */ -class calendartype_test extends \advanced_testcase { +final class calendartype_test extends \advanced_testcase { /** @var MoodleQuickForm Keeps reference of dummy form object */ private $mform; diff --git a/calendar/tests/cm_info_proxy_test.php b/calendar/tests/cm_info_proxy_test.php index fcab933fae7..650e3dea347 100644 --- a/calendar/tests/cm_info_proxy_test.php +++ b/calendar/tests/cm_info_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\cm_info_proxy; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cm_info_proxy_test extends \advanced_testcase { +final class cm_info_proxy_test extends \advanced_testcase { /** * Test creating cm_info_std_proxy, using getter and setter. diff --git a/calendar/tests/container_test.php b/calendar/tests/container_test.php index b4500815f1b..b1a57506386 100644 --- a/calendar/tests/container_test.php +++ b/calendar/tests/container_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class container_test extends \advanced_testcase { +final class container_test extends \advanced_testcase { /** * Test setup. diff --git a/calendar/tests/coursecat_proxy_test.php b/calendar/tests/coursecat_proxy_test.php index 669105cae29..4df2877b4a2 100644 --- a/calendar/tests/coursecat_proxy_test.php +++ b/calendar/tests/coursecat_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\coursecat_proxy; * @copyright 2017 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class coursecat_proxy_test extends \advanced_testcase { +final class coursecat_proxy_test extends \advanced_testcase { public function test_valid_coursecat() { global $DB; diff --git a/calendar/tests/event/events_test.php b/calendar/tests/event/events_test.php index b7019305f25..c0c34fdff5c 100644 --- a/calendar/tests/event/events_test.php +++ b/calendar/tests/event/events_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/calendar/tests/externallib_test.php'); * @copyright 2014 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * The test user. diff --git a/calendar/tests/event_description_test.php b/calendar/tests/event_description_test.php index b58213a9c37..3e2c998db64 100644 --- a/calendar/tests/event_description_test.php +++ b/calendar/tests/event_description_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\event_description; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_description_test extends \advanced_testcase { +final class event_description_test extends \advanced_testcase { /** * Test event description class getters. * diff --git a/calendar/tests/event_factory_test.php b/calendar/tests/event_factory_test.php index e56e26ec713..623d4a0fd4f 100644 --- a/calendar/tests/event_factory_test.php +++ b/calendar/tests/event_factory_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_factory_test extends \advanced_testcase { +final class event_factory_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/event_mapper_test.php b/calendar/tests/event_mapper_test.php index 2fe720b51df..e1a460ff35b 100644 --- a/calendar/tests/event_mapper_test.php +++ b/calendar/tests/event_mapper_test.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_mapper_test extends \advanced_testcase { +final class event_mapper_test extends \advanced_testcase { /** * Test legacy event -> event. */ diff --git a/calendar/tests/event_test.php b/calendar/tests/event_test.php index a2f31d74834..9d71794b060 100644 --- a/calendar/tests/event_test.php +++ b/calendar/tests/event_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_test extends \advanced_testcase { +final class event_test extends \advanced_testcase { /** * Test event class getters. * diff --git a/calendar/tests/event_times_test.php b/calendar/tests/event_times_test.php index 0b3904ccd37..f7aa6f9368d 100644 --- a/calendar/tests/event_times_test.php +++ b/calendar/tests/event_times_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\value_objects\event_times; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_times_test extends \advanced_testcase { +final class event_times_test extends \advanced_testcase { /** * Test event times class getters. * diff --git a/calendar/tests/event_vault_test.php b/calendar/tests/event_vault_test.php index 579e6461f3a..c2d7edc0f7f 100644 --- a/calendar/tests/event_vault_test.php +++ b/calendar/tests/event_vault_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/calendar/tests/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_vault_test extends \advanced_testcase { +final class event_vault_test extends \advanced_testcase { /** * Test that get_action_events_by_timesort returns events after the diff --git a/calendar/tests/events_related_objects_cache_test.php b/calendar/tests/events_related_objects_cache_test.php index 91ed2a3ff48..51f952cc748 100644 --- a/calendar/tests/events_related_objects_cache_test.php +++ b/calendar/tests/events_related_objects_cache_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_related_objects_cache_test extends \advanced_testcase { +final class events_related_objects_cache_test extends \advanced_testcase { /** * Tests set up diff --git a/calendar/tests/externallib_test.php b/calendar/tests/externallib_test.php index b1fe8eb9378..355a205b52d 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 00cc2bc2aad..2d6e9628ca4 100644 --- a/calendar/tests/lib_test.php +++ b/calendar/tests/lib_test.php @@ -23,7 +23,7 @@ namespace core_calendar; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/calendar/tests/local_api_test.php b/calendar/tests/local_api_test.php index 0d3e7d1184e..abe24c132fd 100644 --- a/calendar/tests/local_api_test.php +++ b/calendar/tests/local_api_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_calendar\local\api */ -class local_api_test extends \advanced_testcase { +final class local_api_test extends \advanced_testcase { /** * Tests set up diff --git a/calendar/tests/privacy/provider_test.php b/calendar/tests/privacy/provider_test.php index 12f8ac248cf..fbd7871504a 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 235d68fe7f2..7c79a9a1518 100644 --- a/calendar/tests/raw_event_retrieval_strategy_test.php +++ b/calendar/tests/raw_event_retrieval_strategy_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/calendar/tests/helpers.php'); * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class raw_event_retrieval_strategy_test extends \advanced_testcase { +final class raw_event_retrieval_strategy_test extends \advanced_testcase { /** * Test retrieval strategy when module is disabled. */ diff --git a/calendar/tests/repeat_event_collection_test.php b/calendar/tests/repeat_event_collection_test.php index 935eb2bf159..6a251e7d157 100644 --- a/calendar/tests/repeat_event_collection_test.php +++ b/calendar/tests/repeat_event_collection_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repeat_event_collection_test extends \advanced_testcase { +final class repeat_event_collection_test extends \advanced_testcase { /** * Test that the collection id is set to the parent id if the repeat id * is falsey. diff --git a/calendar/tests/rrule_manager_test.php b/calendar/tests/rrule_manager_test.php index ed9a3c11994..a5717aea78b 100644 --- a/calendar/tests/rrule_manager_test.php +++ b/calendar/tests/rrule_manager_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rrule_manager_test extends \advanced_testcase { +final class rrule_manager_test extends \advanced_testcase { /** @var calendar_event a dummy event */ protected $event; diff --git a/calendar/tests/std_proxy_test.php b/calendar/tests/std_proxy_test.php index 5de821581b7..8f879d537f3 100644 --- a/calendar/tests/std_proxy_test.php +++ b/calendar/tests/std_proxy_test.php @@ -25,7 +25,7 @@ use core_calendar\local\event\proxies\std_proxy; * @copyright 2017 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class std_proxy_test extends \advanced_testcase { +final class std_proxy_test extends \advanced_testcase { /** * @var \stdClass[] $objects Array of objects to proxy. */ diff --git a/cohort/tests/customfield/cohort_handler_test.php b/cohort/tests/customfield/cohort_handler_test.php index ffcd5a13f5d..07d4d83d2a0 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 0d25c58ff9f..95d406da0cd 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 8bf48250d1c..4882a57959e 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 7f1fc5a8b0f..87609caedcf 100644 --- a/cohort/tests/privacy/provider_test.php +++ b/cohort/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/cohort/tests/reportbuilder/audience/cohortmember_test.php b/cohort/tests/reportbuilder/audience/cohortmember_test.php index bfd7620cb2d..8354fa30667 100644 --- a/cohort/tests/reportbuilder/audience/cohortmember_test.php +++ b/cohort/tests/reportbuilder/audience/cohortmember_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cohortmember_test extends advanced_testcase { +final class cohortmember_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/cohort/tests/reportbuilder/datasource/cohorts_test.php b/cohort/tests/reportbuilder/datasource/cohorts_test.php index 91e807a411f..dde980d64a0 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 29bbd81fa0c..9243db8c7fc 100644 --- a/comment/tests/context_freeze_test.php +++ b/comment/tests/context_freeze_test.php @@ -28,7 +28,7 @@ use core_comment_external; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class context_freeze_test extends \advanced_testcase { +final class context_freeze_test extends \advanced_testcase { /** * Creates a comment by a student. * diff --git a/comment/tests/externallib_test.php b/comment/tests/externallib_test.php index 4ac3746dc2f..16a61f6f615 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 4e49cf29a56..6788ba7ac3b 100644 --- a/comment/tests/privacy/provider_test.php +++ b/comment/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\tests\request\approved_contextlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { protected function setUp(): void { $this->resetAfterTest(); diff --git a/comment/tests/reportbuilder/datasource/comments_test.php b/comment/tests/reportbuilder/datasource/comments_test.php index 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 91071e01022..21b4721b33c 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 c255f26ed63..426a3743d61 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 00680e242ad..a044034c1fb 100644 --- a/communication/provider/matrix/tests/matrix_client_test.php +++ b/communication/provider/matrix/tests/matrix_client_test.php @@ -40,7 +40,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 9ac4156d206..1148a66e96b 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 e23e5e81a9a..7835c34ca59 100644 --- a/communication/tests/api_test.php +++ b/communication/tests/api_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\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/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 ab1eaebd6f9..c58c2599d5e 100644 --- a/competency/tests/api_test.php +++ b/competency/tests/api_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { public function test_get_framework_related_contexts() { $this->resetAfterTest(true); diff --git a/competency/tests/competency_override_test.php b/competency/tests/competency_override_test.php index 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 893fa724c45..0ba327c034c 100644 --- a/competency/tests/competency_rule_test.php +++ b/competency/tests/competency_rule_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class competency_rule_test extends \externallib_advanced_testcase { +final class competency_rule_test extends \externallib_advanced_testcase { public function test_rule_all_matching() { $this->resetAfterTest(true); diff --git a/competency/tests/competency_test.php b/competency/tests/competency_test.php index eb1c3d523ae..08c6b5912b9 100644 --- a/competency/tests/competency_test.php +++ b/competency/tests/competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class competency_test extends \advanced_testcase { +final class competency_test extends \advanced_testcase { public function test_get_framework_depth() { $this->resetAfterTest(); diff --git a/competency/tests/course_competency_settings_test.php b/competency/tests/course_competency_settings_test.php index b825af74325..b48a6ca0df3 100644 --- a/competency/tests/course_competency_settings_test.php +++ b/competency/tests/course_competency_settings_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_competency_settings_test extends \advanced_testcase { +final class course_competency_settings_test extends \advanced_testcase { public function test_who_can_change_settings() { global $CFG, $DB; diff --git a/competency/tests/course_competency_test.php b/competency/tests/course_competency_test.php index ae1da6a99c8..e75b85ab800 100644 --- a/competency/tests/course_competency_test.php +++ b/competency/tests/course_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_competency_test extends \advanced_testcase { +final class course_competency_test extends \advanced_testcase { public function test_get_courses_with_competency_and_user() { global $CFG, $DB; diff --git a/competency/tests/course_module_competency_test.php b/competency/tests/course_module_competency_test.php index 1d7bd3b0ac2..bd1d2cfaea6 100644 --- a/competency/tests/course_module_competency_test.php +++ b/competency/tests/course_module_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2019 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_module_competency_test extends \advanced_testcase { +final class course_module_competency_test extends \advanced_testcase { public function test_count_competencies() { global $CFG, $DB; diff --git a/competency/tests/event/events_test.php b/competency/tests/event/events_test.php index 3c916dfeb88..8f10196dbf7 100644 --- a/competency/tests/event/events_test.php +++ b/competency/tests/event/events_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @copyright 2016 Serge Gauthier * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test the competency framework created event. diff --git a/competency/tests/external/external_test.php b/competency/tests/external/external_test.php index 04ad174dc1f..7de22b3344d 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 d520dc147c6..b86e485bf0b 100644 --- a/competency/tests/generator_test.php +++ b/competency/tests/generator_test.php @@ -24,7 +24,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_framework() { $this->resetAfterTest(true); diff --git a/competency/tests/hooks_test.php b/competency/tests/hooks_test.php index 595d31c17c3..3f3e251bcd6 100644 --- a/competency/tests/hooks_test.php +++ b/competency/tests/hooks_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class hooks_test extends \advanced_testcase { +final class hooks_test extends \advanced_testcase { public function test_hook_course_deleted() { $this->resetAfterTest(); diff --git a/competency/tests/lib_test.php b/competency/tests/lib_test.php index 660d4c4dfae..b9e128eb88f 100644 --- a/competency/tests/lib_test.php +++ b/competency/tests/lib_test.php @@ -38,7 +38,7 @@ global $CFG; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_comment_add_user_competency() { global $DB, $PAGE; diff --git a/competency/tests/performance_helper_test.php b/competency/tests/performance_helper_test.php index ae9477da573..13b67a9cba0 100644 --- a/competency/tests/performance_helper_test.php +++ b/competency/tests/performance_helper_test.php @@ -25,7 +25,7 @@ use core_competency\external\performance_helper; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class performance_helper_test extends \advanced_testcase { +final class performance_helper_test extends \advanced_testcase { public function test_get_context_from_competency() { global $DB; diff --git a/competency/tests/plan_test.php b/competency/tests/plan_test.php index b71e0d9d826..0e0b54fa9bb 100644 --- a/competency/tests/plan_test.php +++ b/competency/tests/plan_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plan_test extends \advanced_testcase { +final class plan_test extends \advanced_testcase { public function test_can_manage_user() { $this->resetAfterTest(true); diff --git a/competency/tests/privacy/provider_test.php b/competency/tests/privacy/provider_test.php index 8ec02a78e05..6febc05f18d 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 cbca259d5a9..ee121a1bb89 100644 --- a/competency/tests/task/task_test.php +++ b/competency/tests/task/task_test.php @@ -27,7 +27,7 @@ use core_competency\template; * @copyright 2015 Issam Taboubi * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class task_test extends \advanced_testcase { +final class task_test extends \advanced_testcase { public function test_sync_plans_from_cohorts_task() { global $DB; diff --git a/competency/tests/template_test.php b/competency/tests/template_test.php index 6087ca7fb25..1ac76ac1766 100644 --- a/competency/tests/template_test.php +++ b/competency/tests/template_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class template_test extends \advanced_testcase { +final class template_test extends \advanced_testcase { public function test_validate_duedate() { global $DB; diff --git a/competency/tests/user_evidence_competency_test.php b/competency/tests/user_evidence_competency_test.php index 60090b43233..d5400741e00 100644 --- a/competency/tests/user_evidence_competency_test.php +++ b/competency/tests/user_evidence_competency_test.php @@ -23,7 +23,7 @@ namespace core_competency; * @copyright 2016 Serge Gauthier - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_evidence_competency_test extends \advanced_testcase { +final class user_evidence_competency_test extends \advanced_testcase { public function test_get_user_competencies_by_userevidenceid() { global $CFG, $DB; diff --git a/completion/tests/activity_custom_completion_test.php b/completion/tests/activity_custom_completion_test.php index a5fc9133ffe..d6acb671a80 100644 --- a/completion/tests/activity_custom_completion_test.php +++ b/completion/tests/activity_custom_completion_test.php @@ -30,7 +30,7 @@ use PHPUnit\Framework\MockObject\MockObject; * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_custom_completion_test extends advanced_testcase { +final class activity_custom_completion_test extends advanced_testcase { /** * Fetches a mocked activity_custom_completion instance. diff --git a/completion/tests/api_test.php b/completion/tests/api_test.php index 5a92d85e59d..8d4e89eb067 100644 --- a/completion/tests/api_test.php +++ b/completion/tests/api_test.php @@ -24,7 +24,7 @@ namespace core_completion; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test setup. diff --git a/completion/tests/bulk_update_test.php b/completion/tests/bulk_update_test.php index b2ed85c40ab..e32d33b15e2 100644 --- a/completion/tests/bulk_update_test.php +++ b/completion/tests/bulk_update_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2017 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class bulk_update_test extends \advanced_testcase { +final class bulk_update_test extends \advanced_testcase { /** * Provider for test_bulk_form_submit_single diff --git a/completion/tests/capabilities_test.php b/completion/tests/capabilities_test.php index cf6e58383b4..0d069288bbb 100644 --- a/completion/tests/capabilities_test.php +++ b/completion/tests/capabilities_test.php @@ -24,7 +24,7 @@ namespace core_completion; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class capabilities_test extends \advanced_testcase { +final class capabilities_test extends \advanced_testcase { /** * A user who does not have capabilities to add events to the calendar should be able to create activities. */ diff --git a/completion/tests/cm_completion_details_test.php b/completion/tests/cm_completion_details_test.php index 15034fbf50c..0de7d5bc11d 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 4c0008bd9ed..dbd323682ce 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 5f14d51b95a..4e261a5d218 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 6d1d81948a6..5c759990c51 100644 --- a/completion/tests/privacy/provider_test.php +++ b/completion/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/completion/tests/fixtures/completion_creation.php * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { use \completion_creation; diff --git a/completion/tests/progress_test.php b/completion/tests/progress_test.php index 51a6b576678..58b514fc7b9 100644 --- a/completion/tests/progress_test.php +++ b/completion/tests/progress_test.php @@ -26,7 +26,7 @@ use completion_completion; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class progress_test extends \advanced_testcase { +final class progress_test extends \advanced_testcase { /** * Test setup. diff --git a/contentbank/contenttype/h5p/tests/content_h5p_test.php b/contentbank/contenttype/h5p/tests/content_h5p_test.php index f7cdeb03b2d..8e71a8d5324 100644 --- a/contentbank/contenttype/h5p/tests/content_h5p_test.php +++ b/contentbank/contenttype/h5p/tests/content_h5p_test.php @@ -25,7 +25,7 @@ namespace contenttype_h5p; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \contenttype_h5p\content */ -class content_h5p_test extends \advanced_testcase { +final class content_h5p_test extends \advanced_testcase { /** * Tests for uploaded file. diff --git a/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php b/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php index 592072817ba..8ec5eb92c6f 100644 --- a/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php +++ b/contentbank/contenttype/h5p/tests/contenttype_h5p_test.php @@ -25,7 +25,7 @@ namespace contenttype_h5p; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \contenttype_h5p\contenttype */ -class contenttype_h5p_test extends \advanced_testcase { +final class contenttype_h5p_test extends \advanced_testcase { /** * Test the behaviour of delete_content(). diff --git a/contentbank/tests/content_test.php b/contentbank/tests/content_test.php index cee3b9cd813..fa7474b2a66 100644 --- a/contentbank/tests/content_test.php +++ b/contentbank/tests/content_test.php @@ -39,7 +39,7 @@ use contenttype_testable\contenttype as contenttype; * @coversDefaultClass \core_contentbank\content * */ -class content_test extends \advanced_testcase { +final class content_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/contentbank/tests/contentbank_test.php b/contentbank/tests/contentbank_test.php index c7f369f1d26..05d99084b41 100644 --- a/contentbank/tests/contentbank_test.php +++ b/contentbank/tests/contentbank_test.php @@ -49,7 +49,7 @@ require_once($CFG->dirroot . '/contentbank/tests/fixtures/testable_content.php') * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_contentbank\contentbank */ -class contentbank_test extends advanced_testcase { +final class contentbank_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/contentbank/tests/contenttype_test.php b/contentbank/tests/contenttype_test.php index 0a7618a6c5d..17fc7c6824d 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 7929e09d647..f86ff673b71 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 5a0a890d141..d4ce63faf8d 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 959c7aa2097..bb32e83772e 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 61e31e93d3d..3ebdeac7f69 100644 --- a/contentbank/tests/privacy/provider_test.php +++ b/contentbank/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2020 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/base_test.php b/course/format/tests/base_test.php index 59f7d03295e..47a71684244 100644 --- a/course/format/tests/base_test.php +++ b/course/format/tests/base_test.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\base */ -class base_test extends advanced_testcase { +final class base_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/external/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 6a0595e85ed..81f7f863bae 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 0691132da30..09fee3f8940 100644 --- a/course/format/tests/external/update_course_test.php +++ b/course/format/tests/external/update_course_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\external\update_course */ -class update_course_test extends \externallib_advanced_testcase { +final class update_course_test extends \externallib_advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/output/activitybadge_test.php b/course/format/tests/output/activitybadge_test.php index 3fbd428cc3b..3b12dba81e9 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 30c89c101bf..69c79ac89e7 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 a1636122438..eea4e357e50 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 7943b077554..b8d03366eb4 100644 --- a/course/format/tests/output/local/state/state_test.php +++ b/course/format/tests/output/local/state/state_test.php @@ -24,7 +24,7 @@ namespace core_courseformat\output\local\state; * @copyright 2021 Ilya Tregubov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class state_test extends \advanced_testcase { +final class state_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/course/format/tests/privacy/provider_test.php b/course/format/tests/privacy/provider_test.php index ada7676399e..d7960bc5c96 100644 --- a/course/format/tests/privacy/provider_test.php +++ b/course/format/tests/privacy/provider_test.php @@ -27,7 +27,7 @@ use core_privacy\local\request\writer; * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::test_export_user_preferences(). diff --git a/course/format/tests/stateupdates_test.php b/course/format/tests/stateupdates_test.php index 183d8114611..b6eef17f241 100644 --- a/course/format/tests/stateupdates_test.php +++ b/course/format/tests/stateupdates_test.php @@ -27,7 +27,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_courseformat\stateupdates */ -class stateupdates_test extends \advanced_testcase { +final class stateupdates_test extends \advanced_testcase { /** * Test for add_course_put. diff --git a/course/format/topics/tests/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 eca87a7f7cc..35fecb56578 100644 --- a/course/format/topics/tests/format_topics_test.php +++ b/course/format/topics/tests/format_topics_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2015 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_topics_test extends \advanced_testcase { +final class format_topics_test extends \advanced_testcase { /** * Tests for format_topics::get_section_name method with default section names. diff --git a/course/format/weeks/tests/format_weeks_test.php b/course/format/weeks/tests/format_weeks_test.php index 82f82ced5a2..216af87961e 100644 --- a/course/format/weeks/tests/format_weeks_test.php +++ b/course/format/weeks/tests/format_weeks_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2015 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_weeks_test extends \advanced_testcase { +final class format_weeks_test extends \advanced_testcase { /** * Tests for format_weeks::get_section_name method with default section names. diff --git a/course/format/weeks/tests/observer_test.php b/course/format/weeks/tests/observer_test.php index 4ab42703a63..8da491a2276 100644 --- a/course/format/weeks/tests/observer_test.php +++ b/course/format/weeks/tests/observer_test.php @@ -23,7 +23,7 @@ namespace format_weeks; * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class observer_test extends \advanced_testcase { +final class observer_test extends \advanced_testcase { /** * Test setup. diff --git a/course/tests/analytics/indicators_test.php b/course/tests/analytics/indicators_test.php index 7a1baab8bf1..ee6d068335d 100644 --- a/course/tests/analytics/indicators_test.php +++ b/course/tests/analytics/indicators_test.php @@ -31,7 +31,7 @@ require_once(__DIR__ . '/../../../analytics/tests/fixtures/test_target_course_us * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class indicators_test extends \advanced_testcase { +final class indicators_test extends \advanced_testcase { /** * test_no_teacher diff --git a/course/tests/backup/restore_test.php b/course/tests/backup/restore_test.php index 85bf9004d24..478b7dd02c6 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 9759649927e..ddb6187060a 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 ffb76c63901..dd1497dd7a8 100644 --- a/course/tests/caching_content_item_readonly_repository_test.php +++ b/course/tests/caching_content_item_readonly_repository_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\caching_content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class caching_content_item_readonly_repository_test extends \advanced_testcase { +final class caching_content_item_readonly_repository_test extends \advanced_testcase { /** * Test verifying that content items are cached and returned from the cache in subsequent same-request calls. */ diff --git a/course/tests/category_hooks_test.php b/course/tests/category_hooks_test.php index 17d347a465c..5a45c9c17db 100644 --- a/course/tests/category_hooks_test.php +++ b/course/tests/category_hooks_test.php @@ -36,7 +36,7 @@ use core_course\test\mock_hooks; /** * Functional test for class core_course_category methods invoking hooks. */ -class category_hooks_test extends \advanced_testcase { +final class category_hooks_test extends \advanced_testcase { protected function setUp(): void { $this->resetAfterTest(); diff --git a/course/tests/category_test.php b/course/tests/category_test.php index bc51b31295a..45eb4c1110d 100644 --- a/course/tests/category_test.php +++ b/course/tests/category_test.php @@ -26,7 +26,7 @@ use core_course_category; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class category_test extends \advanced_testcase { +final class category_test extends \advanced_testcase { protected $roles; diff --git a/course/tests/content_item_readonly_repository_test.php b/course/tests/content_item_readonly_repository_test.php index 681851bd5ce..debdc0eb290 100644 --- a/course/tests/content_item_readonly_repository_test.php +++ b/course/tests/content_item_readonly_repository_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_item_readonly_repository_test extends \advanced_testcase { +final class content_item_readonly_repository_test extends \advanced_testcase { /** * Test the repository method, find_all_for_course(). */ diff --git a/course/tests/content_item_test.php b/course/tests/content_item_test.php index 6742c4f151a..0fe45db83bb 100644 --- a/course/tests/content_item_test.php +++ b/course/tests/content_item_test.php @@ -38,7 +38,7 @@ use core_course\local\entity\string_title; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_item_test extends \advanced_testcase { +final class content_item_test extends \advanced_testcase { /** * Test the content_item class. diff --git a/course/tests/course_delete_modules_test.php b/course/tests/course_delete_modules_test.php index 28e241f6cf8..c08fd1c53ed 100644 --- a/course/tests/course_delete_modules_test.php +++ b/course/tests/course_delete_modules_test.php @@ -32,7 +32,7 @@ namespace core_course; * @copyright 2021 Tomo Tsuyuki * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_delete_modules_test extends \advanced_testcase { +final class course_delete_modules_test extends \advanced_testcase { /** * Test to have a no message for usual process. diff --git a/course/tests/course_format_function_test.php b/course/tests/course_format_function_test.php index 6e89eca9786..20d7d6038a6 100644 --- a/course/tests/course_format_function_test.php +++ b/course/tests/course_format_function_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/course/format/lib.php'); * @author Jason den Dulk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_format_function_test extends \basic_testcase { +final class course_format_function_test extends \basic_testcase { /** * Tests clean_param_if_not_null function diff --git a/course/tests/course_image_cache_test.php b/course/tests/course_image_cache_test.php index c3fffd79c21..2a3cc45360a 100644 --- a/course/tests/course_image_cache_test.php +++ b/course/tests/course_image_cache_test.php @@ -31,7 +31,7 @@ use core_course\cache\course_image; * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_image_cache_test extends \advanced_testcase { +final class course_image_cache_test extends \advanced_testcase { /** * Initial setup. diff --git a/course/tests/course_summary_exporter_test.php b/course/tests/course_summary_exporter_test.php index b9fb8f120d0..e985307d59a 100644 --- a/course/tests/course_summary_exporter_test.php +++ b/course/tests/course_summary_exporter_test.php @@ -29,7 +29,7 @@ use context_course; * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_summary_exporter_test extends \advanced_testcase { +final class course_summary_exporter_test extends \advanced_testcase { /** * Test that if no course overview images uploaded get_course_image returns false. diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index ff71f63551d..e10967c7902 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -63,7 +63,7 @@ require_once($CFG->dirroot . '/course/lib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courselib_test extends advanced_testcase { +final class courselib_test extends advanced_testcase { /** * Load required libraries and fixtures. diff --git a/course/tests/courserequest_test.php b/course/tests/courserequest_test.php index e47df520e4b..32e00065341 100644 --- a/course/tests/courserequest_test.php +++ b/course/tests/courserequest_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/course/lib.php'); * @copyright 2012 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courserequest_test extends \advanced_testcase { +final class courserequest_test extends \advanced_testcase { public function test_create_request() { global $DB, $USER; diff --git a/course/tests/customfield_test.php b/course/tests/customfield_test.php index ff0f5cb85cc..5620b997c9f 100644 --- a/course/tests/customfield_test.php +++ b/course/tests/customfield_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class customfield_test extends \advanced_testcase { +final class customfield_test extends \advanced_testcase { /** * Set up diff --git a/course/tests/event/events_test.php b/course/tests/event/events_test.php index 49dd6ebc038..75df7e4cf73 100644 --- a/course/tests/event/events_test.php +++ b/course/tests/event/events_test.php @@ -31,7 +31,7 @@ namespace core_course\event; * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up diff --git a/course/tests/exporters_content_item_test.php b/course/tests/exporters_content_item_test.php index 1c957c7016d..b1febe75433 100644 --- a/course/tests/exporters_content_item_test.php +++ b/course/tests/exporters_content_item_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_content_item_test extends \advanced_testcase { +final class exporters_content_item_test extends \advanced_testcase { /** * Test confirming a content_item can be exported for a course. diff --git a/course/tests/exporters_content_items_test.php b/course/tests/exporters_content_items_test.php index 9e4b6db53be..62affbb92b5 100644 --- a/course/tests/exporters_content_items_test.php +++ b/course/tests/exporters_content_items_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_content_items_test extends \advanced_testcase { +final class exporters_content_items_test extends \advanced_testcase { /** * Test confirming the collection of content_items can be exported for a course. diff --git a/course/tests/management_helper_test.php b/course/tests/management_helper_test.php index 66cd892a125..a96dcd21e6f 100644 --- a/course/tests/management_helper_test.php +++ b/course/tests/management_helper_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/course/tests/fixtures/course_capability_assignment. * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class management_helper_test extends \advanced_testcase { +final class management_helper_test extends \advanced_testcase { /** Category management capability: moodle/category:manage */ const CATEGORY_MANAGE = 'moodle/category:manage'; diff --git a/course/tests/modlib_test.php b/course/tests/modlib_test.php index 6d541ae4926..95ca884174f 100644 --- a/course/tests/modlib_test.php +++ b/course/tests/modlib_test.php @@ -16,12 +16,6 @@ namespace core_course; -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->dirroot . '/course/lib.php'); -require_once($CFG->dirroot . '/course/modlib.php'); - /** * Module lib related unit tests * @@ -30,7 +24,16 @@ require_once($CFG->dirroot . '/course/modlib.php'); * @copyright 2016 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class modlib_test extends \advanced_testcase { +final class modlib_test extends \advanced_testcase { + /** + * Setup to ensure that fixtures are loaded. + */ + public static function setUpBeforeClass(): void { + global $CFG; + require_once($CFG->dirroot . '/course/lib.php'); + require_once($CFG->dirroot . '/course/modlib.php'); + parent::setUpBeforeClass(); + } /** * Test prepare_new_moduleinfo_data diff --git a/course/tests/privacy/provider_test.php b/course/tests/privacy/provider_test.php index 872bd12d986..b4ace8d2739 100644 --- a/course/tests/privacy/provider_test.php +++ b/course/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\transform; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { use \completion_creation; diff --git a/course/tests/reportbuilder/datasource/categories_test.php b/course/tests/reportbuilder/datasource/categories_test.php index 6a01c5352f4..baed94e424a 100644 --- a/course/tests/reportbuilder/datasource/categories_test.php +++ b/course/tests/reportbuilder/datasource/categories_test.php @@ -35,7 +35,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 a368043cdb8..5ca35e90fe0 100644 --- a/course/tests/reportbuilder/datasource/courses_test.php +++ b/course/tests/reportbuilder/datasource/courses_test.php @@ -41,7 +41,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class courses_test extends core_reportbuilder_testcase { +final class courses_test extends core_reportbuilder_testcase { /** * Test default datasource diff --git a/course/tests/search/search_test.php b/course/tests/search/search_test.php index 9e72b197331..07387dd669f 100644 --- a/course/tests/search/search_test.php +++ b/course/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/course/tests/services_content_item_service_test.php b/course/tests/services_content_item_service_test.php index e438a8dcaa9..a87c683e1dd 100644 --- a/course/tests/services_content_item_service_test.php +++ b/course/tests/services_content_item_service_test.php @@ -35,7 +35,7 @@ use core_course\local\repository\content_item_readonly_repository; * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class services_content_item_service_test extends \advanced_testcase { +final class services_content_item_service_test extends \advanced_testcase { /** * Test confirming that content items are returned by the service. diff --git a/course/tests/targets_test.php b/course/tests/targets_test.php index d9ced154164..2ef9a5345ac 100644 --- a/course/tests/targets_test.php +++ b/course/tests/targets_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/lib/grade/constants.php'); * @copyright 2019 Victor Deniz * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class targets_test extends \advanced_testcase { +final class targets_test extends \advanced_testcase { /** * Provides course params for the {@link self::test_core_target_course_completion_analysable()} method. diff --git a/course/tests/task/content_notification_task_test.php b/course/tests/task/content_notification_task_test.php index 9c88025fd11..907c6aa548d 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 23be0555258..dd0d666330e 100644 --- a/customfield/field/checkbox/tests/plugin_test.php +++ b/customfield/field/checkbox/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var \stdClass[] */ private $courses = []; diff --git a/customfield/field/date/tests/plugin_test.php b/customfield/field/date/tests/plugin_test.php index 002b6b4d395..ea579b35aa7 100644 --- a/customfield/field/date/tests/plugin_test.php +++ b/customfield/field/date/tests/plugin_test.php @@ -26,7 +26,7 @@ use core_customfield_test_instance_form; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var stdClass[] */ private $courses = []; diff --git a/customfield/field/text/tests/plugin_test.php b/customfield/field/text/tests/plugin_test.php index dc686ad0f86..60966ed6d46 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 1382eb58fff..f90d5a679ce 100644 --- a/customfield/field/textarea/tests/plugin_test.php +++ b/customfield/field/textarea/tests/plugin_test.php @@ -28,7 +28,7 @@ use core_customfield_test_instance_form; * @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 c3e4e2aa4b1..7fee797de80 100644 --- a/customfield/tests/api_test.php +++ b/customfield/tests/api_test.php @@ -24,7 +24,7 @@ namespace core_customfield; * @copyright 2018 Toni Barbera * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Get generator. diff --git a/customfield/tests/generator_test.php b/customfield/tests/generator_test.php index 20f17b078f7..56cbd34c2da 100644 --- a/customfield/tests/generator_test.php +++ b/customfield/tests/generator_test.php @@ -24,7 +24,7 @@ namespace core_customfield; * @copyright 2018 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Get generator diff --git a/customfield/tests/handler_test.php b/customfield/tests/handler_test.php index 40d3c8e8ffc..c377f31b231 100644 --- a/customfield/tests/handler_test.php +++ b/customfield/tests/handler_test.php @@ -30,7 +30,7 @@ use moodle_exception; * @copyright 2023 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class handler_test extends advanced_testcase { +final class handler_test extends advanced_testcase { /** * Test retrieving handler for given component/area diff --git a/customfield/tests/privacy/provider_test.php b/customfield/tests/privacy/provider_test.php index 8ee9c414ada..439233dfebf 100644 --- a/customfield/tests/privacy/provider_test.php +++ b/customfield/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_customfield\privacy\provider; * @copyright 2019 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Generate data. diff --git a/dataformat/excel/tests/writer_test.php b/dataformat/excel/tests/writer_test.php index 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 aae6632f131..56377cc7bf0 100644 --- a/enrol/category/tests/plugin_test.php +++ b/enrol/category/tests/plugin_test.php @@ -24,7 +24,7 @@ namespace enrol_category; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/cohort/tests/lib_test.php b/enrol/cohort/tests/lib_test.php index 6968f5107e2..5aa05081ca9 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 d6296134042..6a6623be940 100644 --- a/enrol/cohort/tests/privacy/provider_test.php +++ b/enrol/cohort/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use enrol_cohort\privacy\provider; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/enrol/cohort/tests/sync_test.php b/enrol/cohort/tests/sync_test.php index 2064379a4fb..a983eaab92b 100644 --- a/enrol/cohort/tests/sync_test.php +++ b/enrol/cohort/tests/sync_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/group/lib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_test extends \advanced_testcase { +final class sync_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/database/tests/lib_test.php b/enrol/database/tests/lib_test.php index d9f1b439fab..e8792847fab 100644 --- a/enrol/database/tests/lib_test.php +++ b/enrol/database/tests/lib_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public static function tearDownAfterClass(): void { global $DB; diff --git a/enrol/database/tests/sync_test.php b/enrol/database/tests/sync_test.php index 061c29b8d71..a1df4dfc082 100644 --- a/enrol/database/tests/sync_test.php +++ b/enrol/database/tests/sync_test.php @@ -27,7 +27,7 @@ namespace enrol_database; * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_test extends \advanced_testcase { +final class sync_test extends \advanced_testcase { protected static $courses = array(); protected static $users = array(); protected static $roles = array(); diff --git a/enrol/fee/tests/payment/service_provider_test.php b/enrol/fee/tests/payment/service_provider_test.php index a59af4884e4..dbcba25cc39 100644 --- a/enrol/fee/tests/payment/service_provider_test.php +++ b/enrol/fee/tests/payment/service_provider_test.php @@ -30,7 +30,7 @@ namespace enrol_fee\payment; * * @coversDefaultClass \enrol_fee\payment\service_provider */ -class service_provider_test extends \advanced_testcase { +final class service_provider_test extends \advanced_testcase { /** * Test for service_provider::get_payable(). diff --git a/enrol/flatfile/tests/flatfile_test.php b/enrol/flatfile/tests/flatfile_test.php index d72993a96e8..d9c9378e0ba 100644 --- a/enrol/flatfile/tests/flatfile_test.php +++ b/enrol/flatfile/tests/flatfile_test.php @@ -35,7 +35,7 @@ use enrol_flatfile\task\flatfile_sync_task; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class flatfile_test extends \advanced_testcase { +final class flatfile_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/flatfile/tests/privacy/provider_test.php b/enrol/flatfile/tests/privacy/provider_test.php index c574c37f43c..4c5ef64eb52 100644 --- a/enrol/flatfile/tests/privacy/provider_test.php +++ b/enrol/flatfile/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use enrol_flatfile\privacy\provider; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var \stdClass $user1 a test user.*/ protected $user1; diff --git a/enrol/guest/tests/external/external_test.php b/enrol/guest/tests/external/external_test.php index 5cd6a66cb04..e8a5795509b 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/imsenterprise/tests/imsenterprise_test.php b/enrol/imsenterprise/tests/imsenterprise_test.php index e0056a89c4e..8d853c85890 100644 --- a/enrol/imsenterprise/tests/imsenterprise_test.php +++ b/enrol/imsenterprise/tests/imsenterprise_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/enrol/imsenterprise/lib.php'); * @copyright 2012 David Monllaó * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class imsenterprise_test extends \advanced_testcase { +final class imsenterprise_test extends \advanced_testcase { /** * @var $imsplugin enrol_imsenterprise_plugin IMS plugin instance. diff --git a/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php b/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php index 4c41962822d..b9fff8ca6a8 100644 --- a/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php +++ b/enrol/imsenterprise/tests/imsenterprise_unenrol_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/enrol/imsenterprise/lib.php'); * * @covers \enrol_imsenterprise_plugin */ -class imsenterprise_unenrol_test extends \advanced_testcase { +final class imsenterprise_unenrol_test extends \advanced_testcase { /** * @var $imsplugin enrol_imsenterprise_plugin IMS plugin instance. diff --git a/enrol/ldap/tests/ldap_test.php b/enrol/ldap/tests/ldap_test.php index 6e9e53f942e..65fffaf3330 100644 --- a/enrol/ldap/tests/ldap_test.php +++ b/enrol/ldap/tests/ldap_test.php @@ -33,7 +33,7 @@ namespace enrol_ldap; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ldap_test extends \advanced_testcase { +final class ldap_test extends \advanced_testcase { /** * Data provider for enrol_ldap tests diff --git a/enrol/lti/tests/data_connector_test.php b/enrol/lti/tests/data_connector_test.php index d2e812fecd4..bb038e1762a 100644 --- a/enrol/lti/tests/data_connector_test.php +++ b/enrol/lti/tests/data_connector_test.php @@ -34,7 +34,7 @@ use IMSGlobal\LTI\ToolProvider\User; * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class data_connector_test extends \advanced_testcase { +final class data_connector_test extends \advanced_testcase { /** * Test set up. diff --git a/enrol/lti/tests/helper_test.php b/enrol/lti/tests/helper_test.php index 190fa3f95a4..a16897c8886 100644 --- a/enrol/lti/tests/helper_test.php +++ b/enrol/lti/tests/helper_test.php @@ -23,7 +23,7 @@ namespace enrol_lti; * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var \stdClass $user1 A user. diff --git a/enrol/lti/tests/lib_test.php b/enrol/lti/tests/lib_test.php index 9698d5e818b..11154525526 100644 --- a/enrol/lti/tests/lib_test.php +++ b/enrol/lti/tests/lib_test.php @@ -41,7 +41,7 @@ require_once(__DIR__ . '/local/ltiadvantage/lti_advantage_testcase.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \lti_advantage_testcase { +final class lib_test extends \lti_advantage_testcase { /** * Test set up. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php b/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php index e0d20fc4f22..7395491f6e7 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/ags_info_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\ags_info */ -class ags_info_test extends \advanced_testcase { +final class ags_info_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php b/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php index 692093eadba..578be1dd540 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/application_registration_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\application_registration */ -class application_registration_test extends \advanced_testcase { +final class application_registration_test extends \advanced_testcase { /** * Test the creation of an application_registration instance. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/context_test.php b/enrol/lti/tests/local/ltiadvantage/entity/context_test.php index 2d9195d67a8..72a0c1128f2 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/context_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/context_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\context */ -class context_test extends \advanced_testcase { +final class context_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php b/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php index f422ba694c2..1a367558812 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/deployment_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\deployment */ -class deployment_test extends \advanced_testcase { +final class deployment_test extends \advanced_testcase { /** * Test creation of the object instances. diff --git a/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php b/enrol/lti/tests/local/ltiadvantage/entity/migration_claim_test.php index 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 8a36880864c..ae6fa00b924 100644 --- a/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php +++ b/enrol/lti/tests/local/ltiadvantage/entity/resource_link_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\entity; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\resource_link */ -class resource_link_test extends \advanced_testcase { +final class resource_link_test extends \advanced_testcase { /** * Test creation of the object instances. * diff --git a/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php b/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php index b8aef36e239..218d8e6fbb4 100644 --- a/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php +++ b/enrol/lti/tests/local/ltiadvantage/lib/issuer_database_test.php @@ -30,7 +30,7 @@ use Packback\Lti1p3\LtiRegistration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\lib\issuer_database */ -class issuer_database_test extends \advanced_testcase { +final class issuer_database_test extends \advanced_testcase { /** * Test the Moodle implementation of the library database method test_find_registration_by_issuer(). diff --git a/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php b/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php index a1bf00ad92b..5c52ff24e5e 100644 --- a/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php +++ b/enrol/lti/tests/local/ltiadvantage/lib/launch_cache_session_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\lib; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\lib\launch_cache_session */ -class launch_cache_session_test extends \advanced_testcase { +final class launch_cache_session_test extends \advanced_testcase { /** * Test that the session cache, and in particular distinct object instances, can cache and retrieve launch data. diff --git a/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php index efac42c6f9c..e9a8890794b 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/application_registration_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\deployment; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\application_registration_repository */ -class application_registration_repository_test extends \advanced_testcase { +final class application_registration_repository_test extends \advanced_testcase { /** * Helper to generate a new application_registration object. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php index a8ea6867ce4..dbb4f08525e 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/context_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\application_registration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\context_repository */ -class context_repository_test extends \advanced_testcase { +final class context_repository_test extends \advanced_testcase { /** * Helper to create test context objects for use with the repository tests. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php index e6217b3d6f6..41ae5a39064 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/deployment_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\deployment; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\deployment_repository */ -class deployment_repository_test extends \advanced_testcase { +final class deployment_repository_test extends \advanced_testcase { /** * Helper to create test deployment objects for use with the repository tests. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php index 16f23fda3ed..824e7b13e24 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/legacy_consumer_repository_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\legacy_consumer_repository */ -class legacy_consumer_repository_test extends \lti_advantage_testcase { +final class legacy_consumer_repository_test extends \lti_advantage_testcase { /** * Test the get_consumer_secrets repository method. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php index f862e6be6f1..aa0e48c1b78 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/published_resource_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\helper; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\published_resource_repository */ -class published_resource_repository_test extends \advanced_testcase { +final class published_resource_repository_test extends \advanced_testcase { /** * Get a list of published resources for testing. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php index a9ff411f17c..9ae26ea09e6 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/resource_link_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\application_registration; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\resource_link_repository */ -class resource_link_repository_test extends \advanced_testcase { +final class resource_link_repository_test extends \advanced_testcase { /** * Helper to generate a new resource_link instance. * diff --git a/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php b/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php index e1c5526b53b..9f81c329217 100644 --- a/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php +++ b/enrol/lti/tests/local/ltiadvantage/repository/user_repository_test.php @@ -26,7 +26,7 @@ use enrol_lti\local\ltiadvantage\entity\user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\repository\user_repository */ -class user_repository_test extends \advanced_testcase { +final class user_repository_test extends \advanced_testcase { /** * Helper to generate a new user instance. * diff --git a/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php index b55ddb64b8e..87a47b929bb 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/application_registration_service_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\application_registration_service */ -class application_registration_service_test extends \lti_advantage_testcase { +final class application_registration_service_test extends \lti_advantage_testcase { /** * Helper to get an application_registration_service instance. * @return application_registration_service diff --git a/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php index 20ab51762a0..197acb43172 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/tool_deployment_service_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\tool_deployment_service */ -class tool_deployment_service_test extends \lti_advantage_testcase { +final class tool_deployment_service_test extends \lti_advantage_testcase { /** * Return a pre-existing application_registration object for testing. * diff --git a/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php b/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php index 83c30460ef4..18f719f9099 100644 --- a/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php +++ b/enrol/lti/tests/local/ltiadvantage/service/tool_launch_service_test.php @@ -38,7 +38,7 @@ require_once(__DIR__ . '/../lti_advantage_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\service\tool_launch_service */ -class tool_launch_service_test extends \lti_advantage_testcase { +final class tool_launch_service_test extends \lti_advantage_testcase { /** * Test the use case "A user launches a tool so they can view an external resource/activity". diff --git a/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php b/enrol/lti/tests/local/ltiadvantage/task/sync_grades_test.php index 7040f10b6d9..4d67d80764e 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 9db22719d4e..c97c2e58879 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 f39cd753785..c60701db116 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 14c0c33ff0c..1ef57beafd6 100644 --- a/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php +++ b/enrol/lti/tests/local/ltiadvantage/utility/message_helper_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\utility; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\utility\message_helper */ -class message_helper_test extends \base_testcase { +final class message_helper_test extends \base_testcase { /** * Test the static helper is_instructor_launch. diff --git a/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php b/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php index 17506334c63..4b60336f9aa 100644 --- a/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php +++ b/enrol/lti/tests/local/ltiadvantage/viewobject/published_resource_test.php @@ -24,7 +24,7 @@ namespace enrol_lti\local\ltiadvantage\viewobject; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_lti\local\ltiadvantage\viewobject\published_resource */ -class published_resource_test extends \advanced_testcase { +final class published_resource_test extends \advanced_testcase { /** * Test creating a simple published_resource view object and fetching information about it. diff --git a/enrol/lti/tests/privacy/provider_test.php b/enrol/lti/tests/privacy/provider_test.php index 1d832501cb8..841eae392ab 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 fc086ef4f2f..a753bf92410 100644 --- a/enrol/lti/tests/sync_members_test.php +++ b/enrol/lti/tests/sync_members_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sync_members_test extends \advanced_testcase { +final class sync_members_test extends \advanced_testcase { /** @var dummy_sync_members_task $task */ protected $task; diff --git a/enrol/lti/tests/tool_provider_test.php b/enrol/lti/tests/tool_provider_test.php index 50073da97a2..ee5038c661c 100644 --- a/enrol/lti/tests/tool_provider_test.php +++ b/enrol/lti/tests/tool_provider_test.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tool_provider_test extends \advanced_testcase { +final class tool_provider_test extends \advanced_testcase { /** * @var \stdClass $tool The LTI tool. diff --git a/enrol/manual/tests/externallib_test.php b/enrol/manual/tests/externallib_test.php index 5a2054f765c..d05733e7e1a 100644 --- a/enrol/manual/tests/externallib_test.php +++ b/enrol/manual/tests/externallib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/enrol/manual/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.4 */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_enrolled_users diff --git a/enrol/manual/tests/lib_test.php b/enrol/manual/tests/lib_test.php index 6ecb5aab20c..8b62e917c17 100644 --- a/enrol/manual/tests/lib_test.php +++ b/enrol/manual/tests/lib_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test enrol migration function used when uninstalling enrol plugins. */ diff --git a/enrol/meta/tests/external/add_instances_test.php b/enrol/meta/tests/external/add_instances_test.php index 4481718ab7c..8c68e8f7075 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 5f3a35a5f83..648a027129e 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 9feebb93eb7..60c0d081572 100644 --- a/enrol/meta/tests/plugin_test.php +++ b/enrol/meta/tests/plugin_test.php @@ -27,7 +27,7 @@ use enrol_meta_plugin; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { protected function enable_plugin() { $enabled = enrol_get_plugins(true); diff --git a/enrol/meta/tests/privacy/provider_test.php b/enrol/meta/tests/privacy/provider_test.php index c7c954a8a15..d8f75ed3859 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 acc8a2fc416..5edcd2f3399 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 75bfa8cb0e8..c0d6457ebd5 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 5fae34204a5..abebc06f931 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 ea5f3d02596..808be30e869 100644 --- a/enrol/self/tests/self_test.php +++ b/enrol/self/tests/self_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/enrol/self/locallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \enrol_self_plugin */ -class self_test extends \advanced_testcase { +final class self_test extends \advanced_testcase { public function test_basics() { $this->assertTrue(enrol_is_enabled('self')); diff --git a/enrol/tests/course_enrolment_manager_test.php b/enrol/tests/course_enrolment_manager_test.php index 0ebbb2ddd0a..e1256941137 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 aba19cbf9bf..6d7189dc617 100644 --- a/enrol/tests/enrollib_test.php +++ b/enrol/tests/enrollib_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class enrollib_test extends advanced_testcase { +final class enrollib_test extends advanced_testcase { public function test_enrol_get_all_users_courses() { global $DB, $CFG; diff --git a/enrol/tests/privacy/provider_test.php b/enrol/tests/privacy/provider_test.php index 6b3ffe46f59..8f3c48e96a1 100644 --- a/enrol/tests/privacy/provider_test.php +++ b/enrol/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Check that a course context is returned if there is any user data for this user. */ diff --git a/enrol/tests/role_external_test.php b/enrol/tests/role_external_test.php index 9ad70aa34ac..7e0f6b86d6f 100644 --- a/enrol/tests/role_external_test.php +++ b/enrol/tests/role_external_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/enrol/externallib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.4 */ -class role_external_test extends \externallib_advanced_testcase { +final class role_external_test extends \externallib_advanced_testcase { /** * Tests set up diff --git a/favourites/tests/component_favourite_service_test.php b/favourites/tests/component_favourite_service_test.php index a6b3092a255..452b448adc8 100644 --- a/favourites/tests/component_favourite_service_test.php +++ b/favourites/tests/component_favourite_service_test.php @@ -26,7 +26,7 @@ use core_favourites\local\entity\favourite; * @copyright 2019 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class component_favourite_service_test extends \advanced_testcase { +final class component_favourite_service_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/favourites/tests/privacy/provider_test.php b/favourites/tests/privacy/provider_test.php index 6e8583b4e06..71a2c994087 100644 --- a/favourites/tests/privacy/provider_test.php +++ b/favourites/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\local\request\transform; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(true); diff --git a/favourites/tests/repository_test.php b/favourites/tests/repository_test.php index c83efcbcc29..ed2467da7c5 100644 --- a/favourites/tests/repository_test.php +++ b/favourites/tests/repository_test.php @@ -27,7 +27,7 @@ use core_favourites\local\entity\favourite; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repository_test extends \advanced_testcase { +final class repository_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/favourites/tests/user_favourite_service_test.php b/favourites/tests/user_favourite_service_test.php index 580ba3b8910..cbbdaed5eb5 100644 --- a/favourites/tests/user_favourite_service_test.php +++ b/favourites/tests/user_favourite_service_test.php @@ -26,7 +26,7 @@ use core_favourites\local\entity\favourite; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_favourite_service_test extends \advanced_testcase { +final class user_favourite_service_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/files/converter/googledrive/tests/privacy/provider_test.php b/files/converter/googledrive/tests/privacy/provider_test.php index 664fdf87452..d6f5d1d3035 100644 --- a/files/converter/googledrive/tests/privacy/provider_test.php +++ b/files/converter/googledrive/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/files/converter/unoconv/tests/converter_test.php b/files/converter/unoconv/tests/converter_test.php index ecc0e7b1257..961281f75c8 100644 --- a/files/converter/unoconv/tests/converter_test.php +++ b/files/converter/unoconv/tests/converter_test.php @@ -23,7 +23,7 @@ namespace fileconverter_unoconv; * @copyright 2016 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converter_test extends \advanced_testcase { +final class converter_test extends \advanced_testcase { /** * Helper to skip tests which _require_ unoconv. diff --git a/files/tests/archive_writer_test.php b/files/tests/archive_writer_test.php index c6d98b3ace6..a46c47ca22a 100644 --- a/files/tests/archive_writer_test.php +++ b/files/tests/archive_writer_test.php @@ -28,7 +28,7 @@ use core_files\local\archive_writer\zip_writer; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_files\archive_writer */ -class archive_writer_test extends advanced_testcase { +final class archive_writer_test extends advanced_testcase { /** * Test get_file_writer(). diff --git a/files/tests/conversion_test.php b/files/tests/conversion_test.php index ced4d29b5bd..f2f7dd2e9ae 100644 --- a/files/tests/conversion_test.php +++ b/files/tests/conversion_test.php @@ -23,7 +23,7 @@ namespace core_files; * @copyright 2017 Andrew nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class conversion_test extends \advanced_testcase { +final class conversion_test extends \advanced_testcase { /** * Helper to create a stored file object with the given supplied content. diff --git a/files/tests/converter_test.php b/files/tests/converter_test.php index e73361e9caa..b52e391feff 100644 --- a/files/tests/converter_test.php +++ b/files/tests/converter_test.php @@ -36,7 +36,7 @@ use core_files\converter; * @copyright 2017 Andrew nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class converter_test extends advanced_testcase { +final class converter_test extends advanced_testcase { /** * Get a testable mock of the abstract files_converter class. diff --git a/files/tests/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 d513ecff899..1ed0d45c5ef 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 195b975b872..a15fb16e83f 100644 --- a/files/tests/local/archive_writer/zip_writer_test.php +++ b/files/tests/local/archive_writer/zip_writer_test.php @@ -30,7 +30,7 @@ use ZipArchive; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core_files\local\archive_writer\zip_writer */ -class zip_writer_test extends advanced_testcase { +final class zip_writer_test extends advanced_testcase { /** * Test add_file_from_filepath(). diff --git a/files/tests/privacy/provider_test.php b/files/tests/privacy/provider_test.php index 9b413fea53a..4dc826e4439 100644 --- a/files/tests/privacy/provider_test.php +++ b/files/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test getting the context for the user ID related to this plugin. diff --git a/filter/displayh5p/tests/upgradelib_test.php b/filter/displayh5p/tests/upgradelib_test.php index 91b43a7def0..6b81fa2cef4 100644 --- a/filter/displayh5p/tests/upgradelib_test.php +++ b/filter/displayh5p/tests/upgradelib_test.php @@ -30,7 +30,7 @@ require_once("$CFG->libdir/filterlib.php"); * @copyright 2019 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgradelib_test extends \advanced_testcase { +final class upgradelib_test extends \advanced_testcase { /** * test_filter_displayh5p_reorder diff --git a/filter/tex/tests/lib_test.php b/filter/tex/tests/lib_test.php index 23ada285752..e5bfe29cf37 100644 --- a/filter/tex/tests/lib_test.php +++ b/filter/tex/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/filter/tex/lib.php'); * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends advanced_testcase { +final class lib_test extends advanced_testcase { /** * Data provider for test_filter_tex_sanitize_formula. * diff --git a/grade/export/ods/tests/event/events_test.php b/grade/export/ods/tests/event/events_test.php index 87e2dbd66bb..ebf751746ee 100644 --- a/grade/export/ods/tests/event/events_test.php +++ b/grade/export/ods/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_ods\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/txt/tests/event/events_test.php b/grade/export/txt/tests/event/events_test.php index c3c222d90fc..f3db990bc10 100644 --- a/grade/export/txt/tests/event/events_test.php +++ b/grade/export/txt/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_txt\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/xls/tests/event/events_test.php b/grade/export/xls/tests/event/events_test.php index 75921b7195a..3db72a697d2 100644 --- a/grade/export/xls/tests/event/events_test.php +++ b/grade/export/xls/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_xls\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/export/xml/tests/event/events_test.php b/grade/export/xml/tests/event/events_test.php index d2b94bd04b9..d984a52cf09 100644 --- a/grade/export/xml/tests/event/events_test.php +++ b/grade/export/xml/tests/event/events_test.php @@ -23,7 +23,7 @@ namespace gradeexport_xml\event; * @copyright 2016 Zane Karl zkarl@oid.ucla.edu * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup is called before calling test case. diff --git a/grade/grading/form/guide/tests/generator_test.php b/grade/grading/form/guide/tests/generator_test.php index 950c98f5743..5868b9e01a0 100644 --- a/grade/grading/form/guide/tests/generator_test.php +++ b/grade/grading/form/guide/tests/generator_test.php @@ -37,7 +37,7 @@ use gradingform_guide_controller; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Test guide creation. diff --git a/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php index 8a7c505d408..1508d86d71a 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 ff25d88c629..2d5a3cc0015 100644 --- a/grade/grading/form/guide/tests/guide_test.php +++ b/grade/grading/form/guide/tests/guide_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/grade/grading/form/guide/lib.php'); * @copyright 2015 Nikita Kalinin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class guide_test extends \advanced_testcase { +final class guide_test extends \advanced_testcase { /** * Unit test to get draft instance and create new instance. */ diff --git a/grade/grading/form/guide/tests/privacy/provider_test.php b/grade/grading/form/guide/tests/privacy/provider_test.php index 3b69b4ceb7d..a8615d82641 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 9aa29de6607..e269c66e1eb 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 be18d4391b8..cc26ba0c77c 100644 --- a/grade/grading/form/rubric/tests/privacy/provider_test.php +++ b/grade/grading/form/rubric/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use context_module; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test the export of rubric data. diff --git a/grade/grading/tests/generator_test.php b/grade/grading/tests/generator_test.php index 8b7eb5a5d36..cc740ce95bf 100644 --- a/grade/grading/tests/generator_test.php +++ b/grade/grading/tests/generator_test.php @@ -38,7 +38,7 @@ use gradingform_rubric_controller; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends advanced_testcase { +final class generator_test extends advanced_testcase { /** * Test gradingform controller creation. diff --git a/grade/grading/tests/grading_manager_test.php b/grade/grading/tests/grading_manager_test.php index e43c8b6af7a..0c4d9e4ccac 100644 --- a/grade/grading/tests/grading_manager_test.php +++ b/grade/grading/tests/grading_manager_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/grade/grading/lib.php'); // Include the code to t * @copyright 2011 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grading_manager_test extends \advanced_testcase { - public function test_basic_instantiation() { +final class grading_manager_test extends \advanced_testcase { + public function test_basic_instantiation(): void { $manager1 = get_grading_manager(); $fakecontext = (object)array( diff --git a/grade/grading/tests/privacy/legacy_polyfill_test.php b/grade/grading/tests/privacy/legacy_polyfill_test.php index 13190762037..3a90a06daef 100644 --- a/grade/grading/tests/privacy/legacy_polyfill_test.php +++ b/grade/grading/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_grading\privacy\legacy_polyfill works and that the static _export_gradingform_instance_data can be called. */ diff --git a/grade/grading/tests/privacy/provider_test.php b/grade/grading/tests/privacy/provider_test.php index c24065fce62..17eaa3d8839 100644 --- a/grade/grading/tests/privacy/provider_test.php +++ b/grade/grading/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_grading\privacy\provider; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass User without data. */ protected $user0; diff --git a/grade/import/csv/tests/load_data_test.php b/grade/import/csv/tests/load_data_test.php index b4aa3543259..af21733abf1 100644 --- a/grade/import/csv/tests/load_data_test.php +++ b/grade/import/csv/tests/load_data_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/grade/tests/fixtures/lib.php'); * @copyright 2014 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class load_data_test extends \grade_base_testcase { +final class load_data_test extends \grade_base_testcase { /** @var string $oktext Text to be imported. This data should have no issues being imported. */ protected $oktext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total" diff --git a/grade/report/grader/tests/privacy/provider_test.php b/grade/report/grader/tests/privacy/provider_test.php index 1557d1c8e79..d33227df6bf 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 47e9d43e181..c364d3fae05 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 9a98cac97c2..d53818155f7 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 5a07d1db4c7..e15a1193c3d 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 c27caa4c02f..ac6a1dbe876 100644 --- a/grade/report/user/tests/lib_test.php +++ b/grade/report/user/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/grade/report/user/lib.php'); * @copyright 2015 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/grade/report/user/tests/privacy/provider_test.php b/grade/report/user/tests/privacy/provider_test.php index 58ac0271b85..be9935388ec 100644 --- a/grade/report/user/tests/privacy/provider_test.php +++ b/grade/report/user/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Basic setup for these tests. diff --git a/grade/tests/component_gradeitem_test.php b/grade/tests/component_gradeitem_test.php index f8bc016288e..e04d4b2ea48 100644 --- a/grade/tests/component_gradeitem_test.php +++ b/grade/tests/component_gradeitem_test.php @@ -38,7 +38,7 @@ use mod_forum\local\entities\forum as forum_entity; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @coversDefaultClass \core_grades\component_gradeitem */ -class component_gradeitem_test extends advanced_testcase { +final class component_gradeitem_test extends advanced_testcase { /** * Test get_formatted_grade_for_user with points. diff --git a/grade/tests/component_gradeitems_test.php b/grade/tests/component_gradeitems_test.php index 764be060802..557b203b29f 100644 --- a/grade/tests/component_gradeitems_test.php +++ b/grade/tests/component_gradeitems_test.php @@ -39,7 +39,7 @@ namespace core_grades { * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - class component_gradeitems_test extends advanced_testcase { + final class component_gradeitems_test extends advanced_testcase { /** * Ensure that a component which does not implement the mapping class excepts. diff --git a/grade/tests/edittreelib_test.php b/grade/tests/edittreelib_test.php index 8b011755dd0..3f134a65dfa 100644 --- a/grade/tests/edittreelib_test.php +++ b/grade/tests/edittreelib_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot.'/grade/edit/tree/lib.php'); * @author Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class edittreelib_test extends \advanced_testcase { - public function test_format_number() { +final class edittreelib_test extends \advanced_testcase { + public function test_format_number(): void { $numinput = array(0, 1, 1.01, '1.010', 1.2345); $numoutput = array(0.0, 1.0, 1.01, 1.01, 1.2345); @@ -134,5 +134,3 @@ class edittreelib_test extends \advanced_testcase { $this->assertEquals(null, $gradeitem->scaleid); } } - - diff --git a/grade/tests/event/events_test.php b/grade/tests/event/events_test.php index b1136f70d2d..fcc62be128e 100644 --- a/grade/tests/event/events_test.php +++ b/grade/tests/event/events_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/grade/lib.php'); * @copyright 2017 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass the course used for testing */ private $course; diff --git a/grade/tests/export_test.php b/grade/tests/export_test.php index ea58a8538ab..5d84dfb5400 100644 --- a/grade/tests/export_test.php +++ b/grade/tests/export_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/grade/export/lib.php'); * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class export_test extends \advanced_testcase { +final class export_test extends \advanced_testcase { /** * Ensure that feedback is correct formatted. Test the default implementation of format_feedback diff --git a/grade/tests/external/create_gradecategories_test.php b/grade/tests/external/create_gradecategories_test.php index 87c0b3d0342..a3dec321aff 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 627dafba7be..7813010c38b 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 4d59087527c..13bd3f2b7e0 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 3f16d12ab67..ebb5b846feb 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 83d6bd8915f..93ff8ed493e 100644 --- a/grade/tests/importlib_test.php +++ b/grade/tests/importlib_test.php @@ -26,7 +26,7 @@ use grade_item; * @copyright 2015 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class importlib_test extends \advanced_testcase { +final class importlib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/grade/tests/lib_test.php b/grade/tests/lib_test.php index 6e647c33f20..b0acc104a3b 100644 --- a/grade/tests/lib_test.php +++ b/grade/tests/lib_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/grade/lib.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test can_output_item. diff --git a/grade/tests/output/general_action_bar_test.php b/grade/tests/output/general_action_bar_test.php index bfdabc4fd5e..24b7dce814c 100644 --- a/grade/tests/output/general_action_bar_test.php +++ b/grade/tests/output/general_action_bar_test.php @@ -28,7 +28,7 @@ use moodle_url; * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class general_action_bar_test extends advanced_testcase { +final class general_action_bar_test extends advanced_testcase { /** * Load required test libraries diff --git a/grade/tests/privacy/provider_test.php b/grade/tests/privacy/provider_test.php index 27c3ea8a280..bf1a3ba18d4 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 28b36a32ce7..1a4cd233212 100644 --- a/grade/tests/querylib_test.php +++ b/grade/tests/querylib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/grade/querylib.php'); * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class querylib_test extends \advanced_testcase { +final class querylib_test extends \advanced_testcase { public function test_grade_get_gradable_activities() { $this->resetAfterTest(true); diff --git a/grade/tests/report_graderlib_test.php b/grade/tests/report_graderlib_test.php index ef6e7f20f18..4531ba6377f 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 c94216b980c..bce7cad0e2e 100644 --- a/grade/tests/reportlib_test.php +++ b/grade/tests/reportlib_test.php @@ -61,7 +61,7 @@ class grade_report_mock extends grade_report { /** * Tests grade_report, the parent class for all grade reports. */ -class reportlib_test extends advanced_testcase { +final class reportlib_test extends advanced_testcase { /** * Tests grade_report::blank_hidden_total_and_adjust_bounds() diff --git a/grade/tests/reportuserlib_test.php b/grade/tests/reportuserlib_test.php index 19f270065a8..28c50f45805 100644 --- a/grade/tests/reportuserlib_test.php +++ b/grade/tests/reportuserlib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/grade/report/user/lib.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class reportuserlib_test extends \advanced_testcase { +final class reportuserlib_test extends \advanced_testcase { /** * Tests grade_report_user::inject_rowspans() diff --git a/group/tests/customfield/group_handler_test.php b/group/tests/customfield/group_handler_test.php index 11b3f9b9780..c0da8a730f5 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 152d2ccfa7d..14efca411a3 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 e185e4cc635..18b207af0ba 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 6ee7623d00a..4da61f60fb0 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() { $this->resetAfterTest(); diff --git a/group/tests/privacy/provider_test.php b/group/tests/privacy/provider_test.php index 3345b1a8f41..62ab0d8f096 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 5e67daf844b..478619ab69e 100644 --- a/h5p/tests/api_test.php +++ b/h5p/tests/api_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_h5p\api */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Test the behaviour of delete_library(). diff --git a/h5p/tests/editor_ajax_test.php b/h5p/tests/editor_ajax_test.php index 318f2478b42..45e3d690254 100644 --- a/h5p/tests/editor_ajax_test.php +++ b/h5p/tests/editor_ajax_test.php @@ -38,7 +38,7 @@ use Moodle\H5PCore; * * @runTestsInSeparateProcesses */ -class editor_ajax_test extends \advanced_testcase { +final class editor_ajax_test extends \advanced_testcase { /** @var editor_ajax H5P editor ajax instance */ protected $editorajax; diff --git a/h5p/tests/editor_framework_test.php b/h5p/tests/editor_framework_test.php index db142e1fc4c..988d16b378d 100644 --- a/h5p/tests/editor_framework_test.php +++ b/h5p/tests/editor_framework_test.php @@ -37,7 +37,7 @@ use core_h5p\local\library\autoloader; * * @runTestsInSeparateProcesses */ -class editor_framework_test extends \advanced_testcase { +final class editor_framework_test extends \advanced_testcase { /** @var editor_framework H5P editor_framework instance */ protected $editorframework; diff --git a/h5p/tests/editor_test.php b/h5p/tests/editor_test.php index 74fe952b91f..3f80bf38bf2 100644 --- a/h5p/tests/editor_test.php +++ b/h5p/tests/editor_test.php @@ -43,7 +43,7 @@ use Moodle\H5PCore; * * @runTestsInSeparateProcesses */ -class editor_test extends advanced_testcase { +final class editor_test extends advanced_testcase { /** * Form object to be used in test case. diff --git a/h5p/tests/event/deleted_test.php b/h5p/tests/event/deleted_test.php index ebd171b041d..2bd151e2900 100644 --- a/h5p/tests/event/deleted_test.php +++ b/h5p/tests/event/deleted_test.php @@ -27,7 +27,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class deleted_test extends \advanced_testcase { +final class deleted_test extends \advanced_testcase { /** * Setup test. diff --git a/h5p/tests/event/moved_test.php b/h5p/tests/event/moved_test.php index 8a3b8f166b0..0754ebfe16d 100644 --- a/h5p/tests/event/moved_test.php +++ b/h5p/tests/event/moved_test.php @@ -27,7 +27,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.8 */ -class moved_test extends \advanced_testcase { +final class moved_test extends \advanced_testcase { /** * Setup test. diff --git a/h5p/tests/external/external_test.php b/h5p/tests/external/external_test.php index 03736f476ae..84e3913ff62 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 a8b97a788cf..cc95f9886d0 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 1bb78772e9d..d8dd689bdd4 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 1aac9a07dc0..042727467b9 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 32064c28d94..adb795bb23e 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 c280f4a768a..fb80683d3ea 100644 --- a/h5p/tests/helper_test.php +++ b/h5p/tests/helper_test.php @@ -29,7 +29,7 @@ use core_h5p\local\library\autoloader; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_h5p\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Register the H5P autoloader diff --git a/h5p/tests/local/library/handler_test.php b/h5p/tests/local/library/handler_test.php index 3298b1185d6..93bd7fda4dd 100644 --- a/h5p/tests/local/library/handler_test.php +++ b/h5p/tests/local/library/handler_test.php @@ -34,7 +34,7 @@ use advanced_testcase; * @copyright 2020 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class handler_test extends advanced_testcase { +final class handler_test extends advanced_testcase { /** * Test the behaviour of get_h5p_string(). diff --git a/iplookup/tests/geoplugin_test.php b/iplookup/tests/geoplugin_test.php index 08167e34497..9346dcee42c 100644 --- a/iplookup/tests/geoplugin_test.php +++ b/iplookup/tests/geoplugin_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class geoplugin_test extends \advanced_testcase { +final class geoplugin_test extends \advanced_testcase { /** * Load required test libraries diff --git a/lib/antivirus/clamav/tests/scanner_test.php b/lib/antivirus/clamav/tests/scanner_test.php index a2dcb20e298..7aa9e61a8e3 100644 --- a/lib/antivirus/clamav/tests/scanner_test.php +++ b/lib/antivirus/clamav/tests/scanner_test.php @@ -24,7 +24,7 @@ namespace antivirus_clamav; * @copyright 2016 Ruslan Kabalin, Lancaster University. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scanner_test extends \advanced_testcase { +final class scanner_test extends \advanced_testcase { /** @var string temporary file used in testing */ protected $tempfile; diff --git a/lib/ddl/tests/ddl_test.php b/lib/ddl/tests/ddl_test.php index 7e552f6edd2..16bd4028a64 100644 --- a/lib/ddl/tests/ddl_test.php +++ b/lib/ddl/tests/ddl_test.php @@ -33,7 +33,7 @@ use xmldb_table; * @copyright 2008 Nicolas Connault * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ddl_test extends \database_driver_testcase { +final class ddl_test extends \database_driver_testcase { /** @var xmldb_table[] keys are table name. Created in setUp. */ private $tables = array(); /** @var array table name => array of stdClass test records loaded into that table. Created in setUp. */ diff --git a/lib/dml/tests/dml_pgsql_read_slave_test.php b/lib/dml/tests/dml_pgsql_read_slave_test.php index 2388b65a904..51a62b22ecf 100644 --- a/lib/dml/tests/dml_pgsql_read_slave_test.php +++ b/lib/dml/tests/dml_pgsql_read_slave_test.php @@ -41,7 +41,7 @@ require_once(__DIR__.'/fixtures/read_slave_moodle_database_mock_pgsql.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \pgsql_native_moodle_database */ -class dml_pgsql_read_slave_test extends \advanced_testcase { +final class dml_pgsql_read_slave_test extends \advanced_testcase { /** * Test correct database handles are used for cursors * diff --git a/lib/dml/tests/dml_table_test.php b/lib/dml/tests/dml_table_test.php index 2fe8a45de2c..29d44147222 100644 --- a/lib/dml/tests/dml_table_test.php +++ b/lib/dml/tests/dml_table_test.php @@ -28,7 +28,7 @@ use xmldb_table; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\dml\table */ -class dml_table_test extends \database_driver_testcase { +final class dml_table_test extends \database_driver_testcase { /** * Data provider for various \core\dml\table method tests. diff --git a/lib/dml/tests/dml_test.php b/lib/dml/tests/dml_test.php index a23ea275dac..abb76a8e134 100644 --- a/lib/dml/tests/dml_test.php +++ b/lib/dml/tests/dml_test.php @@ -44,7 +44,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \moodle_database */ -class dml_test extends \database_driver_testcase { +final class dml_test extends \database_driver_testcase { protected function setUp(): void { parent::setUp(); diff --git a/lib/dml/tests/mysqli_native_moodle_database_test.php b/lib/dml/tests/mysqli_native_moodle_database_test.php index b1c6de7cef1..62600df400a 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 6cf12887089..7c44564d7dc 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 bee1b5160af..9c5e58c201d 100644 --- a/lib/dml/tests/pgsql_native_recordset_test.php +++ b/lib/dml/tests/pgsql_native_recordset_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot.'/lib/dml/pgsql_native_moodle_database.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class pgsql_native_recordset_test extends basic_testcase { +final class pgsql_native_recordset_test extends basic_testcase { /** @var pgsql_native_moodle_database Special database connection */ protected $specialdb; diff --git a/lib/dml/tests/recordset_walk_test.php b/lib/dml/tests/recordset_walk_test.php index a44a00e1b0a..f3fbd766166 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 1920417e1a1..f8b84551c58 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 6bacfa61ab3..c71e3a8d708 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 a45856dda34..2a18946bb2b 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 3139a21c26c..98e8e498703 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 479ec6dc041..9bf9a175d02 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 fff46595692..b0f784127f6 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 282b8dcb051..2665490a3b4 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 797fc1e2366..0bbfa1ddda0 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 9480fd6eb83..286ecff22d8 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 1ed4cd525d3..0724f5cc848 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 04aab7e91de..f466ce4fe3d 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 3cb3b2e4ed7..a9b204c44de 100644 --- a/lib/filestorage/tests/file_system_test.php +++ b/lib/filestorage/tests/file_system_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir . '/filestorage/file_system.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \file_system */ -class file_system_test extends \advanced_testcase { +final class file_system_test extends \advanced_testcase { public function setUp(): void { get_file_storage(true); diff --git a/lib/filestorage/tests/mbz_packer_test.php b/lib/filestorage/tests/mbz_packer_test.php index 9b50f1793c4..8be340c763f 100644 --- a/lib/filestorage/tests/mbz_packer_test.php +++ b/lib/filestorage/tests/mbz_packer_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mbz_packer_test extends \advanced_testcase { +final class mbz_packer_test extends \advanced_testcase { public function test_archive_with_both_options() { global $CFG; diff --git a/lib/filestorage/tests/stored_file_test.php b/lib/filestorage/tests/stored_file_test.php index bc66972ccbc..cd911dba0dd 100644 --- a/lib/filestorage/tests/stored_file_test.php +++ b/lib/filestorage/tests/stored_file_test.php @@ -28,7 +28,7 @@ use context_system; * @copyright 2022 Mikhail Golenkov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class stored_file_test extends advanced_testcase { +final class stored_file_test extends advanced_testcase { /** * Test that the rotate_image() method does not rotate diff --git a/lib/filestorage/tests/tgz_packer_test.php b/lib/filestorage/tests/tgz_packer_test.php index 22ca0f1505b..5271b159957 100644 --- a/lib/filestorage/tests/tgz_packer_test.php +++ b/lib/filestorage/tests/tgz_packer_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tgz_packer_test extends \advanced_testcase implements file_progress { +final class tgz_packer_test extends \advanced_testcase implements file_progress { /** * @var array Progress information passed to the progress reporter */ diff --git a/lib/filestorage/tests/zip_packer_test.php b/lib/filestorage/tests/zip_packer_test.php index 41ea6bfffe7..25b2b5453a9 100644 --- a/lib/filestorage/tests/zip_packer_test.php +++ b/lib/filestorage/tests/zip_packer_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/filestorage/file_progress.php'); * @copyright 2012 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class zip_packer_test extends \advanced_testcase implements file_progress { +final class zip_packer_test extends \advanced_testcase implements file_progress { protected $testfile; protected $files; diff --git a/lib/form/tests/autocomplete_test.php b/lib/form/tests/autocomplete_test.php index 40f3ea79714..d9d6185f643 100644 --- a/lib/form/tests/autocomplete_test.php +++ b/lib/form/tests/autocomplete_test.php @@ -32,7 +32,7 @@ require_once($CFG->libdir . '/form/autocomplete.php'); * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class autocomplete_test extends \basic_testcase { +final class autocomplete_test extends \basic_testcase { /** * Testcase for validation */ diff --git a/lib/form/tests/course_test.php b/lib/form/tests/course_test.php index dcd104a8669..d2fa3dc5f14 100644 --- a/lib/form/tests/course_test.php +++ b/lib/form/tests/course_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/form/course.php'); * @copyright 2020 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_test extends \basic_testcase { +final class course_test extends \basic_testcase { /** * Test constructor supports all declared attributes. diff --git a/lib/form/tests/dateselector_test.php b/lib/form/tests/dateselector_test.php index b3f1cd1fb44..ce18d963397 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 e33983e9ed1..a83ced4c135 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 34901d4bf67..e48a6d7de14 100644 --- a/lib/form/tests/duration_test.php +++ b/lib/form/tests/duration_test.php @@ -45,7 +45,7 @@ require_once($CFG->libdir . '/form/duration.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class duration_test extends \basic_testcase { +final class duration_test extends \basic_testcase { /** * Get a form that can be used for testing. diff --git a/lib/form/tests/external_test.php b/lib/form/tests/external_test.php index 95dfb38332f..e844b135559 100644 --- a/lib/form/tests/external_test.php +++ b/lib/form/tests/external_test.php @@ -38,7 +38,7 @@ global $CFG; * @copyright 2017 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends advanced_testcase { +final class external_test extends advanced_testcase { /** * Test the core_form_get_filetypes_browser_data external function diff --git a/lib/form/tests/float_test.php b/lib/form/tests/float_test.php index 6f769dd032c..1b380fc43ed 100644 --- a/lib/form/tests/float_test.php +++ b/lib/form/tests/float_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/form/float.php'); * @copyright 2019 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class float_test extends \advanced_testcase { +final class float_test extends \advanced_testcase { /** * Define a local decimal separator. diff --git a/lib/grade/tests/grade_category_test.php b/lib/grade/tests/grade_category_test.php index 46f8c53ad8f..ed362e0d271 100644 --- a/lib/grade/tests/grade_category_test.php +++ b/lib/grade/tests/grade_category_test.php @@ -29,7 +29,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_category_test extends \grade_base_testcase { +final class grade_category_test extends \grade_base_testcase { public function test_grade_category() { $this->sub_test_grade_category_construct(); diff --git a/lib/grade/tests/grade_grade_test.php b/lib/grade/tests/grade_grade_test.php index ab6b768cfbe..13955490569 100644 --- a/lib/grade/tests/grade_grade_test.php +++ b/lib/grade/tests/grade_grade_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_grade_test extends \grade_base_testcase { +final class grade_grade_test extends \grade_base_testcase { public function test_grade_grade() { $this->sub_test_grade_grade_construct(); diff --git a/lib/grade/tests/grade_item_test.php b/lib/grade/tests/grade_item_test.php index 53925e0a159..596e8d2e6fc 100644 --- a/lib/grade/tests/grade_item_test.php +++ b/lib/grade/tests/grade_item_test.php @@ -28,8 +28,8 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_item_test extends \grade_base_testcase { - public function test_grade_item() { +final class grade_item_test extends \grade_base_testcase { + public function test_grade_item(): void { $this->sub_test_grade_item_construct(); $this->sub_test_grade_item_insert(); $this->sub_test_grade_item_delete(); diff --git a/lib/grade/tests/grade_object_test.php b/lib/grade/tests/grade_object_test.php index 4ad43e1c814..1571365a1d8 100644 --- a/lib/grade/tests/grade_object_test.php +++ b/lib/grade/tests/grade_object_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/lib.php'); * @copyright 2014 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_object_test extends \grade_base_testcase { +final class grade_object_test extends \grade_base_testcase { public function test_fetch_all_helper() { // Simple ID lookup. diff --git a/lib/grade/tests/grade_outcome_test.php b/lib/grade/tests/grade_outcome_test.php index 5e164346ad7..b6c327d7e47 100644 --- a/lib/grade/tests/grade_outcome_test.php +++ b/lib/grade/tests/grade_outcome_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_outcome_test extends \grade_base_testcase { +final class grade_outcome_test extends \grade_base_testcase { public function test_grade_outcome() { $this->sub_test_grade_outcome_construct(); diff --git a/lib/grade/tests/grade_scale_test.php b/lib/grade/tests/grade_scale_test.php index 7af18c7a7e0..d291d0ad016 100644 --- a/lib/grade/tests/grade_scale_test.php +++ b/lib/grade/tests/grade_scale_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/fixtures/lib.php'); * @copyright nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_scale_test extends \grade_base_testcase { +final class grade_scale_test extends \grade_base_testcase { public function test_grade_scale() { $this->sub_test_scale_construct(); diff --git a/lib/phpunit/tests/advanced_test.php b/lib/phpunit/tests/advanced_test.php index 6aa4ba18ccb..63c74a87509 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 361963f0900..47b5c2ffe7c 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 4eb07e4acf1..9c8322c1cdf 100644 --- a/lib/phpunit/tests/phpunit_dataset_test.php +++ b/lib/phpunit/tests/phpunit_dataset_test.php @@ -36,7 +36,7 @@ use org\bovigo\vfs\vfsStream; * * @coversDefaultClass \phpunit_dataset */ -class phpunit_dataset_test extends advanced_testcase { +final class phpunit_dataset_test extends advanced_testcase { /** diff --git a/lib/phpunit/tests/util_test.php b/lib/phpunit/tests/util_test.php index 54c54462523..cb7398a5a73 100644 --- a/lib/phpunit/tests/util_test.php +++ b/lib/phpunit/tests/util_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2015 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class util_test extends \advanced_testcase { +final class util_test extends \advanced_testcase { /** * @dataProvider set_table_modified_by_sql_provider */ diff --git a/lib/table/tests/external/dynamic/get_test.php b/lib/table/tests/external/dynamic/get_test.php index 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 46ae0f9e926..553207de3ec 100644 --- a/lib/testing/tests/testing_generator_test.php +++ b/lib/testing/tests/testing_generator_test.php @@ -24,8 +24,8 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class testing_generator_test extends \advanced_testcase { - public function test_get_plugin_generator_good_case() { +final class testing_generator_test extends \advanced_testcase { + public function test_get_plugin_generator_good_case(): void { $generator = $this->getDataGenerator()->get_plugin_generator('core_question'); $this->assertInstanceOf('core_question_generator', $generator); } diff --git a/lib/testing/tests/util_test.php b/lib/testing/tests/util_test.php index 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 22762599dd5..0a5c66cc15b 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 ba63da58727..2da13c41180 100644 --- a/lib/tests/accesslib_test.php +++ b/lib/tests/accesslib_test.php @@ -30,7 +30,18 @@ defined('MOODLE_INTERNAL') || die(); * * Note: execution may take many minutes especially on slower servers. */ -class accesslib_test extends advanced_testcase { +final class accesslib_test extends advanced_testcase { + + /** + * Setup. + */ + protected function setUp(): void { + parent::setUp(); + $this->resetAfterTest(); + // Turn off the course welcome message, so we can easily test other messages. + set_config('sendcoursewelcomemessage', 0, 'enrol_manual'); + } + /** * Verify comparison of context instances in phpunit asserts. */ diff --git a/lib/tests/adminlib_test.php b/lib/tests/adminlib_test.php index df1be0a4768..c03f856f7f6 100644 --- a/lib/tests/adminlib_test.php +++ b/lib/tests/adminlib_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir.'/adminlib.php'); * @copyright 2020 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class adminlib_test extends \advanced_testcase { +final class adminlib_test extends \advanced_testcase { /** * Data provider of serialized string. diff --git a/lib/tests/admintree_test.php b/lib/tests/admintree_test.php index 30110ace62e..557bcfb00b1 100644 --- a/lib/tests/admintree_test.php +++ b/lib/tests/admintree_test.php @@ -41,7 +41,7 @@ require_once($CFG->libdir.'/adminlib.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class admintree_test extends \advanced_testcase { +final class admintree_test extends \advanced_testcase { /** * Adding nodes into the admin tree. diff --git a/lib/tests/ajaxlib_test.php b/lib/tests/ajaxlib_test.php index cea813f01e9..296dca15083 100644 --- a/lib/tests/ajaxlib_test.php +++ b/lib/tests/ajaxlib_test.php @@ -26,7 +26,7 @@ namespace core; * @covers ::ajax_capture_output * @covers ::ajax_check_captured_output */ -class ajaxlib_test extends \advanced_testcase { +final class ajaxlib_test extends \advanced_testcase { /** @var string Original error log */ protected $oldlog; diff --git a/lib/tests/analysers_test.php b/lib/tests/analysers_test.php index 1e5c3e813a8..d88ffa25e75 100644 --- a/lib/tests/analysers_test.php +++ b/lib/tests/analysers_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../lib/enrollib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class analysers_test extends \advanced_testcase { +final class analysers_test extends \advanced_testcase { /** * test_courses_analyser diff --git a/lib/tests/analytics/indicators_test.php b/lib/tests/analytics/indicators_test.php index f2a11eb1e02..3782aba37b1 100644 --- a/lib/tests/analytics/indicators_test.php +++ b/lib/tests/analytics/indicators_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/../../../lib/enrollib.php'); * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class indicators_test extends \advanced_testcase { +final class indicators_test extends \advanced_testcase { /** * Test all core indicators. diff --git a/lib/tests/antivirus_test.php b/lib/tests/antivirus_test.php index 9367fd1f2d4..dcd555afd70 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 cb448bd4a87..26e041f7eee 100644 --- a/lib/tests/authlib_test.php +++ b/lib/tests/authlib_test.php @@ -25,8 +25,8 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class authlib_test extends \advanced_testcase { - public function test_lockout() { +final class authlib_test extends \advanced_testcase { + public function test_lockout(): void { global $CFG; require_once("$CFG->libdir/authlib.php"); diff --git a/lib/tests/behat_lib_test.php b/lib/tests/behat_lib_test.php index 9b9f47375c7..75e5eb9660b 100644 --- a/lib/tests/behat_lib_test.php +++ b/lib/tests/behat_lib_test.php @@ -31,7 +31,7 @@ * @copyright 2021 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behat_lib_test extends advanced_testcase { +final class behat_lib_test extends advanced_testcase { /** * Setup function diff --git a/lib/tests/blocklib_test.php b/lib/tests/blocklib_test.php index b46e471ad27..59b23c8ed5f 100644 --- a/lib/tests/blocklib_test.php +++ b/lib/tests/blocklib_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/fixtures/testable_block_manager.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blocklib_test extends \advanced_testcase { +final class blocklib_test extends \advanced_testcase { protected $testpage; protected $blockmanager; protected $isediting = null; diff --git a/lib/tests/check_test.php b/lib/tests/check_test.php index 0acf752eed8..fd0fe17730e 100644 --- a/lib/tests/check_test.php +++ b/lib/tests/check_test.php @@ -27,7 +27,7 @@ use core\check\security\passwordpolicy; * @copyright 2020 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class check_test extends \advanced_testcase { +final class check_test extends \advanced_testcase { /** * A simple example showing how a check and result object works diff --git a/lib/tests/classes/courses_tasks_testcase.php b/lib/tests/classes/courses_tasks_testcase.php new file mode 100644 index 00000000000..10ee6357f92 --- /dev/null +++ b/lib/tests/classes/courses_tasks_testcase.php @@ -0,0 +1,79 @@ +. + +namespace core\tests; + +/** + * TODO describe file courses_tasks_testcase + * + * @package core + * @copyright 2024 Andrew Lyons + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +abstract class courses_tasks_testcase extends \advanced_testcase { + /** + * Data provider for test_show_started_courses. + * + * @return array + */ + public static function get_courses_provider(): array { + return [ + 'No hidden courses' => [ + 'lastweek' => 0, + 'yesterday' => 0, + 'tomorrow' => 0, + ], + 'No hidden courses (without visible courses)' => [ + 'lastweek' => 0, + 'yesterday' => 0, + 'tomorrow' => 0, + 'createvisible' => false, + ], + 'Hidden courses with last week or tomorrow dates' => [ + 'lastweek' => 2, + 'yesterday' => 0, + 'tomorrow' => 2, + ], + 'One hidden course of each type (last week, yesterday and tomorrow)' => [ + 'lastweek' => 1, + 'yesterday' => 1, + 'tomorrow' => 1, + ], + 'Different hidden courses of each type' => [ + 'lastweek' => 2, + 'yesterday' => 3, + 'tomorrow' => 4, + ], + 'A couple of hidden courses of each type (without visible courses)' => [ + 'lastweek' => 2, + 'yesterday' => 2, + 'tomorrow' => 2, + 'createvisible' => false, + ], + 'Only a few hidden courses for yesterday' => [ + 'lastweek' => 0, + 'yesterday' => 5, + 'tomorrow' => 0, + ], + 'Only a few hidden courses for yesterday (without visible courses)' => [ + 'lastweek' => 0, + 'yesterday' => 5, + 'tomorrow' => 0, + 'createvisible' => false, + ], + ]; + } +} diff --git a/lib/tests/client_test.php b/lib/tests/client_test.php index e2249c03144..8ff0e2995f3 100644 --- a/lib/tests/client_test.php +++ b/lib/tests/client_test.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @package core */ -class client_test extends advanced_testcase { +final class client_test extends advanced_testcase { /** * Uses the static dataset as feed-in * diff --git a/lib/tests/collator_test.php b/lib/tests/collator_test.php index 4fa5c5be1dd..d43970e90f9 100644 --- a/lib/tests/collator_test.php +++ b/lib/tests/collator_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2011 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class collator_test extends \advanced_testcase { +final class collator_test extends \advanced_testcase { /** * @var string The initial lang, stored because we change it during testing diff --git a/lib/tests/completionlib_test.php b/lib/tests/completionlib_test.php index 2cbcfe3c23a..fcc0c93d498 100644 --- a/lib/tests/completionlib_test.php +++ b/lib/tests/completionlib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir.'/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \completion_info */ -class completionlib_test extends advanced_testcase { +final class completionlib_test extends advanced_testcase { protected $course; protected $user; protected $module1; diff --git a/lib/tests/componentlib_test.php b/lib/tests/componentlib_test.php index 7e6ac394b86..335ebaacb71 100644 --- a/lib/tests/componentlib_test.php +++ b/lib/tests/componentlib_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir.'/componentlib.class.php'); * @copyright 2011 Tomasz Muras * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class componentlib_test extends \advanced_testcase { +final class componentlib_test extends \advanced_testcase { public function test_component_installer() { global $CFG; diff --git a/lib/tests/configonlylib_test.php b/lib/tests/configonlylib_test.php index 30b6ec6bffc..9222dc9e71a 100644 --- a/lib/tests/configonlylib_test.php +++ b/lib/tests/configonlylib_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/../configonlylib.php'); * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class configonlylib_test extends \advanced_testcase { +final class configonlylib_test extends \advanced_testcase { /** * Test cleaning of invalid utf-8 entities. diff --git a/lib/tests/content/export/exportable_items/exportable_filearea_test.php b/lib/tests/content/export/exportable_items/exportable_filearea_test.php index 8ce062edfaf..ac61d8e8693 100644 --- a/lib/tests/content/export/exportable_items/exportable_filearea_test.php +++ b/lib/tests/content/export/exportable_items/exportable_filearea_test.php @@ -35,7 +35,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_filearea */ -class exportable_filearea_test extends advanced_testcase { +final class exportable_filearea_test extends advanced_testcase { /** * Ensure that the the exportable_filearea does not fetch files when none exist. diff --git a/lib/tests/content/export/exportable_items/exportable_stored_file_test.php b/lib/tests/content/export/exportable_items/exportable_stored_file_test.php index 0b92d1b48cd..4d26aec7a12 100644 --- a/lib/tests/content/export/exportable_items/exportable_stored_file_test.php +++ b/lib/tests/content/export/exportable_items/exportable_stored_file_test.php @@ -34,7 +34,7 @@ use stored_file; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_stored_file */ -class exportable_stored_file_test extends advanced_testcase { +final class exportable_stored_file_test extends advanced_testcase { /** * Ensure that the create_from_area_params function returns an array. diff --git a/lib/tests/content/export/exportable_items/exportable_textarea_test.php b/lib/tests/content/export/exportable_items/exportable_textarea_test.php index de1968d30d1..4cca31db018 100644 --- a/lib/tests/content/export/exportable_items/exportable_textarea_test.php +++ b/lib/tests/content/export/exportable_items/exportable_textarea_test.php @@ -35,7 +35,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\content\exportable_items\exportable_textarea */ -class exportable_textarea_test extends advanced_testcase { +final class exportable_textarea_test extends advanced_testcase { /** * Ensure that an exportable textarea which does not relate to any content, does not attempt to export any content. diff --git a/lib/tests/content/export/exporters/course_exporter_test.php b/lib/tests/content/export/exporters/course_exporter_test.php index 3b1270b2d27..ac35bb714be 100644 --- a/lib/tests/content/export/exporters/course_exporter_test.php +++ b/lib/tests/content/export/exporters/course_exporter_test.php @@ -33,7 +33,7 @@ use core\content\export\zipwriter; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core\content\export\exporters\course_exporter */ -class course_exporter_test extends advanced_testcase { +final class course_exporter_test extends advanced_testcase { /** * The course_exporter should still export a module intro when no exportables are passed. diff --git a/lib/tests/content/export/zipwriter_test.php b/lib/tests/content/export/zipwriter_test.php index 762e5a1f1bc..b75630758bb 100644 --- a/lib/tests/content/export/zipwriter_test.php +++ b/lib/tests/content/export/zipwriter_test.php @@ -32,7 +32,7 @@ use ZipArchive; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers \core\content\export\zipwriter */ -class zipwriter_test extends advanced_testcase { +final class zipwriter_test extends advanced_testcase { /** * Test add_file_from_stored_file(). diff --git a/lib/tests/content_test.php b/lib/tests/content_test.php index 52c8f56ddd8..e323d3a89cb 100644 --- a/lib/tests/content_test.php +++ b/lib/tests/content_test.php @@ -33,7 +33,7 @@ namespace core; * @copyright 2020 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class content_test extends \advanced_testcase { +final class content_test extends \advanced_testcase { /** * A test to confirm only valid cases allow exporting of course content. diff --git a/lib/tests/context/block_test.php b/lib/tests/context/block_test.php index 1cc42bbe534..2533935ab49 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 982098d7f92..dbd49434a4b 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 7fb5425c97a..0dcf6ac188b 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 a8fba3f200b..249f1e6053a 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 ccf873186aa..83b99335b54 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 d961337c182..5ac8a764816 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 7033d52a2af..049f3ec27b0 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 3fffc43cb01..a97ad3cbb80 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 22a8bcf3d75..1b1e0403aa9 100644 --- a/lib/tests/core_media_player_native_test.php +++ b/lib/tests/core_media_player_native_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/fixtures/testable_core_media_player_native.php'); * @copyright 2019 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class core_media_player_native_test extends \advanced_testcase { +final class core_media_player_native_test extends \advanced_testcase { /** * Pre-test setup. diff --git a/lib/tests/core_renderer_template_exploit_test.php b/lib/tests/core_renderer_template_exploit_test.php index e24d8fe5876..d44348a2d0d 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 b8760a3f4ed..fe905943e3d 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/csvclass_test.php b/lib/tests/csvclass_test.php index 1bf9e49c3df..41f418218a6 100644 --- a/lib/tests/csvclass_test.php +++ b/lib/tests/csvclass_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/lib/csvlib.class.php'); * @copyright 2012 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class csvclass_test extends \advanced_testcase { +final class csvclass_test extends \advanced_testcase { protected $testdata = array(); protected $teststring = ''; diff --git a/lib/tests/curl_security_helper_test.php b/lib/tests/curl_security_helper_test.php index f76c9928953..df3bae772cf 100644 --- a/lib/tests/curl_security_helper_test.php +++ b/lib/tests/curl_security_helper_test.php @@ -26,7 +26,7 @@ namespace core; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class curl_security_helper_test extends \advanced_testcase { +final class curl_security_helper_test extends \advanced_testcase { /** * Test for \core\files\curl_security_helper::url_is_blocked(). * diff --git a/lib/tests/customcontext_test.php b/lib/tests/customcontext_test.php index 26f00bf81f3..5a28433125e 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 de2cc90c3ee..1dfbe05df15 100644 --- a/lib/tests/datalib_test.php +++ b/lib/tests/datalib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datalib_test extends \advanced_testcase { +final class datalib_test extends \advanced_testcase { protected function normalise_sql($sort) { return preg_replace('~\s+~', ' ', $sort); } diff --git a/lib/tests/datalib_update_with_unique_index_test.php b/lib/tests/datalib_update_with_unique_index_test.php index 8cb864f66a9..a1869f4922a 100644 --- a/lib/tests/datalib_update_with_unique_index_test.php +++ b/lib/tests/datalib_update_with_unique_index_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class datalib_update_with_unique_index_test extends \advanced_testcase { +final class datalib_update_with_unique_index_test extends \advanced_testcase { public function test_decompose_update_into_safe_changes_identity() { $this->assertEquals(array(), decompose_update_into_safe_changes( diff --git a/lib/tests/date_legacy_test.php b/lib/tests/date_legacy_test.php index f26e164a1f1..0397b5e2fce 100644 --- a/lib/tests/date_legacy_test.php +++ b/lib/tests/date_legacy_test.php @@ -24,8 +24,8 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Petr Skoda */ -class date_legacy_test extends \advanced_testcase { - public function test_settings() { +final class date_legacy_test extends \advanced_testcase { + public function test_settings(): void { global $CFG; $this->resetAfterTest(); diff --git a/lib/tests/date_test.php b/lib/tests/date_test.php index f8d8040a115..34a0a80997c 100644 --- a/lib/tests/date_test.php +++ b/lib/tests/date_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @covers \core_date * @coversDefaultClass \core_date */ -class date_test extends advanced_testcase { +final class date_test extends advanced_testcase { /** * @covers ::get_default_php_timezone */ diff --git a/lib/tests/db/upgradelib_test.php b/lib/tests/db/upgradelib_test.php index f989d285ec8..fcdfab99ac9 100644 --- a/lib/tests/db/upgradelib_test.php +++ b/lib/tests/db/upgradelib_test.php @@ -26,7 +26,7 @@ namespace core\db; * @copyright 2022 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgradelib_test extends \advanced_testcase { +final class upgradelib_test extends \advanced_testcase { /** * Shared setup for the testcase. diff --git a/lib/tests/editorlib_test.php b/lib/tests/editorlib_test.php index 2bb0a5725fc..2b969b60332 100644 --- a/lib/tests/editorlib_test.php +++ b/lib/tests/editorlib_test.php @@ -24,7 +24,7 @@ namespace core; * @author Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class editorlib_test extends \advanced_testcase { +final class editorlib_test extends \advanced_testcase { /** * Tests the installation of event handlers from file diff --git a/lib/tests/encryption_test.php b/lib/tests/encryption_test.php index 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 30dc2c91cbe..4e9634f9596 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 b83e6c5337e..97f8b754280 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 8e9191b131a..64b563e36be 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 9292785824b..58370011015 100644 --- a/lib/tests/event/contentbank_content_updated_test.php +++ b/lib/tests/event/contentbank_content_updated_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_updated */ -class contentbank_content_updated_test extends \advanced_testcase { +final class contentbank_content_updated_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_uploaded_test.php b/lib/tests/event/contentbank_content_uploaded_test.php index 2aa131f1327..c2cde1e6e36 100644 --- a/lib/tests/event/contentbank_content_uploaded_test.php +++ b/lib/tests/event/contentbank_content_uploaded_test.php @@ -36,7 +36,7 @@ use core_contentbank\contentbank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\contentbank_content_uploaded */ -class contentbank_content_uploaded_test extends \advanced_testcase { +final class contentbank_content_uploaded_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/tests/event/contentbank_content_viewed_test.php b/lib/tests/event/contentbank_content_viewed_test.php index 191cdb45c18..178a2830999 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 05a875beea3..bb9fd198813 100644 --- a/lib/tests/event/context_locked_test.php +++ b/lib/tests/event/context_locked_test.php @@ -25,7 +25,7 @@ namespace core\event; * @author Neill Magill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class context_locked_test extends \advanced_testcase { +final class context_locked_test extends \advanced_testcase { /** * Locks an unlocked context and checks that a core\event\context_locked event is created. * diff --git a/lib/tests/event/deprecated_test.php b/lib/tests/event/deprecated_test.php index 57aa7a8af89..34d38bfe3db 100644 --- a/lib/tests/event/deprecated_test.php +++ b/lib/tests/event/deprecated_test.php @@ -24,7 +24,7 @@ namespace core\event; * @copyright 2013 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class deprecated_test extends \advanced_testcase { +final class deprecated_test extends \advanced_testcase { /** * Test event properties and methods. diff --git a/lib/tests/event/draft_file_added_test.php b/lib/tests/event/draft_file_added_test.php index e5c9eab0d30..d4b35cb3db4 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 32034a508be..8b4bbd2ac8c 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 e385981ac07..86a5e48ee10 100644 --- a/lib/tests/event/events_test.php +++ b/lib/tests/event/events_test.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); require_once(__DIR__.'/../fixtures/event_fixtures.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/event/grade_deleted_test.php b/lib/tests/event/grade_deleted_test.php index b23d832b5f7..3eb92f9ac8d 100644 --- a/lib/tests/event/grade_deleted_test.php +++ b/lib/tests/event/grade_deleted_test.php @@ -26,7 +26,7 @@ namespace core\event; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grade_deleted_test extends \advanced_testcase { +final class grade_deleted_test extends \advanced_testcase { /** * Tests the event details. diff --git a/lib/tests/event/grade_item_deleted_test.php b/lib/tests/event/grade_item_deleted_test.php index d1b0c160c14..ee2e2e22d46 100644 --- a/lib/tests/event/grade_item_deleted_test.php +++ b/lib/tests/event/grade_item_deleted_test.php @@ -34,7 +34,7 @@ namespace core\event; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\event\grade_item_deleted */ -class grade_item_deleted_test extends \advanced_testcase { +final class grade_item_deleted_test extends \advanced_testcase { /** * Test the grade item deleted event. diff --git a/lib/tests/event/profile_field_test.php b/lib/tests/event/profile_field_test.php index 4af04703791..37aa0a0b5af 100644 --- a/lib/tests/event/profile_field_test.php +++ b/lib/tests/event/profile_field_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/user/profile/definelib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profile_field_test extends \advanced_testcase { +final class profile_field_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/event/unknown_logged_test.php b/lib/tests/event/unknown_logged_test.php index 8e40b9b1c1f..400be3a700e 100644 --- a/lib/tests/event/unknown_logged_test.php +++ b/lib/tests/event/unknown_logged_test.php @@ -28,7 +28,7 @@ require_once(__DIR__.'/../fixtures/event_fixtures.php'); * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class unknown_logged_test extends \advanced_testcase { +final class unknown_logged_test extends \advanced_testcase { public function test_restore_event() { $event1 = \core_tests\event\unittest_executed::create(array('context' => \context_system::instance(), 'other' => array('sample' => 1, 'xx' => 10))); diff --git a/lib/tests/event/user_graded_test.php b/lib/tests/event/user_graded_test.php index 6c36d7bbcde..8c9a187b1a0 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 f9069a9e6bb..87e5b0d31c6 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 44d6cf8ef28..8c0bfdbe7d1 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/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 049359892c8..81e8c1bc280 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 ec0abbded39..4f968e1d685 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 cf66de4cc8f..6a871cb45fe 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 b3c72613ef6..468fd118090 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 cd04cef3321..208a13729be 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 758dbc7916f..4b3ac20211b 100644 --- a/lib/tests/external/record_userfeedback_action_test.php +++ b/lib/tests/external/record_userfeedback_action_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\external\record_userfeedback_action */ -class record_userfeedback_action_test extends externallib_advanced_testcase { +final class record_userfeedback_action_test extends externallib_advanced_testcase { /** * Data provider for test_record_userfeedback_action. diff --git a/lib/tests/externallib_test.php b/lib/tests/externallib_test.php index 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 1e3760a4bf2..3b2ec2bc536 100644 --- a/lib/tests/filelib_test.php +++ b/lib/tests/filelib_test.php @@ -43,8 +43,8 @@ require_once($CFG->dirroot . '/repository/lib.php'); * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filelib_test extends \advanced_testcase { - public function test_format_postdata_for_curlcall() { +final class filelib_test extends \advanced_testcase { + public function test_format_postdata_for_curlcall(): void { // POST params with just simple types. $postdatatoconvert = array( 'userid' => 1, 'roleid' => 22, 'name' => 'john'); diff --git a/lib/tests/filestorage_zip_archive_test.php b/lib/tests/filestorage_zip_archive_test.php index 681127ce36c..58dae500163 100644 --- a/lib/tests/filestorage_zip_archive_test.php +++ b/lib/tests/filestorage_zip_archive_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/filestorage/zip_archive.php'); * @copyright 2020 Université Rennes 2 {@link https://www.univ-rennes2.fr} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filestorage_zip_archive_test extends \advanced_testcase { +final class filestorage_zip_archive_test extends \advanced_testcase { /** * Test mangle_pathname() method. * diff --git a/lib/tests/filetypes_test.php b/lib/tests/filetypes_test.php index 478de231f16..2df7bff15f9 100644 --- a/lib/tests/filetypes_test.php +++ b/lib/tests/filetypes_test.php @@ -30,7 +30,7 @@ require_once($CFG->libdir . '/filelib.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filetypes_test extends \advanced_testcase { +final class filetypes_test extends \advanced_testcase { public function test_add_type() { $this->resetAfterTest(); diff --git a/lib/tests/filter_manager_test.php b/lib/tests/filter_manager_test.php index 061f2328027..28c21989545 100644 --- a/lib/tests/filter_manager_test.php +++ b/lib/tests/filter_manager_test.php @@ -26,7 +26,7 @@ use filter_manager; * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class filter_manager_test extends \advanced_testcase { +final class filter_manager_test extends \advanced_testcase { /** * Helper method to apply filters to some text and return the result. diff --git a/lib/tests/filterlib_test.php b/lib/tests/filterlib_test.php index 29bd34c74ef..401f4d991a4 100644 --- a/lib/tests/filterlib_test.php +++ b/lib/tests/filterlib_test.php @@ -34,7 +34,7 @@ require_once($CFG->libdir . '/filterlib.php'); * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filterlib_test extends \advanced_testcase { +final class filterlib_test extends \advanced_testcase { private function assert_only_one_filter_globally($filter, $state) { global $DB; diff --git a/lib/tests/formslib_test.php b/lib/tests/formslib_test.php index 08c3d42eb9c..d2ec495971e 100644 --- a/lib/tests/formslib_test.php +++ b/lib/tests/formslib_test.php @@ -48,7 +48,7 @@ require_once($CFG->libdir . '/form/text.php'); * @copyright 2011 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formslib_test extends \advanced_testcase { +final class formslib_test extends \advanced_testcase { public function test_require_rule() { global $CFG; diff --git a/lib/tests/gdlib_test.php b/lib/tests/gdlib_test.php index f0401f974e1..71242a3bb26 100644 --- a/lib/tests/gdlib_test.php +++ b/lib/tests/gdlib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2015 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gdlib_test extends \basic_testcase { +final class gdlib_test extends \basic_testcase { private $fixturepath = null; diff --git a/lib/tests/googlelib_test.php b/lib/tests/googlelib_test.php index 59241e76cd9..e7cebc07740 100644 --- a/lib/tests/googlelib_test.php +++ b/lib/tests/googlelib_test.php @@ -26,7 +26,7 @@ use Google_Service_YouTube; * @copyright 2021 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googlelib_test extends \advanced_testcase { +final class googlelib_test extends \advanced_testcase { public function test_invalid_google_api_key() { global $CFG; diff --git a/lib/tests/gradelib_test.php b/lib/tests/gradelib_test.php index f1964d7e9ff..59c8c3bfa31 100644 --- a/lib/tests/gradelib_test.php +++ b/lib/tests/gradelib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/gradelib.php'); * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gradelib_test extends \advanced_testcase { +final class gradelib_test extends \advanced_testcase { public function test_grade_update_mod_grades() { diff --git a/lib/tests/grades_external_test.php b/lib/tests/grades_external_test.php index cdc0be91e4f..475ad2c3498 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 1b9d4cfabf8..6e36be97d74 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 122bc296012..52e795d9555 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 7045b2fb4ec..d49035a8ce1 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() { $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 6bb27fc8a43..df5e844dfc7 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/htmlpurifier_test.php b/lib/tests/htmlpurifier_test.php index 6d5ddd6f034..5843ff11d2a 100644 --- a/lib/tests/htmlpurifier_test.php +++ b/lib/tests/htmlpurifier_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class htmlpurifier_test extends \basic_testcase { +final class htmlpurifier_test extends \basic_testcase { /** * Verify _blank target is allowed. diff --git a/lib/tests/http_client_test.php b/lib/tests/http_client_test.php index e26e6b65eef..1f5c58b5d9a 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 c177c22bc62..e27312101d3 100644 --- a/lib/tests/ip_utils_test.php +++ b/lib/tests/ip_utils_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2016 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ip_utils_test extends \basic_testcase { +final class ip_utils_test extends \basic_testcase { /** * Test for \core\ip_utils::is_domain_name(). * diff --git a/lib/tests/jquery_test.php b/lib/tests/jquery_test.php index b56226bfa88..b0082fadf83 100644 --- a/lib/tests/jquery_test.php +++ b/lib/tests/jquery_test.php @@ -30,7 +30,7 @@ namespace core; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class jquery_test extends \basic_testcase { +final class jquery_test extends \basic_testcase { public function test_plugins_file() { global $CFG; diff --git a/lib/tests/ldaplib_test.php b/lib/tests/ldaplib_test.php index 5da201b74bb..fe61ff9f547 100644 --- a/lib/tests/ldaplib_test.php +++ b/lib/tests/ldaplib_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/ldaplib.php'); * @copyright Damyon Wiese, Iñaki Arenaza 2014 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class ldaplib_test extends \advanced_testcase { +final class ldaplib_test extends \advanced_testcase { public function test_ldap_addslashes() { // See http://tools.ietf.org/html/rfc4514#section-5.2 if you want diff --git a/lib/tests/licenselib_test.php b/lib/tests/licenselib_test.php index 15c152f4c1d..f6d6820b772 100644 --- a/lib/tests/licenselib_test.php +++ b/lib/tests/licenselib_test.php @@ -33,7 +33,7 @@ require_once(__DIR__.'/../licenselib.php'); * @copyright 2020 Tom Dickman * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class licenselib_test extends advanced_testcase { +final class licenselib_test extends advanced_testcase { /** * Test getting licenses from database or cache. diff --git a/lib/tests/lock/timing_wrapper_lock_factory_test.php b/lib/tests/lock/timing_wrapper_lock_factory_test.php index a05815d4cd7..23756f40e41 100644 --- a/lib/tests/lock/timing_wrapper_lock_factory_test.php +++ b/lib/tests/lock/timing_wrapper_lock_factory_test.php @@ -24,7 +24,7 @@ namespace core\lock; * @copyright 2022 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class timing_wrapper_lock_factory_test extends \advanced_testcase { +final class timing_wrapper_lock_factory_test extends \advanced_testcase { /** * Tests lock timing wrapper class. diff --git a/lib/tests/lock_config_test.php b/lib/tests/lock_config_test.php index adc689a1607..d1823b253ed 100644 --- a/lib/tests/lock_config_test.php +++ b/lib/tests/lock_config_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lock_config_test extends \advanced_testcase { +final class lock_config_test extends \advanced_testcase { /** * Tests the static parse charset method diff --git a/lib/tests/lock_test.php b/lib/tests/lock_test.php index 39ec94b9a53..4dacbf42257 100644 --- a/lib/tests/lock_test.php +++ b/lib/tests/lock_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lock_test extends \advanced_testcase { +final class lock_test extends \advanced_testcase { /** * Some lock types will store data in the database. diff --git a/lib/tests/markdown_test.php b/lib/tests/markdown_test.php index 3f75534e99b..52a20fc1066 100644 --- a/lib/tests/markdown_test.php +++ b/lib/tests/markdown_test.php @@ -30,7 +30,7 @@ namespace core; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class markdown_test extends \basic_testcase { +final class markdown_test extends \basic_testcase { public function test_paragraphs() { $text = "one\n\ntwo"; diff --git a/lib/tests/mathslib_test.php b/lib/tests/mathslib_test.php index 5994e2fffdf..8291b323384 100644 --- a/lib/tests/mathslib_test.php +++ b/lib/tests/mathslib_test.php @@ -31,7 +31,7 @@ require_once($CFG->libdir . '/mathslib.php'); * @copyright 2007 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mathslib_test extends \basic_testcase { +final class mathslib_test extends \basic_testcase { /** * Tests the basic formula evaluation. diff --git a/lib/tests/medialib_test.php b/lib/tests/medialib_test.php index e95bda6f679..36d6f00bb56 100644 --- a/lib/tests/medialib_test.php +++ b/lib/tests/medialib_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/fixtures/testable_core_media_player.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class medialib_test extends \advanced_testcase { +final class medialib_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/lib/tests/message_test.php b/lib/tests/message_test.php index c9a76c862dc..db0a4ad2297 100644 --- a/lib/tests/message_test.php +++ b/lib/tests/message_test.php @@ -26,7 +26,7 @@ namespace core; * @copyright 2015 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class message_test extends \advanced_testcase { +final class message_test extends \advanced_testcase { /** * Test the method get_eventobject_for_processor(). diff --git a/lib/tests/messagelib_test.php b/lib/tests/messagelib_test.php index ee04a68c271..a90b7755b1c 100644 --- a/lib/tests/messagelib_test.php +++ b/lib/tests/messagelib_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2012 The Open Universtiy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class messagelib_test extends \advanced_testcase { +final class messagelib_test extends \advanced_testcase { public function test_message_provider_disabled() { $this->resetAfterTest(); diff --git a/lib/tests/minify_test.php b/lib/tests/minify_test.php index 679c19b3be9..7280001c51a 100644 --- a/lib/tests/minify_test.php +++ b/lib/tests/minify_test.php @@ -28,8 +28,8 @@ use core_minify; * @copyright 2013 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class minify_test extends \advanced_testcase { - public function test_css() { +final class minify_test extends \advanced_testcase { + public function test_css(): void { $css = " body { background: #fff; diff --git a/lib/tests/modinfolib_test.php b/lib/tests/modinfolib_test.php index 24410eca1ec..8d0486fb154 100644 --- a/lib/tests/modinfolib_test.php +++ b/lib/tests/modinfolib_test.php @@ -35,8 +35,8 @@ use Exception; * @copyright 2012 Andrew Davis * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class modinfolib_test extends advanced_testcase { - public function test_section_info_properties() { +final class modinfolib_test extends advanced_testcase { + public function test_section_info_properties(): void { global $DB, $CFG; $this->resetAfterTest(); diff --git a/lib/tests/moodle_page_test.php b/lib/tests/moodle_page_test.php index 87e007f47fc..75c4cd5c7be 100644 --- a/lib/tests/moodle_page_test.php +++ b/lib/tests/moodle_page_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir . '/blocklib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \moodle_page */ -class moodle_page_test extends \advanced_testcase { +final class moodle_page_test extends \advanced_testcase { /** * @var testable_moodle_page diff --git a/lib/tests/moodlelib_current_language_test.php b/lib/tests/moodlelib_current_language_test.php index 2b6c6cf273e..885e4bb49dd 100644 --- a/lib/tests/moodlelib_current_language_test.php +++ b/lib/tests/moodlelib_current_language_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers ::current_language */ -class moodlelib_current_language_test extends \advanced_testcase { +final class moodlelib_current_language_test extends \advanced_testcase { public function test_current_language_site_default(): void { $this->resetAfterTest(); diff --git a/lib/tests/moodlenet/activity_packager_test.php b/lib/tests/moodlenet/activity_packager_test.php index c14ecfd9f94..b0fcb7c63b8 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 a79f0b33a20..68a276ccb70 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 780cc365539..96ae852db9c 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 996769ee8eb..8ee81d1e19e 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 5f6e0cfd89e..64c61eff6dd 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 41049d7ec63..9effec8ce78 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 fdf3bc3f959..5282b8f945b 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 140e98462a8..956ba1da900 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 9d856ed52d0..7452d8e529a 100644 --- a/lib/tests/navigation/output/primary_test.php +++ b/lib/tests/navigation/output/primary_test.php @@ -26,7 +26,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class primary_test extends \advanced_testcase { +final class primary_test extends \advanced_testcase { /** * Basic setup to make sure the nav objects gets generated without any issues. */ diff --git a/lib/tests/navigation/views/primary_test.php b/lib/tests/navigation/views/primary_test.php index b28cee7a78f..7d6bcb192c4 100644 --- a/lib/tests/navigation/views/primary_test.php +++ b/lib/tests/navigation/views/primary_test.php @@ -29,7 +29,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class primary_test extends \advanced_testcase { +final class primary_test extends \advanced_testcase { /** * Test the initialise in different contexts * diff --git a/lib/tests/navigation/views/secondary_test.php b/lib/tests/navigation/views/secondary_test.php index 55f98d2d32c..27f3201387a 100644 --- a/lib/tests/navigation/views/secondary_test.php +++ b/lib/tests/navigation/views/secondary_test.php @@ -31,7 +31,7 @@ use moodle_url; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class secondary_test extends \advanced_testcase { +final class secondary_test extends \advanced_testcase { /** * Test the get_leaf_nodes function * @param float $siteorder The order for the siteadmin node diff --git a/lib/tests/navigationlib_test.php b/lib/tests/navigationlib_test.php index e9b6e8dce31..270bd712f77 100644 --- a/lib/tests/navigationlib_test.php +++ b/lib/tests/navigationlib_test.php @@ -39,7 +39,7 @@ require_once($CFG->libdir . '/navigationlib.php'); * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5) */ -class navigationlib_test extends \advanced_testcase { +final class navigationlib_test extends \advanced_testcase { /** * @var navigation_node */ diff --git a/lib/tests/notification_test.php b/lib/tests/notification_test.php index 8e4a75af7c7..b29b234b2a4 100644 --- a/lib/tests/notification_test.php +++ b/lib/tests/notification_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class notification_test extends \advanced_testcase { +final class notification_test extends \advanced_testcase { /** * Setup required for all notification tests. diff --git a/lib/tests/oauth2/discovery/auth_server_config_reader_test.php b/lib/tests/oauth2/discovery/auth_server_config_reader_test.php index 580a91ce873..ae7d4fb5a96 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 873ceda8526..0fa7627db03 100644 --- a/lib/tests/oauth2_test.php +++ b/lib/tests/oauth2_test.php @@ -31,7 +31,7 @@ use \core\oauth2\user_field_mapping; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. * @coversDefaultClass \core\oauth2\api */ -class oauth2_test extends \advanced_testcase { +final class oauth2_test extends \advanced_testcase { /** * Tests the crud operations on oauth2 issuers. diff --git a/lib/tests/output/activity_header_test.php b/lib/tests/output/activity_header_test.php index 588dca4c2e0..6acba921499 100644 --- a/lib/tests/output/activity_header_test.php +++ b/lib/tests/output/activity_header_test.php @@ -25,7 +25,7 @@ namespace core\output; * @copyright 2021 Peter * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class activity_header_test extends \advanced_testcase { +final class activity_header_test extends \advanced_testcase { /** * Test the title setter diff --git a/lib/tests/output/choicelist_test.php b/lib/tests/output/choicelist_test.php index 145766522f3..4ba150815c1 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 d8b3e10c5bf..567abd79348 100644 --- a/lib/tests/output/language_menu_test.php +++ b/lib/tests/output/language_menu_test.php @@ -26,7 +26,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class language_menu_test extends \advanced_testcase { +final class language_menu_test extends \advanced_testcase { /** * Basic setup to make sure the nav objects gets generated without any issues. */ diff --git a/lib/tests/output/mustache_clean_string_helper_test.php b/lib/tests/output/mustache_clean_string_helper_test.php index 73d74fe21b8..d71e7fe1b16 100644 --- a/lib/tests/output/mustache_clean_string_helper_test.php +++ b/lib/tests/output/mustache_clean_string_helper_test.php @@ -27,7 +27,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\output\mustache_clean_string_helper */ -class mustache_clean_string_helper_test extends \basic_testcase { +final class mustache_clean_string_helper_test extends \basic_testcase { /** * Test the get_lang_menu diff --git a/lib/tests/output/mustache_helper_collection_test.php b/lib/tests/output/mustache_helper_collection_test.php index d89aac9a442..950ac4117d1 100644 --- a/lib/tests/output/mustache_helper_collection_test.php +++ b/lib/tests/output/mustache_helper_collection_test.php @@ -24,7 +24,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\output\mustache_helper_collection */ -class mustache_helper_collection_test extends \advanced_testcase { +final class mustache_helper_collection_test extends \advanced_testcase { /** * Test cases to confirm that disallowed helpers are stripped from the source diff --git a/lib/tests/output/mustache_quote_helper_test.php b/lib/tests/output/mustache_quote_helper_test.php index 6ed5960e75b..f7cde42590d 100644 --- a/lib/tests/output/mustache_quote_helper_test.php +++ b/lib/tests/output/mustache_quote_helper_test.php @@ -27,7 +27,7 @@ namespace core\output; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\output\mustache_quote_helper */ -class mustache_quote_helper_test extends \basic_testcase { +final class mustache_quote_helper_test extends \basic_testcase { /** * Tests the quote helper diff --git a/lib/tests/output/mustache_template_finder_test.php b/lib/tests/output/mustache_template_finder_test.php index c9492a3c9b7..6b00f7f2aca 100644 --- a/lib/tests/output/mustache_template_finder_test.php +++ b/lib/tests/output/mustache_template_finder_test.php @@ -27,7 +27,7 @@ namespace core\output; * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mustache_template_finder_test extends \advanced_testcase { +final class mustache_template_finder_test extends \advanced_testcase { /** * Data provider which reutrns a set of valid template directories to be used when testing diff --git a/lib/tests/output/mustache_template_source_loader_test.php b/lib/tests/output/mustache_template_source_loader_test.php index 5e753b4f6cf..3245399dd6d 100644 --- a/lib/tests/output/mustache_template_source_loader_test.php +++ b/lib/tests/output/mustache_template_source_loader_test.php @@ -25,7 +25,7 @@ namespace core\output; * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mustache_template_source_loader_test extends \advanced_testcase { +final class mustache_template_source_loader_test extends \advanced_testcase { /** * Ensure that stripping comments from templates does not mutilate the template body. */ diff --git a/lib/tests/output/participants_action_bar_test.php b/lib/tests/output/participants_action_bar_test.php index fb3e1c5a09b..f04efc9f186 100644 --- a/lib/tests/output/participants_action_bar_test.php +++ b/lib/tests/output/participants_action_bar_test.php @@ -25,7 +25,7 @@ use ReflectionMethod; * @copyright 2021 onwards Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class participants_action_bar_test extends \advanced_testcase { +final class participants_action_bar_test extends \advanced_testcase { /** * Test the get_content_for_select function diff --git a/lib/tests/outputrenderers_test.php b/lib/tests/outputrenderers_test.php index ba20f63bf41..a9f9ab4ae9c 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/pdflib_test.php b/lib/tests/pdflib_test.php index ec57baff78e..21ae2053ca1 100644 --- a/lib/tests/pdflib_test.php +++ b/lib/tests/pdflib_test.php @@ -25,7 +25,7 @@ use TCPDF_STATIC; * @copyright 2021 Brendan Heywood (brendan@catalyst-au.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class pdflib_test extends \advanced_testcase { +final class pdflib_test extends \advanced_testcase { public function test_gettcpdf_producer() { global $CFG; diff --git a/lib/tests/persistent_test.php b/lib/tests/persistent_test.php index 78f5b52a4b9..92353a4e9c8 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 543e81b94b1..abe92d88067 100644 --- a/lib/tests/phpxmlrpc_test.php +++ b/lib/tests/phpxmlrpc_test.php @@ -30,7 +30,7 @@ use PhpXmlRpc\Value; * @copyright 2022 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com} * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class phpxmlrpc_test extends \basic_testcase { +final class phpxmlrpc_test extends \basic_testcase { /** * Ensure PhpXmlRpc availability. diff --git a/lib/tests/plugininfo/base_test.php b/lib/tests/plugininfo/base_test.php index 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 f7ee4b8c8c4..42b752045a6 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 ba740f368ab..d2448f85e8f 100644 --- a/lib/tests/portfoliolib_test.php +++ b/lib/tests/portfoliolib_test.php @@ -35,7 +35,7 @@ require_once($CFG->libdir.'/portfolio/formats.php'); * @copyright 2014 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfoliolib_test extends advanced_testcase { +final class portfoliolib_test extends advanced_testcase { public function test_portfolio_rewrite_pluginfile_urls() { $this->resetAfterTest(); diff --git a/lib/tests/privacy/provider_test.php b/lib/tests/privacy/provider_test.php index b6ce639eb2a..4c300f36fc6 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 8c48f4b3a14..84fd6ed63d1 100644 --- a/lib/tests/progress_display_test.php +++ b/lib/tests/progress_display_test.php @@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || die(); -class progress_display_test extends \advanced_testcase { +final class progress_display_test extends \advanced_testcase { /** * Test basic function of progress_display, updating status and outputting wibbler. diff --git a/lib/tests/progress_test.php b/lib/tests/progress_test.php index 31496cdd1a3..6e90e3266e5 100644 --- a/lib/tests/progress_test.php +++ b/lib/tests/progress_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class progress_test extends \basic_testcase { +final class progress_test extends \basic_testcase { /** * Tests for basic use with simple numeric progress. diff --git a/lib/tests/qrcode_test.php b/lib/tests/qrcode_test.php index 7e2830482a9..5b18a97e8fa 100644 --- a/lib/tests/qrcode_test.php +++ b/lib/tests/qrcode_test.php @@ -26,7 +26,7 @@ use core_qrcode; * @author * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qrcode_test extends \basic_testcase { +final class qrcode_test extends \basic_testcase { /** * Basic test to generate a QR code and check that the library is not broken. diff --git a/lib/tests/questionlib_test.php b/lib/tests/questionlib_test.php index 4765e21d179..96b4619dc13 100644 --- a/lib/tests/questionlib_test.php +++ b/lib/tests/questionlib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2006 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionlib_test extends \advanced_testcase { +final class questionlib_test extends \advanced_testcase { /** * Test set up. diff --git a/lib/tests/regex_test.php b/lib/tests/regex_test.php index 450a6754076..a176ce58ad6 100644 --- a/lib/tests/regex_test.php +++ b/lib/tests/regex_test.php @@ -24,8 +24,8 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Petr Skoda */ -class regex_test extends \advanced_testcase { - public function test_whitespace_replacement_with_u() { +final class regex_test extends \advanced_testcase { + public function test_whitespace_replacement_with_u(): void { $unicode = "Теорія і практика використання системи управління навчанням Moo dleКиївський національний університет будівництва і архітектури, 21-22 тра вня 2015 р.http://2015.moodlemoot.in.ua/"; @@ -34,5 +34,3 @@ dleКиївський національний університет будів $this->assertSame(str_replace("\n", ' ', $unicode), $whitespaced); } } - - diff --git a/lib/tests/report_helper_test.php b/lib/tests/report_helper_test.php index 3dc9798d252..e4241ebbd81 100644 --- a/lib/tests/report_helper_test.php +++ b/lib/tests/report_helper_test.php @@ -31,7 +31,7 @@ use core\report_helper; /** * Tests the functions for report_helper class. */ -class report_helper_test extends \advanced_testcase { +final class report_helper_test extends \advanced_testcase { /** * Data provider for testing selected report for same and different courses * diff --git a/lib/tests/requirejs_test.php b/lib/tests/requirejs_test.php index 922d05bde1f..ac0dd2b80f1 100644 --- a/lib/tests/requirejs_test.php +++ b/lib/tests/requirejs_test.php @@ -26,7 +26,7 @@ use core_requirejs; * @copyright 2016 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class requirejs_test extends \advanced_testcase { +final class requirejs_test extends \advanced_testcase { /** * Test requirejs loader diff --git a/lib/tests/rsslib_test.php b/lib/tests/rsslib_test.php index 3585601018e..846919542ad 100644 --- a/lib/tests/rsslib_test.php +++ b/lib/tests/rsslib_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/rsslib.php'); * @copyright 2009 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rsslib_test extends \advanced_testcase { +final class rsslib_test extends \advanced_testcase { // The number of seconds tests should wait for the server to respond (high to prevent false positives). const TIMEOUT = 10; diff --git a/lib/tests/rtlcss_test.php b/lib/tests/rtlcss_test.php index 6e15f7aa7fa..c0a2bf37814 100644 --- a/lib/tests/rtlcss_test.php +++ b/lib/tests/rtlcss_test.php @@ -33,7 +33,7 @@ use Sabberworm\CSS\OutputFormat; /** * Class rtlcss_test. */ -class rtlcss_test extends basic_testcase { +final class rtlcss_test extends basic_testcase { /** * Data provider. * @return array diff --git a/lib/tests/scss_test.php b/lib/tests/scss_test.php index cb550143877..a7d0b88aa37 100644 --- a/lib/tests/scss_test.php +++ b/lib/tests/scss_test.php @@ -26,7 +26,7 @@ use core_scss; * @copyright 2016 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Data provider for is_valid_file diff --git a/lib/tests/session/utility/cookie_helper_test.php b/lib/tests/session/utility/cookie_helper_test.php index 03d5455b38e..7fe2a140f6c 100644 --- a/lib/tests/session/utility/cookie_helper_test.php +++ b/lib/tests/session/utility/cookie_helper_test.php @@ -24,7 +24,7 @@ namespace core\session\utility; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core\session\utility\cookie_helper */ -class cookie_helper_test extends \advanced_testcase { +final class cookie_helper_test extends \advanced_testcase { /** * Testing cookie_response_headers_add_attributes(). diff --git a/lib/tests/sessionlib_test.php b/lib/tests/sessionlib_test.php index 6babae44e8b..96b3d0fde09 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 96b4f5921d8..d2e5ab1b02a 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 fb7d50a3172..99eda25c701 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 2c1b9401385..005f2b3b896 100644 --- a/lib/tests/string_manager_standard_test.php +++ b/lib/tests/string_manager_standard_test.php @@ -42,7 +42,7 @@ require_once($CFG->libdir.'/moodlelib.php'); * @copyright 2013 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class string_manager_standard_test extends \advanced_testcase { +final class string_manager_standard_test extends \advanced_testcase { public function test_string_manager_instance() { $this->resetAfterTest(); diff --git a/lib/tests/tablelib_test.php b/lib/tests/tablelib_test.php index ec5f9245a99..7f3676434d9 100644 --- a/lib/tests/tablelib_test.php +++ b/lib/tests/tablelib_test.php @@ -33,7 +33,7 @@ require_once($CFG->libdir . '/tests/fixtures/testable_flexible_table.php'); * @copyright 2013 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tablelib_test extends \advanced_testcase { +final class tablelib_test extends \advanced_testcase { protected function generate_columns($cols) { $columns = array(); foreach (range(0, $cols - 1) as $j) { diff --git a/lib/tests/task/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 2dbc52c9054..ec313b8e1e3 100644 --- a/lib/tests/task/calendar_cron_task_test.php +++ b/lib/tests/task/calendar_cron_task_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/calendar/lib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calendar_cron_task_test extends \advanced_testcase { +final class calendar_cron_task_test extends \advanced_testcase { /** * Tests set up diff --git a/lib/tests/task/completion_daily_task_test.php b/lib/tests/task/completion_daily_task_test.php index fde8a40eaa9..6540dfbc7f1 100644 --- a/lib/tests/task/completion_daily_task_test.php +++ b/lib/tests/task/completion_daily_task_test.php @@ -25,7 +25,7 @@ use advanced_testcase; * @copyright 2020 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class completion_daily_task_test extends advanced_testcase { +final class completion_daily_task_test extends advanced_testcase { /** * Test calendar cron task with a broken subscription URL. diff --git a/lib/tests/task/database_logger_test.php b/lib/tests/task/database_logger_test.php index f4c93f6196e..a7ec8de5c9d 100644 --- a/lib/tests/task/database_logger_test.php +++ b/lib/tests/task/database_logger_test.php @@ -24,7 +24,7 @@ namespace core\task; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class database_logger_test extends \advanced_testcase { +final class database_logger_test extends \advanced_testcase { /** * @var \moodle_database The original database prior to mocking diff --git a/lib/tests/task/h5p_get_content_types_task_test.php b/lib/tests/task/h5p_get_content_types_task_test.php index ccb42ea2bd8..afa3858524e 100644 --- a/lib/tests/task/h5p_get_content_types_task_test.php +++ b/lib/tests/task/h5p_get_content_types_task_test.php @@ -28,7 +28,7 @@ use core_h5p\h5p_test_factory; * * @runTestsInSeparateProcesses */ -class h5p_get_content_types_task_test extends \advanced_testcase { +final class h5p_get_content_types_task_test extends \advanced_testcase { protected function setup(): void { global $CFG; diff --git a/lib/tests/task/hide_ended_courses_task_test.php b/lib/tests/task/hide_ended_courses_task_test.php index 2a85b0ce6d0..280df84fcca 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 b7ff8113a5c..bec1c9d9038 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 bb6bd4a082a..2d2a94087ea 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 a7afe0bf496..ae81fc61330 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 f47831cd293..95b83d14fd5 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 3d13c425b7f..682936748ae 100644 --- a/lib/tests/text_test.php +++ b/lib/tests/text_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @coversDefaultClass \core_text * */ -class text_test extends advanced_testcase { +final class text_test extends advanced_testcase { /** * Tests the static parse charset method. diff --git a/lib/tests/theme_config_test.php b/lib/tests/theme_config_test.php index a7e7173c149..a1342a85eb1 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 0e9cd7b03ae..eb976628456 100644 --- a/lib/tests/update_api_test.php +++ b/lib/tests/update_api_test.php @@ -34,7 +34,7 @@ require_once(__DIR__.'/fixtures/testable_update_api.php'); * @copyright 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_api_test extends \advanced_testcase { +final class update_api_test extends \advanced_testcase { /** * Make sure the $CFG->branch is mapped correctly to the format used by the API. diff --git a/lib/tests/update_checker_test.php b/lib/tests/update_checker_test.php index cb3676035f2..f710fbf2e27 100644 --- a/lib/tests/update_checker_test.php +++ b/lib/tests/update_checker_test.php @@ -32,7 +32,7 @@ require_once(__DIR__.'/fixtures/testable_update_checker.php'); * @copyright 2012, 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_checker_test extends \advanced_testcase { +final class update_checker_test extends \advanced_testcase { public function test_core_available_update() { $provider = testable_checker::instance(); diff --git a/lib/tests/update_code_manager_test.php b/lib/tests/update_code_manager_test.php index 3b3a071815f..7d02431643e 100644 --- a/lib/tests/update_code_manager_test.php +++ b/lib/tests/update_code_manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__.'/fixtures/testable_update_code_manager.php'); * @copyright 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_code_manager_test extends \advanced_testcase { +final class update_code_manager_test extends \advanced_testcase { public function test_get_remote_plugin_zip() { $codeman = new \core\update\testable_code_manager(); diff --git a/lib/tests/update_validator_test.php b/lib/tests/update_validator_test.php index a8794282cc7..4f6befe8b46 100644 --- a/lib/tests/update_validator_test.php +++ b/lib/tests/update_validator_test.php @@ -30,7 +30,7 @@ require_once(__DIR__.'/fixtures/testable_update_validator.php'); * @copyright 2013, 2015 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class update_validator_test extends \advanced_testcase { +final class update_validator_test extends \advanced_testcase { public function test_validate_files_layout() { $fixtures = __DIR__.'/fixtures/update_validator'; diff --git a/lib/tests/upgrade_util_test.php b/lib/tests/upgrade_util_test.php index 71fc45318d2..18d5db77e9e 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 7e2adf3afc5..f52360ab3a7 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 3cea8b75b70..f02063a0149 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 ce9baa282db..f0b851ab966 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 4ae14b1ba55..e38f4a85dc3 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 fa51d3d8f64..8c72715ea3f 100644 --- a/lib/tests/weblib_format_text_test.php +++ b/lib/tests/weblib_format_text_test.php @@ -27,7 +27,7 @@ namespace core; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @covers ::format_text */ -class weblib_format_text_test extends \advanced_testcase { +final class weblib_format_text_test extends \advanced_testcase { public function test_format_text_format_html() { $this->resetAfterTest(); diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php index 3761022c17c..01f4f92f313 100644 --- a/lib/tests/weblib_test.php +++ b/lib/tests/weblib_test.php @@ -23,7 +23,7 @@ * @author T.J.Hunt@open.ac.uk * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class weblib_test extends advanced_testcase { +final class weblib_test extends advanced_testcase { /** * @covers ::format_string */ diff --git a/lib/tests/xhprof_test.php b/lib/tests/xhprof_test.php index 60ccbf910db..fda642bc463 100644 --- a/lib/tests/xhprof_test.php +++ b/lib/tests/xhprof_test.php @@ -24,7 +24,7 @@ namespace core; * @copyright 2019 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xhprof_test extends \advanced_testcase { +final class xhprof_test extends \advanced_testcase { public static function setUpBeforeClass(): void { global $CFG; diff --git a/lib/tests/xmlize_test.php b/lib/tests/xmlize_test.php index cfdfb33be72..8842c426579 100644 --- a/lib/tests/xmlize_test.php +++ b/lib/tests/xmlize_test.php @@ -29,7 +29,7 @@ require_once($CFG->libdir . '/xmlize.php'); * @copyright 2017 Kilian Singer {@link http://quantumtechnology.info} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xmlize_test extends \basic_testcase { +final class xmlize_test extends \basic_testcase { /** * Test an XML import using a valid XML file. * diff --git a/lib/userkey/tests/privacy/provider_test.php b/lib/userkey/tests/privacy/provider_test.php index bbca41ea486..3e950b0d74b 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 aac1a7655eb..1663f0c3ec3 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 c5d84c74521..d36dcc1555f 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 0e85b92f496..7687d1d160c 100644 --- a/lib/xapi/tests/iri_test.php +++ b/lib/xapi/tests/iri_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class iri_test extends advanced_testcase { +final class iri_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/lib/xapi/tests/local/statement/item_activity_test.php b/lib/xapi/tests/local/statement/item_activity_test.php index 60a8a815cc3..89428b2a095 100644 --- a/lib/xapi/tests/local/statement/item_activity_test.php +++ b/lib/xapi/tests/local/statement/item_activity_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_activity_test extends advanced_testcase { +final class item_activity_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_actor_test.php b/lib/xapi/tests/local/statement/item_actor_test.php index eae47d5ec04..0f4d01e21a9 100644 --- a/lib/xapi/tests/local/statement/item_actor_test.php +++ b/lib/xapi/tests/local/statement/item_actor_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_actor_test extends advanced_testcase { +final class item_actor_test extends advanced_testcase { /** * Test item creation with agent. diff --git a/lib/xapi/tests/local/statement/item_agent_test.php b/lib/xapi/tests/local/statement/item_agent_test.php index 7e17eeeab4e..c986baa3591 100644 --- a/lib/xapi/tests/local/statement/item_agent_test.php +++ b/lib/xapi/tests/local/statement/item_agent_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_agent_test extends advanced_testcase { +final class item_agent_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_attachment_test.php b/lib/xapi/tests/local/statement/item_attachment_test.php index 11ea40d19f0..abab9e7707b 100644 --- a/lib/xapi/tests/local/statement/item_attachment_test.php +++ b/lib/xapi/tests/local/statement/item_attachment_test.php @@ -36,7 +36,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_attachment_test extends advanced_testcase { +final class item_attachment_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_context_test.php b/lib/xapi/tests/local/statement/item_context_test.php index d48a1da78e9..9fa3a04acd1 100644 --- a/lib/xapi/tests/local/statement/item_context_test.php +++ b/lib/xapi/tests/local/statement/item_context_test.php @@ -35,7 +35,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_context_test extends advanced_testcase { +final class item_context_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_definition_test.php b/lib/xapi/tests/local/statement/item_definition_test.php index cbc2a52b9b2..fddd1966cb4 100644 --- a/lib/xapi/tests/local/statement/item_definition_test.php +++ b/lib/xapi/tests/local/statement/item_definition_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_definition_test extends advanced_testcase { +final class item_definition_test extends advanced_testcase { /** * Test item_definition creation. diff --git a/lib/xapi/tests/local/statement/item_group_test.php b/lib/xapi/tests/local/statement/item_group_test.php index b7bef6d34a5..5de06028ef4 100644 --- a/lib/xapi/tests/local/statement/item_group_test.php +++ b/lib/xapi/tests/local/statement/item_group_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_group_test extends advanced_testcase { +final class item_group_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_object_test.php b/lib/xapi/tests/local/statement/item_object_test.php index a9de796cfe2..bbea08f2ae7 100644 --- a/lib/xapi/tests/local/statement/item_object_test.php +++ b/lib/xapi/tests/local/statement/item_object_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_object_test extends advanced_testcase { +final class item_object_test extends advanced_testcase { /** * Test item creation with agent. diff --git a/lib/xapi/tests/local/statement/item_result_test.php b/lib/xapi/tests/local/statement/item_result_test.php index 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 cf6e8f0d470..a33d8260dbe 100644 --- a/lib/xapi/tests/local/statement/item_score_test.php +++ b/lib/xapi/tests/local/statement/item_score_test.php @@ -35,7 +35,7 @@ use core_xapi\xapi_exception; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_score_test extends advanced_testcase { +final class item_score_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_test.php b/lib/xapi/tests/local/statement/item_test.php index b3bec363969..754b5b1b1ef 100644 --- a/lib/xapi/tests/local/statement/item_test.php +++ b/lib/xapi/tests/local/statement/item_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_test extends advanced_testcase { +final class item_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement/item_verb_test.php b/lib/xapi/tests/local/statement/item_verb_test.php index 07892e95edb..0704b1777f1 100644 --- a/lib/xapi/tests/local/statement/item_verb_test.php +++ b/lib/xapi/tests/local/statement/item_verb_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class item_verb_test extends advanced_testcase { +final class item_verb_test extends advanced_testcase { /** * Test item creation. diff --git a/lib/xapi/tests/local/statement_test.php b/lib/xapi/tests/local/statement_test.php index c8c1d110b93..3efdef30c00 100644 --- a/lib/xapi/tests/local/statement_test.php +++ b/lib/xapi/tests/local/statement_test.php @@ -49,7 +49,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statement_test extends advanced_testcase { +final class statement_test extends advanced_testcase { /** * Returns a valid item for a specific attribute. diff --git a/lib/xapi/tests/privacy/provider_test.php b/lib/xapi/tests/privacy/provider_test.php index c83d698e95f..bdac1378650 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 041bd4dde38..7c67611c6ca 100644 --- a/login/tests/login_lib_test.php +++ b/login/tests/login_lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/login/lib.php'); * @copyright 2017 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class login_lib_test extends \advanced_testcase { +final class login_lib_test extends \advanced_testcase { public function test_core_login_process_password_reset_one_time_without_username_protection() { global $CFG; diff --git a/media/player/html5audio/tests/player_test.php b/media/player/html5audio/tests/player_test.php index b5285cb23a9..29d2c338e70 100644 --- a/media/player/html5audio/tests/player_test.php +++ b/media/player/html5audio/tests/player_test.php @@ -26,7 +26,7 @@ use media_html5audio_plugin; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/html5video/tests/player_test.php b/media/player/html5video/tests/player_test.php index 302f194a5f5..0e3e9aa6064 100644 --- a/media/player/html5video/tests/player_test.php +++ b/media/player/html5video/tests/player_test.php @@ -26,7 +26,7 @@ use media_html5video_plugin; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/videojs/tests/player_test.php b/media/player/videojs/tests/player_test.php index 079f2cfe71f..f1ea272c7b0 100644 --- a/media/player/videojs/tests/player_test.php +++ b/media/player/videojs/tests/player_test.php @@ -36,7 +36,7 @@ use moodle_url; * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class player_test extends \advanced_testcase { +final class player_test extends \advanced_testcase { /** * Pre-test setup. Preserves $CFG. diff --git a/media/player/vimeo/tests/player_test.php b/media/player/vimeo/tests/player_test.php index 5c8e5909ec1..e15476218a5 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 9dd77b1d41a..2eb78a6df9f 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 406cacb6260..3804793daeb 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 95d578aa30a..fd06f35a35e 100644 --- a/message/output/airnotifier/tests/manager_test.php +++ b/message/output/airnotifier/tests/manager_test.php @@ -26,7 +26,7 @@ use message_airnotifier_manager; * @copyright 2020 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** Test check_configuration by default **/ public function test_check_configuration_default() { diff --git a/message/output/airnotifier/tests/privacy/provider_test.php b/message/output/airnotifier/tests/privacy/provider_test.php index 87b638e71d8..1a4ca4ba45d 100644 --- a/message/output/airnotifier/tests/privacy/provider_test.php +++ b/message/output/airnotifier/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/message/output/email/tests/event_observers_test.php b/message/output/email/tests/event_observers_test.php index 13f612ee934..d1f07d0a56b 100644 --- a/message/output/email/tests/event_observers_test.php +++ b/message/output/email/tests/event_observers_test.php @@ -24,7 +24,7 @@ namespace message_email; * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class event_observers_test extends \advanced_testcase { +final class event_observers_test extends \advanced_testcase { /** * Test the message viewed event observer. diff --git a/message/output/email/tests/privacy/provider_test.php b/message/output/email/tests/privacy/provider_test.php index e7c0e6c9f88..0abc709c634 100644 --- a/message/output/email/tests/privacy/provider_test.php +++ b/message/output/email/tests/privacy/provider_test.php @@ -29,7 +29,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. */ diff --git a/message/output/email/tests/task/send_email_test.php b/message/output/email/tests/task/send_email_test.php index b8a19775156..8fad5bdc8ed 100644 --- a/message/output/email/tests/task/send_email_test.php +++ b/message/output/email/tests/task/send_email_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class send_email_test extends \advanced_testcase { +final class send_email_test extends \advanced_testcase { /** * Test sending email task. diff --git a/message/output/popup/tests/api_test.php b/message/output/popup/tests/api_test.php index b94f1dd43d1..b30da6ce23a 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 1b27e023057..fd529c3b33f 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 53c9742cafc..1085afcc700 100644 --- a/message/output/popup/tests/messaging_cleanup_test.php +++ b/message/output/popup/tests/messaging_cleanup_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/message/output/popup/tests/base.php'); * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class messaging_cleanup_test extends \advanced_testcase { +final class messaging_cleanup_test extends \advanced_testcase { // Helper trait for sending fake popup notifications. use message_popup_test_helper; diff --git a/message/tests/external/get_unread_notification_count_test.php b/message/tests/external/get_unread_notification_count_test.php index 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 6971db4b79d..f71694591bc 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 af66d381c34..1d13568ee5c 100644 --- a/message/tests/helper_test.php +++ b/message/tests/helper_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_message\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(true); diff --git a/message/tests/inbound_test.php b/message/tests/inbound_test.php index 1fe6ed972e3..dc6a191f635 100644 --- a/message/tests/inbound_test.php +++ b/message/tests/inbound_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/fixtures/inbound_fixtures.php'); * @copyright 2014 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class inbound_test extends \advanced_testcase { +final class inbound_test extends \advanced_testcase { /** * Perform setup tasks generic to each test. diff --git a/message/tests/privacy/provider_test.php b/message/tests/privacy/provider_test.php index 9df8c83204f..60af1e0ca82 100644 --- a/message/tests/privacy/provider_test.php +++ b/message/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_metadata(). diff --git a/message/tests/search_received_test.php b/message/tests/search_received_test.php index c2fbaf7f92c..ab58fb11633 100644 --- a/message/tests/search_received_test.php +++ b/message/tests/search_received_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_received_test extends \advanced_testcase { +final class search_received_test extends \advanced_testcase { /** * @var string Area id diff --git a/message/tests/search_sent_test.php b/message/tests/search_sent_test.php index d81500499f2..9ac50b8d1ee 100644 --- a/message/tests/search_sent_test.php +++ b/message/tests/search_sent_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_sent_test extends \advanced_testcase { +final class search_sent_test extends \advanced_testcase { /** * @var string Area id diff --git a/message/tests/task/migrate_message_data_test.php b/message/tests/task/migrate_message_data_test.php index 15b19de8fc4..814f34a8578 100644 --- a/message/tests/task/migrate_message_data_test.php +++ b/message/tests/task/migrate_message_data_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/message/tests/messagelib_test.php'); * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class migrate_message_data_test extends \advanced_testcase { +final class migrate_message_data_test extends \advanced_testcase { /** * Test set up. diff --git a/mnet/service/enrol/tests/privacy/provider_test.php b/mnet/service/enrol/tests/privacy/provider_test.php index 55b9239eacb..a265b27de5c 100644 --- a/mnet/service/enrol/tests/privacy/provider_test.php +++ b/mnet/service/enrol/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass the mnet host we are using to test. */ protected $mnethost; diff --git a/mnet/tests/event/events_test.php b/mnet/tests/event/events_test.php index 3347df22a4b..3471d69426e 100644 --- a/mnet/tests/event/events_test.php +++ b/mnet/tests/event/events_test.php @@ -31,7 +31,7 @@ global $CFG; require_once($CFG->dirroot . '/mnet/lib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass the mnet host we are using to test */ protected $mnethost; diff --git a/mod/assign/feedback/comments/tests/feedback_test.php b/mod/assign/feedback/comments/tests/feedback_test.php index fc67a5dece1..91f008139dd 100644 --- a/mod/assign/feedback/comments/tests/feedback_test.php +++ b/mod/assign/feedback/comments/tests/feedback_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/comments/tests/privacy/provider_test.php b/mod/assign/feedback/comments/tests/privacy/provider_test.php index 3403aa459ea..fb366dce4cc 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 b4a674e1977..df512e850ae 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 0c29df160e2..a023359c084 100644 --- a/mod/assign/feedback/editpdf/tests/privacy/provider_test.php +++ b/mod/assign/feedback/editpdf/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use mod_assign\privacy\assign_plugin_request_data; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { public function setUp(): void { // Skip this test if ghostscript is not supported. diff --git a/mod/assign/feedback/file/tests/feedback_test.php b/mod/assign/feedback/file/tests/feedback_test.php index 02881e2d694..f5aee3d85f3 100644 --- a/mod/assign/feedback/file/tests/feedback_test.php +++ b/mod/assign/feedback/file/tests/feedback_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/file/tests/importziplib_test.php b/mod/assign/feedback/file/tests/importziplib_test.php index 1c19d71d350..cf377d894f9 100644 --- a/mod/assign/feedback/file/tests/importziplib_test.php +++ b/mod/assign/feedback/file/tests/importziplib_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/feedback/file/importziplib.php'); * @copyright 2020 Eric Merrill * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class importziplib_test extends \advanced_testcase { +final class importziplib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/feedback/file/tests/privacy/provider_test.php b/mod/assign/feedback/file/tests/privacy/provider_test.php index 5eb848cd689..63ab998d93f 100644 --- a/mod/assign/feedback/file/tests/privacy/provider_test.php +++ b/mod/assign/feedback/file/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use mod_assign\privacy\assign_plugin_request_data; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/comments/tests/event/events_test.php b/mod/assign/submission/comments/tests/event/events_test.php index da99dd3cb3a..312973ad529 100644 --- a/mod/assign/submission/comments/tests/event/events_test.php +++ b/mod/assign/submission/comments/tests/event/events_test.php @@ -42,7 +42,7 @@ require_once($CFG->dirroot . '/comment/lib.php'); * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/comments/tests/privacy/provider_test.php b/mod/assign/submission/comments/tests/privacy/provider_test.php index 3963c50b458..54f6aa75e7b 100644 --- a/mod/assign/submission/comments/tests/privacy/provider_test.php +++ b/mod/assign/submission/comments/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use mod_assign\privacy\useridlist; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/file/tests/event/events_test.php b/mod/assign/submission/file/tests/event/events_test.php index 68deb4a36e4..b60083fff32 100644 --- a/mod/assign/submission/file/tests/event/events_test.php +++ b/mod/assign/submission/file/tests/event/events_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/file/tests/privacy/provider_test.php b/mod/assign/submission/file/tests/privacy/provider_test.php index 8b127bb95a2..ee2b1713286 100644 --- a/mod/assign/submission/file/tests/privacy/provider_test.php +++ b/mod/assign/submission/file/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/submission/onlinetext/tests/event/events_test.php b/mod/assign/submission/onlinetext/tests/event/events_test.php index 7f9be48e58a..db28fe736a2 100644 --- a/mod/assign/submission/onlinetext/tests/event/events_test.php +++ b/mod/assign/submission/onlinetext/tests/event/events_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/onlinetext/tests/locallib_test.php b/mod/assign/submission/onlinetext/tests/locallib_test.php index 32c91b29394..ef00cb4d0cd 100644 --- a/mod/assign/submission/onlinetext/tests/locallib_test.php +++ b/mod/assign/submission/onlinetext/tests/locallib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2016 Cameron Ball * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/submission/onlinetext/tests/privacy/provider_test.php b/mod/assign/submission/onlinetext/tests/privacy/provider_test.php index 3535e23451d..41055fc0b64 100644 --- a/mod/assign/submission/onlinetext/tests/privacy/provider_test.php +++ b/mod/assign/submission/onlinetext/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/privacy/provider_test.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \mod_assign\privacy\provider_test { +final class provider_test extends \mod_assign\privacy\provider_test { /** * Convenience function for creating feedback data. diff --git a/mod/assign/tests/backup/restore_date_test.php b/mod/assign/tests/backup/restore_date_test.php index 8bef5625a7a..22b20e917c4 100644 --- a/mod/assign/tests/backup/restore_date_test.php +++ b/mod/assign/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/fixtures/testable_assign.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/assign/tests/base_test.php b/mod/assign/tests/base_test.php index 71a2a8550de..485d64d782e 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 81362931719..f6ac006e9da 100644 --- a/mod/assign/tests/custom_completion_test.php +++ b/mod/assign/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { // Use the generator helper. use \mod_assign_test_generator; diff --git a/mod/assign/tests/dates_test.php b/mod/assign/tests/dates_test.php index 31b840c62b1..ba3f39db6ac 100644 --- a/mod/assign/tests/dates_test.php +++ b/mod/assign/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/assign/tests/downloader_test.php b/mod/assign/tests/downloader_test.php index 3b12671e309..b828f6f3fda 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 58b7b2268cb..30530e7802a 100644 --- a/mod/assign/tests/event/events_test.php +++ b/mod/assign/tests/event/events_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/mod/assign/locallib.php'); * @copyright 2014 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/external/start_submission_test.php b/mod/assign/tests/external/start_submission_test.php index 03b1fb355fd..dc04be4c061 100644 --- a/mod/assign/tests/external/start_submission_test.php +++ b/mod/assign/tests/external/start_submission_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/externallib_advanced_testcase.ph * @copyright 2021 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class start_submission_test extends \mod_assign\externallib_advanced_testcase { +final class start_submission_test extends \mod_assign\externallib_advanced_testcase { /** @var \stdClass $course New course created to hold the assignments */ protected $course = null; diff --git a/mod/assign/tests/externallib_test.php b/mod/assign/tests/externallib_test.php index a4d8570f680..933e91b53f3 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 1196fbcfda7..ea5518eef22 100644 --- a/mod/assign/tests/feedback_test.php +++ b/mod/assign/tests/feedback_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 2019 Ilya Tregubov ilyatregubov@catalyst-au.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_test extends \advanced_testcase { +final class feedback_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/lib_test.php b/mod/assign/tests/lib_test.php index d04c2702cb5..1de344ccbd7 100644 --- a/mod/assign/tests/lib_test.php +++ b/mod/assign/tests/lib_test.php @@ -41,7 +41,7 @@ use mod_assign_test_generator; * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; diff --git a/mod/assign/tests/locallib_participants_test.php b/mod/assign/tests/locallib_participants_test.php index 7656238ac7f..eb7bb7fd190 100644 --- a/mod/assign/tests/locallib_participants_test.php +++ b/mod/assign/tests/locallib_participants_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/mod/assign/tests/generator.php'); * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_participants_test extends \advanced_testcase { +final class locallib_participants_test extends \advanced_testcase { use mod_assign_test_generator; public function test_list_participants_blind_marking() { diff --git a/mod/assign/tests/markerallocation_test.php b/mod/assign/tests/markerallocation_test.php index 8f044ff3ad7..555e7309f5d 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 2d3bc9cd099..1f4149d6b92 100644 --- a/mod/assign/tests/portfolio_caller_test.php +++ b/mod/assign/tests/portfolio_caller_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/group/lib.php'); * @copyright Brendan Cox * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** * Test an assignment file is loaded for a user who submitted it. diff --git a/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php b/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php index 3189ba7b1c6..b363647bf6b 100644 --- a/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php +++ b/mod/assign/tests/privacy/feedback_legacy_polyfill_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/feedback/comments/locallib.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class feedback_legacy_polyfill_test extends \advanced_testcase { +final class feedback_legacy_polyfill_test extends \advanced_testcase { /** * Convenience function to create an instance of an assignment. diff --git a/mod/assign/tests/privacy/provider_test.php b/mod/assign/tests/privacy/provider_test.php index d773bdfff12..e69c2bd6d07 100644 --- a/mod/assign/tests/privacy/provider_test.php +++ b/mod/assign/tests/privacy/provider_test.php @@ -24,15 +24,10 @@ namespace mod_assign\privacy; -defined('MOODLE_INTERNAL') || die(); - -global $CFG; -require_once($CFG->dirroot . '/mod/assign/locallib.php'); - -use core_privacy\tests\provider_testcase; use core_privacy\local\request\writer; use core_privacy\local\request\approved_contextlist; use mod_assign\privacy\provider; +use mod_assign\tests\provider_testcase; /** * Unit tests for mod/assign/classes/privacy/ @@ -41,41 +36,6 @@ use mod_assign\privacy\provider; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider_test extends provider_testcase { - - /** - * Convenience method for creating a submission. - * - * @param assign $assign The assign object - * @param stdClass $user The user object - * @param string $submissiontext Submission text - * @param integer $attemptnumber The attempt number - * @return object A submission object. - */ - protected function create_submission($assign, $user, $submissiontext, $attemptnumber = 0) { - $submission = $assign->get_user_submission($user->id, true, $attemptnumber); - $submission->onlinetext_editor = ['text' => $submissiontext, - 'format' => FORMAT_MOODLE]; - - $this->setUser($user); - $notices = []; - $assign->save_submission($submission, $notices); - return $submission; - } - - /** - * Convenience function to create an instance of an assignment. - * - * @param array $params Array of parameters to pass to the generator - * @return assign The assign class. - */ - protected function create_instance($params = array()) { - $generator = $this->getDataGenerator()->get_plugin_generator('mod_assign'); - $instance = $generator->create_instance($params); - $cm = get_coursemodule_from_instance('assign', $instance->id); - $context = \context_module::instance($cm->id); - return new \assign($context, $cm, $params['course']); - } - /** * Test that getting the contexts for a user works. */ diff --git a/mod/assign/tests/privacy/submission_legacy_polyfill_test.php b/mod/assign/tests/privacy/submission_legacy_polyfill_test.php index 5a91de789b1..cacddd78cfe 100644 --- a/mod/assign/tests/privacy/submission_legacy_polyfill_test.php +++ b/mod/assign/tests/privacy/submission_legacy_polyfill_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/submission/comments/locallib.php'); * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class submission_legacy_polyfill_test extends \advanced_testcase { +final class submission_legacy_polyfill_test extends \advanced_testcase { /** * Convenience function to create an instance of an assignment. diff --git a/mod/assign/tests/search/search_test.php b/mod/assign/tests/search/search_test.php index d5e3cc8fb70..3950398ee54 100644 --- a/mod/assign/tests/search/search_test.php +++ b/mod/assign/tests/search/search_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/assign/locallib.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test for assign file attachments. diff --git a/mod/bigbluebuttonbn/tests/backup_restore_test.php b/mod/bigbluebuttonbn/tests/backup_restore_test.php index 84bbf28ce28..9fcf4ae5c68 100644 --- a/mod/bigbluebuttonbn/tests/backup_restore_test.php +++ b/mod/bigbluebuttonbn/tests/backup_restore_test.php @@ -43,7 +43,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @covers \backup_bigbluebuttonbn_activity_task * @covers \restore_bigbluebuttonbn_activity_task */ -class backup_restore_test extends restore_date_testcase { +final class backup_restore_test extends restore_date_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/completion/completion_test.php b/mod/bigbluebuttonbn/tests/completion/completion_test.php index c39061400ef..3ec6a46bdfb 100644 --- a/mod/bigbluebuttonbn/tests/completion/completion_test.php +++ b/mod/bigbluebuttonbn/tests/completion/completion_test.php @@ -33,7 +33,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @author Laurent David (laurent@call-learning.fr) * @covers \mod_bigbluebuttonbn\completion\custom_completion */ -class completion_test extends \advanced_testcase { +final class completion_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/external/can_join_test.php b/mod/bigbluebuttonbn/tests/external/can_join_test.php index 8fe1d7080ee..cd0d5f23ca4 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 df6524095a0..cce7f500a78 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 d3fd82e4822..762ae9a0b54 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 cd0db474008..f7393bcbde6 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 016887d5a30..886fa47a714 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 f5a208e7f60..07a7a2a1d02 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 31e0ca4574b..83740a34f12 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 163d95a0e58..3cb55cf8306 100644 --- a/mod/bigbluebuttonbn/tests/instance_test.php +++ b/mod/bigbluebuttonbn/tests/instance_test.php @@ -34,7 +34,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_bigbluebuttonbn\instance */ -class instance_test extends advanced_testcase { +final class instance_test extends advanced_testcase { /** * Test get from diff --git a/mod/bigbluebuttonbn/tests/lib_test.php b/mod/bigbluebuttonbn/tests/lib_test.php index b54be9fee76..15c71c0a8f2 100644 --- a/mod/bigbluebuttonbn/tests/lib_test.php +++ b/mod/bigbluebuttonbn/tests/lib_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/bigbluebuttonbn/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Laurent David (laurent@call-learning.fr) */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php b/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php index 64a990f0cd9..22a7ed18a45 100644 --- a/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php +++ b/mod/bigbluebuttonbn/tests/local/bigbluebutton/recordings/recording_data_test.php @@ -25,7 +25,7 @@ namespace mod_bigbluebuttonbn\local\bigbluebutton\recordings; * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) * @coversDefaultClass \mod_bigbluebuttonbn\local\bigbluebutton\recordings\recording_data */ -class recording_data_test extends \advanced_testcase { +final class recording_data_test extends \advanced_testcase { /** * Test for the type_text provider. diff --git a/mod/bigbluebuttonbn/tests/local/extension_test.php b/mod/bigbluebuttonbn/tests/local/extension_test.php index 5adcfd74769..1c23fd1de86 100644 --- a/mod/bigbluebuttonbn/tests/local/extension_test.php +++ b/mod/bigbluebuttonbn/tests/local/extension_test.php @@ -35,7 +35,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 7b543bdbd23..2c826d0c169 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/files_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/files_test.php @@ -43,7 +43,7 @@ use stored_file; * @covers \mod_bigbluebuttonbn\local\helpers\files * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\files */ -class files_test extends \advanced_testcase { +final class files_test extends \advanced_testcase { use testcase_helper_trait; /** @var string Filename used for the presentation */ diff --git a/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php b/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php index 6656a0897b0..bac3864d9ce 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/mod_helper_trait_test.php @@ -38,7 +38,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\mod_helper * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\mod_helper */ -class mod_helper_trait_test extends \advanced_testcase { +final class mod_helper_trait_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php b/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php index 56badc085fc..09fefe76d10 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/reset_test.php @@ -38,7 +38,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\reset * @covers \mod_bigbluebuttonbn\local\helpers\reset */ -class reset_test extends \advanced_testcase { +final class reset_test extends \advanced_testcase { use testcase_helper_trait; /** * Reset course item test diff --git a/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php b/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php index cd447e6eb70..5acdccbad99 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/roles_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\roles * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\roles */ -class roles_test extends \advanced_testcase { +final class roles_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php b/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php index 1334a2d9863..68d950ffb27 100644 --- a/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php +++ b/mod/bigbluebuttonbn/tests/local/helpers/user_info_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\helpers\user_info * @coversDefaultClass \mod_bigbluebuttonbn\local\helpers\user_info */ -class user_info_test extends \advanced_testcase { +final class user_info_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php b/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php index 789f80c457d..0d0b1fb3afc 100644 --- a/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php +++ b/mod/bigbluebuttonbn/tests/local/proxy/bigbluebutton_proxy_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy * @coversDefaultClass \mod_bigbluebuttonbn\local\proxy\bigbluebutton_proxy */ -class bigbluebutton_proxy_test extends \advanced_testcase { +final class bigbluebutton_proxy_test extends \advanced_testcase { /** * Test poll interval value * diff --git a/mod/bigbluebuttonbn/tests/local/proxy/proxy_base_test.php b/mod/bigbluebuttonbn/tests/local/proxy/proxy_base_test.php index 7aba2c0be49..017ce4e384f 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 e50dd4a1c0e..834fecf3def 100644 --- a/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php +++ b/mod/bigbluebuttonbn/tests/local/proxy/recording_proxy_test.php @@ -29,7 +29,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\local\proxy\recording_proxy * @coversDefaultClass \mod_bigbluebuttonbn\local\proxy\recording_proxy */ -class recording_proxy_test extends \advanced_testcase { +final class recording_proxy_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/logger_test.php b/mod/bigbluebuttonbn/tests/logger_test.php index 51c8c63335e..595afab0b84 100644 --- a/mod/bigbluebuttonbn/tests/logger_test.php +++ b/mod/bigbluebuttonbn/tests/logger_test.php @@ -36,7 +36,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\logger * @coversDefaultClass \mod_bigbluebuttonbn\logger */ -class logger_test extends \advanced_testcase { +final class logger_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/meeting_test.php b/mod/bigbluebuttonbn/tests/meeting_test.php index f6fa0283767..cc567c191a5 100644 --- a/mod/bigbluebuttonbn/tests/meeting_test.php +++ b/mod/bigbluebuttonbn/tests/meeting_test.php @@ -37,7 +37,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\meeting * @coversDefaultClass \mod_bigbluebuttonbn\meeting */ -class meeting_test extends \advanced_testcase { +final class meeting_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php b/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php index 1b0f62fa27a..cd3727699f3 100644 --- a/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php +++ b/mod/bigbluebuttonbn/tests/output/recording_row_playback_test.php @@ -28,7 +28,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Laurent David (laurent.david [at] call-learning [dt] fr) */ -class recording_row_playback_test extends \advanced_testcase { +final class recording_row_playback_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/plugin_test.php b/mod/bigbluebuttonbn/tests/plugin_test.php index 6e3fefbba60..22882fe964e 100644 --- a/mod/bigbluebuttonbn/tests/plugin_test.php +++ b/mod/bigbluebuttonbn/tests/plugin_test.php @@ -26,7 +26,7 @@ use moodle_exception; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_bigbluebuttonbn\plugin */ -class plugin_test extends advanced_testcase { +final class plugin_test extends advanced_testcase { /** * Test html2text diff --git a/mod/bigbluebuttonbn/tests/privacy/provider_test.php b/mod/bigbluebuttonbn/tests/privacy/provider_test.php index ead70ad2930..7bdccd7830c 100644 --- a/mod/bigbluebuttonbn/tests/privacy/provider_test.php +++ b/mod/bigbluebuttonbn/tests/privacy/provider_test.php @@ -39,7 +39,7 @@ use core_privacy\local\request\userlist; * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) * @covers \mod_bigbluebuttonbn\privacy\provider */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::get_metadata(). diff --git a/mod/bigbluebuttonbn/tests/recording_test.php b/mod/bigbluebuttonbn/tests/recording_test.php index 8479a25cc1f..9f5657b6e9b 100644 --- a/mod/bigbluebuttonbn/tests/recording_test.php +++ b/mod/bigbluebuttonbn/tests/recording_test.php @@ -37,7 +37,7 @@ use mod_bigbluebuttonbn\test\testcase_helper_trait; * @covers \mod_bigbluebuttonbn\recording * @coversDefaultClass \mod_bigbluebuttonbn\recording */ -class recording_test extends \advanced_testcase { +final class recording_test extends \advanced_testcase { use testcase_helper_trait; /** diff --git a/mod/bigbluebuttonbn/tests/search_test.php b/mod/bigbluebuttonbn/tests/search_test.php index 3e3dfaa0ebe..3b9917e2a57 100644 --- a/mod/bigbluebuttonbn/tests/search_test.php +++ b/mod/bigbluebuttonbn/tests/search_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @covers \mod_bigbluebuttonbn\search\tags * @covers \mod_bigbluebuttonbn\search\activity */ -class search_test extends advanced_testcase { +final class search_test extends advanced_testcase { use testcase_helper_trait; /** * @var string Area id diff --git a/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php b/mod/bigbluebuttonbn/tests/task/base_send_notification_test.php index 5ef3850081a..fab5979cdbf 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_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 b51861b9373..9de8bbdd927 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 106f1ec169d..b00ed14c06d 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 0debdff5cd8..324b689ea0f 100644 --- a/mod/book/tests/generator_test.php +++ b/mod/book/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_book; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/book/tests/helper_test.php b/mod/book/tests/helper_test.php index ac392dfef84..eb6b01fa591 100644 --- a/mod/book/tests/helper_test.php +++ b/mod/book/tests/helper_test.php @@ -21,7 +21,7 @@ namespace mod_book; * @copyright 2023 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test view_book diff --git a/mod/book/tests/lib_test.php b/mod/book/tests/lib_test.php index 2493ce156e1..ab8130928c8 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 80dc5884999..27709e29449 100644 --- a/mod/book/tests/search/search_test.php +++ b/mod/book/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/book/tool/exportimscp/tests/event/events_test.php b/mod/book/tool/exportimscp/tests/event/events_test.php index 6aabcb433ff..781181f49e9 100644 --- a/mod/book/tool/exportimscp/tests/event/events_test.php +++ b/mod/book/tool/exportimscp/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace booktool_exportimscp\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tool/importhtml/tests/locallib_test.php b/mod/book/tool/importhtml/tests/locallib_test.php index c5b73ef7747..9e3ae1e75cd 100644 --- a/mod/book/tool/importhtml/tests/locallib_test.php +++ b/mod/book/tool/importhtml/tests/locallib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot.'/mod/book/tool/importhtml/locallib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/book/tool/print/tests/event/events_test.php b/mod/book/tool/print/tests/event/events_test.php index 254073c5276..3b1e0f5adf7 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 07b732d876e..152a72f57b2 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() { global $DB; diff --git a/mod/chat/tests/event/events_test.php b/mod/chat/tests/event/events_test.php index a577d8e2d8b..93f9634ca83 100644 --- a/mod/chat/tests/event/events_test.php +++ b/mod/chat/tests/event/events_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function test_message_sent() { global $DB; diff --git a/mod/chat/tests/external/view_sessions_test.php b/mod/chat/tests/external/view_sessions_test.php index ad66d96ec63..ae91db635e9 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 723bd42228a..a98927229dd 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 { /** * Test login user diff --git a/mod/chat/tests/format_message_test.php b/mod/chat/tests/format_message_test.php index 3a27b0ec689..ab2268524ab 100644 --- a/mod/chat/tests/format_message_test.php +++ b/mod/chat/tests/format_message_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @copyright 2016 Andrew NIcols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class format_message_test extends \advanced_testcase { +final class format_message_test extends \advanced_testcase { const USER_CURRENT = 1; const USER_OTHER = 2; diff --git a/mod/chat/tests/generator_test.php b/mod/chat/tests/generator_test.php index 6a4a7f37eaf..b43898ed9eb 100644 --- a/mod/chat/tests/generator_test.php +++ b/mod/chat/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_chat; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/chat/tests/lib_test.php b/mod/chat/tests/lib_test.php index 006ff81be04..145ab31cff8 100644 --- a/mod/chat/tests/lib_test.php +++ b/mod/chat/tests/lib_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/chat/tests/privacy/provider_test.php b/mod/chat/tests/privacy/provider_test.php index 6fe54806be1..d672b86a12d 100644 --- a/mod/chat/tests/privacy/provider_test.php +++ b/mod/chat/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/chat/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/choice/tests/backup/restore_date_test.php b/mod/choice/tests/backup/restore_date_test.php index bafc2f2e7a5..9a648b39b7f 100644 --- a/mod/choice/tests/backup/restore_date_test.php +++ b/mod/choice/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/choice/tests/custom_completion_test.php b/mod/choice/tests/custom_completion_test.php index 120d3e2f400..25814ded060 100644 --- a/mod/choice/tests/custom_completion_test.php +++ b/mod/choice/tests/custom_completion_test.php @@ -36,7 +36,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/choice/tests/dates_test.php b/mod/choice/tests/dates_test.php index dd6eab7d692..595757039e1 100644 --- a/mod/choice/tests/dates_test.php +++ b/mod/choice/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/choice/tests/event/events_test.php b/mod/choice/tests/event/events_test.php index 60807ede129..1bfba1a3f31 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 57bc4079baf..23d150a7c9f 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 1e092cfc29b..a82d9b35c73 100644 --- a/mod/choice/tests/generator_test.php +++ b/mod/choice/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_choice; * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/choice/tests/lib_test.php b/mod/choice/tests/lib_test.php index e5251ef377f..40527f19efc 100644 --- a/mod/choice/tests/lib_test.php +++ b/mod/choice/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/mod/choice/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \externallib_advanced_testcase { +final class lib_test extends \externallib_advanced_testcase { /** * Test choice_view diff --git a/mod/choice/tests/privacy/provider_test.php b/mod/choice/tests/privacy/provider_test.php index 6a27b7c27b9..6e84da89ce2 100644 --- a/mod/choice/tests/privacy/provider_test.php +++ b/mod/choice/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; diff --git a/mod/data/tests/backup/restore_date_test.php b/mod/data/tests/backup/restore_date_test.php index 354862a0262..9689723a84b 100644 --- a/mod/data/tests/backup/restore_date_test.php +++ b/mod/data/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/data/tests/backup/restore_type_test.php b/mod/data/tests/backup/restore_type_test.php index f22777d934a..147bc008163 100644 --- a/mod/data/tests/backup/restore_type_test.php +++ b/mod/data/tests/backup/restore_type_test.php @@ -24,7 +24,7 @@ namespace mod_data\backup; * @copyright 2024 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_type_test extends \advanced_testcase { +final class restore_type_test extends \advanced_testcase { /** * Data provider for test_duplicating_data_remove_unwanted_types. diff --git a/mod/data/tests/custom_completion_test.php b/mod/data/tests/custom_completion_test.php index 2f41dad7a5b..40f3fe49201 100644 --- a/mod/data/tests/custom_completion_test.php +++ b/mod/data/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/data/tests/dates_test.php b/mod/data/tests/dates_test.php index 2a769e7f169..91863c26f2a 100644 --- a/mod/data/tests/dates_test.php +++ b/mod/data/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/data/tests/entries_export_test.php b/mod/data/tests/entries_export_test.php index 36df83528d5..1104f95ef82 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 8f53b5932fd..8889db39eb6 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 a1a40276d3c..b19b175ff63 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 423e29f8669..e4bdaf4e9ed 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 9e0cefd5594..75dea7baaf1 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 62b84bfdc81..497a083fd1f 100644 --- a/mod/data/tests/generator_test.php +++ b/mod/data/tests/generator_test.php @@ -27,7 +27,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * @covers ::create_instance */ diff --git a/mod/data/tests/lib_test.php b/mod/data/tests/lib_test.php index c1a87c6cdb6..1944d76fa9c 100644 --- a/mod/data/tests/lib_test.php +++ b/mod/data/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/data/lib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var moodle_database diff --git a/mod/data/tests/locallib_test.php b/mod/data/tests/locallib_test.php index f52e2c740fd..9132283178e 100644 --- a/mod/data/tests/locallib_test.php +++ b/mod/data/tests/locallib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/data/locallib.php'); * @copyright 2022 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Confirms that search is working diff --git a/mod/data/tests/manager_test.php b/mod/data/tests/manager_test.php index 14d8067b961..33d16da8e71 100644 --- a/mod/data/tests/manager_test.php +++ b/mod/data/tests/manager_test.php @@ -30,7 +30,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\manager */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test for static create methods. diff --git a/mod/data/tests/preset_test.php b/mod/data/tests/preset_test.php index 018e6bdf3b6..275f34d12a8 100644 --- a/mod/data/tests/preset_test.php +++ b/mod/data/tests/preset_test.php @@ -29,7 +29,7 @@ use zip_archive; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\preset */ -class preset_test extends \advanced_testcase { +final class preset_test extends \advanced_testcase { /** * Test for static create_from_plugin method. diff --git a/mod/data/tests/privacy/provider_test.php b/mod/data/tests/privacy/provider_test.php index 5a7a4d530aa..c2ab63581ee 100644 --- a/mod/data/tests/privacy/provider_test.php +++ b/mod/data/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; /** @var stdClass The student object. */ diff --git a/mod/data/tests/search/search_test.php b/mod/data/tests/search/search_test.php index 5d2569d570d..59f7c89c8cc 100644 --- a/mod/data/tests/search/search_test.php +++ b/mod/data/tests/search/search_test.php @@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/mod/data/tests/generator/lib.php'); * @copyright 2012 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var stdObject $recorddata An object that holds information from the table data. */ diff --git a/mod/data/tests/template_test.php b/mod/data/tests/template_test.php index c0b86d72236..a908c5f7aef 100644 --- a/mod/data/tests/template_test.php +++ b/mod/data/tests/template_test.php @@ -29,7 +29,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_data\template */ -class template_test extends \advanced_testcase { +final class template_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. */ diff --git a/mod/feedback/tests/backup/restore_date_test.php b/mod/feedback/tests/backup/restore_date_test.php index 6a429ceb0e2..9c5e561c4fd 100644 --- a/mod/feedback/tests/backup/restore_date_test.php +++ b/mod/feedback/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/feedback/tests/completion_test.php b/mod/feedback/tests/completion_test.php index 2b322b2c26c..62894ca25b2 100644 --- a/mod/feedback/tests/completion_test.php +++ b/mod/feedback/tests/completion_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/feedback/classes/completion.php'); * @copyright 2019 Tobias Reischmann * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class completion_test extends \advanced_testcase { +final class completion_test extends \advanced_testcase { /** * Returns the number of pages with visible elements for the current state of the feedback completion. * @param mod_feedback_completion $completion diff --git a/mod/feedback/tests/custom_completion_test.php b/mod/feedback/tests/custom_completion_test.php index 630b063dc3a..84b33503707 100644 --- a/mod/feedback/tests/custom_completion_test.php +++ b/mod/feedback/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/feedback/tests/dates_test.php b/mod/feedback/tests/dates_test.php index b9c65282386..3243c65c3fc 100644 --- a/mod/feedback/tests/dates_test.php +++ b/mod/feedback/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/feedback/tests/event/events_test.php b/mod/feedback/tests/event/events_test.php index afcc627d410..5dff1593bfa 100644 --- a/mod/feedback/tests/event/events_test.php +++ b/mod/feedback/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_feedback\event; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var stdClass A user who likes to interact with feedback activity. */ private $eventuser; diff --git a/mod/feedback/tests/form/create_template_form_test.php b/mod/feedback/tests/form/create_template_form_test.php index ae56cce41f7..8fe4ab0547f 100644 --- a/mod/feedback/tests/form/create_template_form_test.php +++ b/mod/feedback/tests/form/create_template_form_test.php @@ -23,7 +23,7 @@ namespace mod_feedback\form; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package mod_feedback */ -class create_template_form_test extends \advanced_testcase { +final class create_template_form_test extends \advanced_testcase { /** * Run the basic setup for the test */ diff --git a/mod/feedback/tests/form/use_template_form_test.php b/mod/feedback/tests/form/use_template_form_test.php index d5637b8d21e..3d52e959e53 100644 --- a/mod/feedback/tests/form/use_template_form_test.php +++ b/mod/feedback/tests/form/use_template_form_test.php @@ -23,7 +23,7 @@ namespace mod_feedback\form; * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package mod_feedback */ -class use_template_form_test extends \advanced_testcase { +final class use_template_form_test extends \advanced_testcase { /** * Run the basic setup for the test */ diff --git a/mod/feedback/tests/generator_test.php b/mod/feedback/tests/generator_test.php index 615ed3b3bec..0fba2a17ac0 100644 --- a/mod/feedback/tests/generator_test.php +++ b/mod/feedback/tests/generator_test.php @@ -23,7 +23,7 @@ namespace mod_feedback; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/feedback/tests/lib_test.php b/mod/feedback/tests/lib_test.php index e5243d762c3..ceba9cd27ec 100644 --- a/mod/feedback/tests/lib_test.php +++ b/mod/feedback/tests/lib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/mod/feedback/lib.php'); * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_feedback_initialise() { $this->resetAfterTest(); diff --git a/mod/feedback/tests/privacy/provider_test.php b/mod/feedback/tests/privacy/provider_test.php index de34617e633..573d70f3af6 100644 --- a/mod/feedback/tests/privacy/provider_test.php +++ b/mod/feedback/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/feedback/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/folder/tests/backup/restore_date_test.php b/mod/folder/tests/backup/restore_date_test.php index 47c7e80cc5d..e728dfb982b 100644 --- a/mod/folder/tests/backup/restore_date_test.php +++ b/mod/folder/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/folder/tests/event/events_test.php b/mod/folder/tests/event/events_test.php index 35e39a25845..844a4d710d0 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 31488a3c275..9d24ae5e2ac 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 4744a8fb110..cecf2554dd8 100644 --- a/mod/folder/tests/generator_test.php +++ b/mod/folder/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_folder; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $USER; diff --git a/mod/folder/tests/lib_test.php b/mod/folder/tests/lib_test.php index b0b1c17adff..57234e5ab6d 100644 --- a/mod/folder/tests/lib_test.php +++ b/mod/folder/tests/lib_test.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Setup. diff --git a/mod/folder/tests/search/search_test.php b/mod/folder/tests/search/search_test.php index c41038aa17c..3ac71cde0b9 100644 --- a/mod/folder/tests/search/search_test.php +++ b/mod/folder/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/forum/report/summary/tests/event/events_test.php b/mod/forum/report/summary/tests/event/events_test.php index 5bf5ba82ee0..b04ae52c151 100644 --- a/mod/forum/report/summary/tests/event/events_test.php +++ b/mod/forum/report/summary/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace forumreport_summary\event; * @copyright 2019 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Test report_downloaded event. */ diff --git a/mod/forum/tests/backup/restore_date_test.php b/mod/forum/tests/backup/restore_date_test.php index f0691daecd1..d55f3f206cf 100644 --- a/mod/forum/tests/backup/restore_date_test.php +++ b/mod/forum/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/forum/tests/backup_forum_activity_task_test.php b/mod/forum/tests/backup_forum_activity_task_test.php index 28c021717e5..355dbf55be8 100644 --- a/mod/forum/tests/backup_forum_activity_task_test.php +++ b/mod/forum/tests/backup_forum_activity_task_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_activity_ta * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_forum_activity_task_test extends \advanced_testcase { +final class backup_forum_activity_task_test extends \advanced_testcase { /** * Test the encoding of forum content links. diff --git a/mod/forum/tests/builders_exported_posts_test.php b/mod/forum/tests/builders_exported_posts_test.php index f321617cea9..9be57c37772 100644 --- a/mod/forum/tests/builders_exported_posts_test.php +++ b/mod/forum/tests/builders_exported_posts_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class builders_exported_posts_test extends \advanced_testcase { +final class builders_exported_posts_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/custom_completion_test.php b/mod/forum/tests/custom_completion_test.php index 1d5df101112..d4b99a8e541 100644 --- a/mod/forum/tests/custom_completion_test.php +++ b/mod/forum/tests/custom_completion_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/forum/tests/generator_trait.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { use \mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/dates_test.php b/mod/forum/tests/dates_test.php index 79a9a04a300..daa4a529d04 100644 --- a/mod/forum/tests/dates_test.php +++ b/mod/forum/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/forum/tests/entities_author_test.php b/mod/forum/tests/entities_author_test.php index 0fc19054aa9..fb59b67fa52 100644 --- a/mod/forum/tests/entities_author_test.php +++ b/mod/forum/tests/entities_author_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\author as author_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_author_test extends \advanced_testcase { +final class entities_author_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_discussion_summary_test.php b/mod/forum/tests/entities_discussion_summary_test.php index 9fed57a368d..8eef23835af 100644 --- a/mod/forum/tests/entities_discussion_summary_test.php +++ b/mod/forum/tests/entities_discussion_summary_test.php @@ -28,7 +28,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_discussion_summary_test extends \advanced_testcase { +final class entities_discussion_summary_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_discussion_test.php b/mod/forum/tests/entities_discussion_test.php index f4b448af8ce..14f7c916b39 100644 --- a/mod/forum/tests/entities_discussion_test.php +++ b/mod/forum/tests/entities_discussion_test.php @@ -26,7 +26,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_discussion_test extends \advanced_testcase { +final class entities_discussion_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_forum_test.php b/mod/forum/tests/entities_forum_test.php index 2d52ba37910..08e758a0545 100644 --- a/mod/forum/tests/entities_forum_test.php +++ b/mod/forum/tests/entities_forum_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_forum_test extends \advanced_testcase { +final class entities_forum_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_post_read_receipt_collection_test.php b/mod/forum/tests/entities_post_read_receipt_collection_test.php index 6bab5a2ade5..1e13ad823d8 100644 --- a/mod/forum/tests/entities_post_read_receipt_collection_test.php +++ b/mod/forum/tests/entities_post_read_receipt_collection_test.php @@ -26,7 +26,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_post_read_receipt_collection_test extends \advanced_testcase { +final class entities_post_read_receipt_collection_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_post_test.php b/mod/forum/tests/entities_post_test.php index 4c826bcceea..0a86a2d206a 100644 --- a/mod/forum/tests/entities_post_test.php +++ b/mod/forum/tests/entities_post_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\post as post_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_post_test extends \advanced_testcase { +final class entities_post_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/entities_sorter_test.php b/mod/forum/tests/entities_sorter_test.php index 28e32e285a6..5b1f0d949a9 100644 --- a/mod/forum/tests/entities_sorter_test.php +++ b/mod/forum/tests/entities_sorter_test.php @@ -25,7 +25,7 @@ use mod_forum\local\entities\sorter as sorter_entity; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class entities_sorter_test extends \advanced_testcase { +final class entities_sorter_test extends \advanced_testcase { /** * Test the entity returns expected values. */ diff --git a/mod/forum/tests/event/events_test.php b/mod/forum/tests/event/events_test.php index 1d0a9c585e2..f2eaf897ecb 100644 --- a/mod/forum/tests/event/events_test.php +++ b/mod/forum/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace mod_forum\event; * @copyright 2014 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/mod/forum/tests/exporters_author_test.php b/mod/forum/tests/exporters_author_test.php index 9ede08173ef..78d9b852c3d 100644 --- a/mod/forum/tests/exporters_author_test.php +++ b/mod/forum/tests/exporters_author_test.php @@ -26,7 +26,7 @@ use mod_forum\local\exporters\author as author_exporter; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_author_test extends \advanced_testcase { +final class exporters_author_test extends \advanced_testcase { /** * Test the export function returns expected values. */ diff --git a/mod/forum/tests/exporters_discussion_test.php b/mod/forum/tests/exporters_discussion_test.php index 68715c79c13..f8fa1e1b43c 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 b28f5e80608..f253f3362b7 100644 --- a/mod/forum/tests/exporters_forum_test.php +++ b/mod/forum/tests/exporters_forum_test.php @@ -26,7 +26,7 @@ use mod_forum\local\exporters\forum as forum_exporter; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_forum_test extends \advanced_testcase { +final class exporters_forum_test extends \advanced_testcase { /** * Test the export function returns expected values. */ diff --git a/mod/forum/tests/exporters_post_test.php b/mod/forum/tests/exporters_post_test.php index 8387b834b27..0c5f48c1af7 100644 --- a/mod/forum/tests/exporters_post_test.php +++ b/mod/forum/tests/exporters_post_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class exporters_post_test extends \advanced_testcase { +final class exporters_post_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/grade/forum_gradeitem_test.php b/mod/forum/tests/grade/forum_gradeitem_test.php index 3d62c316ea1..3a65196a860 100644 --- a/mod/forum/tests/grade/forum_gradeitem_test.php +++ b/mod/forum/tests/grade/forum_gradeitem_test.php @@ -41,7 +41,7 @@ require_once(__DIR__ . '/../generator_trait.php'); * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class forum_gradeitem_test extends \advanced_testcase { +final class forum_gradeitem_test extends \advanced_testcase { use \mod_forum_tests_generator_trait; /** diff --git a/mod/forum/tests/grade/gradeitems_test.php b/mod/forum/tests/grade/gradeitems_test.php index 1bbe060d919..139dc10e1c1 100644 --- a/mod/forum/tests/grade/gradeitems_test.php +++ b/mod/forum/tests/grade/gradeitems_test.php @@ -30,7 +30,7 @@ use coding_exception; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gradeitems_test extends advanced_testcase { +final class gradeitems_test extends advanced_testcase { /** * Ensure that the mappings are present and correct. diff --git a/mod/forum/tests/h5p/canedit_test.php b/mod/forum/tests/h5p/canedit_test.php index 2602f615fd3..7fcaff17a38 100644 --- a/mod/forum/tests/h5p/canedit_test.php +++ b/mod/forum/tests/h5p/canedit_test.php @@ -28,7 +28,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\h5p\canedit */ -class canedit_test extends \advanced_testcase { +final class canedit_test extends \advanced_testcase { /** * Test the behaviour of can_edit_content(). diff --git a/mod/forum/tests/lib_test.php b/mod/forum/tests/lib_test.php index 979270ef819..68a14645060 100644 --- a/mod/forum/tests/lib_test.php +++ b/mod/forum/tests/lib_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function setUp(): void { // We must clear the subscription caches. This has to be done both before each test, and after in case of other diff --git a/mod/forum/tests/local_container_test.php b/mod/forum/tests/local_container_test.php index 24032076057..99763af39a6 100644 --- a/mod/forum/tests/local_container_test.php +++ b/mod/forum/tests/local_container_test.php @@ -24,7 +24,7 @@ namespace mod_forum; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\container */ -class local_container_test extends \advanced_testcase { +final class local_container_test extends \advanced_testcase { /** * Ensure that a renderer factory is returned. * diff --git a/mod/forum/tests/locallib_test.php b/mod/forum/tests/locallib_test.php index 4de0de8999e..cdbce396d42 100644 --- a/mod/forum/tests/locallib_test.php +++ b/mod/forum/tests/locallib_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/mod/forum/lib.php'); * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { - public function test_forum_update_calendar() { +final class locallib_test extends \advanced_testcase { + public function test_forum_update_calendar(): void { global $DB; $this->resetAfterTest(); diff --git a/mod/forum/tests/mail_group_test.php b/mod/forum/tests/mail_group_test.php index e32dd2ea672..8373e7c153b 100644 --- a/mod/forum/tests/mail_group_test.php +++ b/mod/forum/tests/mail_group_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2013 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mail_group_test extends \advanced_testcase { +final class mail_group_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/mail_test.php b/mod/forum/tests/mail_test.php index f6d949604b3..7fc846e1633 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 27e026feeac..4f763d075e9 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 5456c2ce657..d168ad8f4a7 100644 --- a/mod/forum/tests/managers_capability_test.php +++ b/mod/forum/tests/managers_capability_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\managers\capability */ -class managers_capability_test extends \advanced_testcase { +final class managers_capability_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/output_email_test.php b/mod/forum/tests/output_email_test.php index 1c997632677..3c617a51484 100644 --- a/mod/forum/tests/output_email_test.php +++ b/mod/forum/tests/output_email_test.php @@ -25,7 +25,7 @@ use mod_forum\output\forum_post_email; * @copyright 2016 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class output_email_test extends \advanced_testcase { +final class output_email_test extends \advanced_testcase { /** * Data provider for the postdate function tests. */ diff --git a/mod/forum/tests/portfolio_caller_test.php b/mod/forum/tests/portfolio_caller_test.php index 03e91fea125..ed346de0eba 100644 --- a/mod/forum/tests/portfolio_caller_test.php +++ b/mod/forum/tests/portfolio_caller_test.php @@ -26,7 +26,7 @@ namespace mod_forum; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Brendan Cox */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** * Ensure that a file will be loaded in an instance of the caller when supplied valid and diff --git a/mod/forum/tests/privacy/provider_test.php b/mod/forum/tests/privacy/provider_test.php index f60af987559..fb1906e98ae 100644 --- a/mod/forum/tests/privacy/provider_test.php +++ b/mod/forum/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use mod_forum\privacy\provider; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy subcontext_info trait. // This includes the subcontext builders. diff --git a/mod/forum/tests/private_replies_test.php b/mod/forum/tests/private_replies_test.php index a09b788cc1a..fd6348b03f0 100644 --- a/mod/forum/tests/private_replies_test.php +++ b/mod/forum/tests/private_replies_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class private_replies_test extends \advanced_testcase { +final class private_replies_test extends \advanced_testcase { use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/qanda_test.php b/mod/forum/tests/qanda_test.php index 16d85805ed3..ea3b9569d13 100644 --- a/mod/forum/tests/qanda_test.php +++ b/mod/forum/tests/qanda_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2013 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qanda_test extends \advanced_testcase { +final class qanda_test extends \advanced_testcase { // Make use of the cron tester trait. use mod_forum_tests_cron_trait; diff --git a/mod/forum/tests/rsslib_test.php b/mod/forum/tests/rsslib_test.php index a3ee0cbb7e3..1f8f93e5816 100644 --- a/mod/forum/tests/rsslib_test.php +++ b/mod/forum/tests/rsslib_test.php @@ -29,7 +29,7 @@ require_once("{$CFG->dirroot}/mod/forum/rsslib.php"); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rsslib_test extends \advanced_testcase { +final class rsslib_test extends \advanced_testcase { // Include the mod_forum test helpers. // This includes functions to create forums, users, discussions, and posts. use \mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/search/search_test.php b/mod/forum/tests/search/search_test.php index 7d26221f42e..74d1cc18114 100644 --- a/mod/forum/tests/search/search_test.php +++ b/mod/forum/tests/search/search_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/mod/forum/lib.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/forum/tests/subscriptions_test.php b/mod/forum/tests/subscriptions_test.php index bfa78fb6cfe..4010f748f44 100644 --- a/mod/forum/tests/subscriptions_test.php +++ b/mod/forum/tests/subscriptions_test.php @@ -31,7 +31,7 @@ require_once("{$CFG->dirroot}/mod/forum/lib.php"); * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class subscriptions_test extends \advanced_testcase { +final class subscriptions_test extends \advanced_testcase { // Include the mod_forum test helpers. // This includes functions to create forums, users, discussions, and posts. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_author_test.php b/mod/forum/tests/vaults_author_test.php index a96696e1eaa..f8390f11d8d 100644 --- a/mod/forum/tests/vaults_author_test.php +++ b/mod/forum/tests/vaults_author_test.php @@ -23,7 +23,7 @@ namespace mod_forum; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_author_test extends \advanced_testcase { +final class vaults_author_test extends \advanced_testcase { /** * Test get_from_id. */ diff --git a/mod/forum/tests/vaults_discussion_list_test.php b/mod/forum/tests/vaults_discussion_list_test.php index 22b822b18c0..f8955ee72b8 100644 --- a/mod/forum/tests/vaults_discussion_list_test.php +++ b/mod/forum/tests/vaults_discussion_list_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_discussion_list_test extends \advanced_testcase { +final class vaults_discussion_list_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_discussion_test.php b/mod/forum/tests/vaults_discussion_test.php index cf982494336..9aa9a67ae6b 100644 --- a/mod/forum/tests/vaults_discussion_test.php +++ b/mod/forum/tests/vaults_discussion_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_discussion_test extends \advanced_testcase { +final class vaults_discussion_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_forum_test.php b/mod/forum/tests/vaults_forum_test.php index 7141d8607fc..1a77d99993d 100644 --- a/mod/forum/tests/vaults_forum_test.php +++ b/mod/forum/tests/vaults_forum_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\vaults\forum */ -class vaults_forum_test extends \advanced_testcase { +final class vaults_forum_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_attachment_test.php b/mod/forum/tests/vaults_post_attachment_test.php index 8745485f3d5..0fac57a1a68 100644 --- a/mod/forum/tests/vaults_post_attachment_test.php +++ b/mod/forum/tests/vaults_post_attachment_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_post_attachment_test extends \advanced_testcase { +final class vaults_post_attachment_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_read_receipt_collection_test.php b/mod/forum/tests/vaults_post_read_receipt_collection_test.php index 56db40a17b4..31db3a2770b 100644 --- a/mod/forum/tests/vaults_post_read_receipt_collection_test.php +++ b/mod/forum/tests/vaults_post_read_receipt_collection_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class vaults_post_read_receipt_collection_test extends \advanced_testcase { +final class vaults_post_read_receipt_collection_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/forum/tests/vaults_post_test.php b/mod/forum/tests/vaults_post_test.php index ab7f7f9abf7..6c7f73f439b 100644 --- a/mod/forum/tests/vaults_post_test.php +++ b/mod/forum/tests/vaults_post_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/generator_trait.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\vaults\post */ -class vaults_post_test extends \advanced_testcase { +final class vaults_post_test extends \advanced_testcase { // Make use of the test generator trait. use mod_forum_tests_generator_trait; diff --git a/mod/glossary/tests/backup/restore_date_test.php b/mod/glossary/tests/backup/restore_date_test.php index 8bb82a33ff1..f7f6f4e72e6 100644 --- a/mod/glossary/tests/backup/restore_date_test.php +++ b/mod/glossary/tests/backup/restore_date_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/glossary/tests/concept_cache_test.php b/mod/glossary/tests/concept_cache_test.php index 63745d5b48e..b67c2a1cc50 100644 --- a/mod/glossary/tests/concept_cache_test.php +++ b/mod/glossary/tests/concept_cache_test.php @@ -24,7 +24,7 @@ namespace mod_glossary; * @copyright 2014 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class concept_cache_test extends \advanced_testcase { +final class concept_cache_test extends \advanced_testcase { /** * Test convect fetching. */ diff --git a/mod/glossary/tests/custom_completion_test.php b/mod/glossary/tests/custom_completion_test.php index 87d7cd2ec70..1b2e0462874 100644 --- a/mod/glossary/tests/custom_completion_test.php +++ b/mod/glossary/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/glossary/tests/event/events_test.php b/mod/glossary/tests/event/events_test.php index 87b262c013e..e24265a562c 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 0350afd2212..5415ce7e071 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 5b8d8d9fa50..b86de7497a7 100644 --- a/mod/glossary/tests/generator_test.php +++ b/mod/glossary/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_glossary; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/glossary/tests/lib_test.php b/mod/glossary/tests/lib_test.php index 9d78bed6c33..594005cb999 100644 --- a/mod/glossary/tests/lib_test.php +++ b/mod/glossary/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/glossary/locallib.php'); * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_glossary_view() { global $CFG; diff --git a/mod/glossary/tests/privacy/provider_test.php b/mod/glossary/tests/privacy/provider_test.php index 9acb2ee7bb2..110190990e9 100644 --- a/mod/glossary/tests/privacy/provider_test.php +++ b/mod/glossary/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @copyright 2018 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; diff --git a/mod/glossary/tests/search/search_test.php b/mod/glossary/tests/search/search_test.php index 4601d2c3d1b..ccb100f3378 100644 --- a/mod/glossary/tests/search/search_test.php +++ b/mod/glossary/tests/search/search_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/glossary/tests/generator/lib.php'); * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php b/mod/h5pactivity/tests/event/course_module_instance_list_viewed_test.php index 545bab2b62f..0d96fa7676b 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 acad09525aa..3870e1c488c 100644 --- a/mod/h5pactivity/tests/event/course_module_viewed_test.php +++ b/mod/h5pactivity/tests/event/course_module_viewed_test.php @@ -35,7 +35,7 @@ use context_module; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_module_viewed_test extends advanced_testcase { +final class course_module_viewed_test extends advanced_testcase { /** * Test course_module_viewed event. diff --git a/mod/h5pactivity/tests/event/report_viewed_test.php b/mod/h5pactivity/tests/event/report_viewed_test.php index a5de5faf978..d44776de7ab 100644 --- a/mod/h5pactivity/tests/event/report_viewed_test.php +++ b/mod/h5pactivity/tests/event/report_viewed_test.php @@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_viewed_test extends advanced_testcase { +final class report_viewed_test extends advanced_testcase { /** * Test report_viewed event. diff --git a/mod/h5pactivity/tests/event/statement_received_test.php b/mod/h5pactivity/tests/event/statement_received_test.php index 72439b9ff89..dcb2fb89b14 100644 --- a/mod/h5pactivity/tests/event/statement_received_test.php +++ b/mod/h5pactivity/tests/event/statement_received_test.php @@ -34,7 +34,7 @@ use context_module; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statement_received_test extends advanced_testcase { +final class statement_received_test extends advanced_testcase { /** * Test statement_recieved event. diff --git a/mod/h5pactivity/tests/external/get_attempts_test.php b/mod/h5pactivity/tests/external/get_attempts_test.php index 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 17e80c82bfc..c0f7e2e9aea 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 4b80f485fc1..842006945b6 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 d4b54ace1c1..6caf0d99fbb 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 33e284051e6..4a632131423 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 870a5119c97..0b96a5e59a2 100644 --- a/mod/h5pactivity/tests/local/grader_test.php +++ b/mod/h5pactivity/tests/local/grader_test.php @@ -36,7 +36,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class grader_test extends \advanced_testcase { +final class grader_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/mod/h5pactivity/tests/local/manager_test.php b/mod/h5pactivity/tests/local/manager_test.php index 03f2a981477..74031585bc4 100644 --- a/mod/h5pactivity/tests/local/manager_test.php +++ b/mod/h5pactivity/tests/local/manager_test.php @@ -28,7 +28,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test for static create methods. diff --git a/mod/h5pactivity/tests/output/result/result_test.php b/mod/h5pactivity/tests/output/result/result_test.php index 64184abd78f..31a66d3accb 100644 --- a/mod/h5pactivity/tests/output/result/result_test.php +++ b/mod/h5pactivity/tests/output/result/result_test.php @@ -27,7 +27,7 @@ use mod_h5pactivity\local\manager; * @copyright 2023 Laurent David * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class result_test extends \advanced_testcase { +final class result_test extends \advanced_testcase { /** * Data provider for result export_options test * diff --git a/mod/h5pactivity/tests/privacy/provider_test.php b/mod/h5pactivity/tests/privacy/provider_test.php index 8317c9a919a..f8efa3d547b 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 a060b1f08a5..3b854976603 100644 --- a/mod/h5pactivity/tests/restore_test.php +++ b/mod/h5pactivity/tests/restore_test.php @@ -41,7 +41,7 @@ use stdClass; * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_test extends advanced_testcase { +final class restore_test extends advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/mod/imscp/tests/backup/restore_date_test.php b/mod/imscp/tests/backup/restore_date_test.php index 7b186735ea6..0d721e7bccb 100644 --- a/mod/imscp/tests/backup/restore_date_test.php +++ b/mod/imscp/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/imscp/tests/externallib_test.php b/mod/imscp/tests/externallib_test.php index 3e74afc8177..c7e59ff36e4 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 2d45d376469..6503872f1f9 100644 --- a/mod/imscp/tests/generator_test.php +++ b/mod/imscp/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_imscp; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $CFG, $USER; diff --git a/mod/imscp/tests/lib_test.php b/mod/imscp/tests/lib_test.php index 71a073a6dea..ce1c3046ba0 100644 --- a/mod/imscp/tests/lib_test.php +++ b/mod/imscp/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/imscp/lib.php'); * @copyright 2015 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { public function test_export_contents() { global $DB, $USER; diff --git a/mod/label/tests/externallib_test.php b/mod/label/tests/externallib_test.php index 768cf090000..ffee6686afb 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 fdb8a197b6a..fdbc578928c 100644 --- a/mod/label/tests/generator_test.php +++ b/mod/label/tests/generator_test.php @@ -24,8 +24,8 @@ namespace mod_label; * @copyright 2013 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/mod/label/tests/lib_test.php b/mod/label/tests/lib_test.php index daf75e96f3d..200474c8824 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 a8d50cc983f..09a726a4c36 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 15e3332137f..9234f352fe3 100644 --- a/mod/lesson/tests/backup/restore_override_test.php +++ b/mod/lesson/tests/backup/restore_override_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_override_test extends \restore_date_testcase { +final class restore_override_test extends \restore_date_testcase { /** * Test restore overrides. diff --git a/mod/lesson/tests/dates_test.php b/mod/lesson/tests/dates_test.php index 0d2b676ff40..a0520f1e00b 100644 --- a/mod/lesson/tests/dates_test.php +++ b/mod/lesson/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/lesson/tests/event/events_test.php b/mod/lesson/tests/event/events_test.php index 24bfc74cc59..f0e2cb43a17 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 056491c76c8..9100ea3c3cd 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 5f22f261cb4..8b5e2dc3d80 100644 --- a/mod/lesson/tests/generator_test.php +++ b/mod/lesson/tests/generator_test.php @@ -25,7 +25,7 @@ namespace mod_lesson; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_lesson_generator */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/lesson/tests/lib_test.php b/mod/lesson/tests/lib_test.php index ba965693e00..55cc4570619 100644 --- a/mod/lesson/tests/lib_test.php +++ b/mod/lesson/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/lesson/lib.php'); * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test for lesson_get_group_override_priorities(). */ diff --git a/mod/lesson/tests/locallib_test.php b/mod/lesson/tests/locallib_test.php index 7571ed7a1f4..0119ec5c387 100644 --- a/mod/lesson/tests/locallib_test.php +++ b/mod/lesson/tests/locallib_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php'); * @copyright 2016 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** * Test duplicating a lesson page element. diff --git a/mod/lesson/tests/numeric_helper_test.php b/mod/lesson/tests/numeric_helper_test.php index f72e32ded46..a1613df0c44 100644 --- a/mod/lesson/tests/numeric_helper_test.php +++ b/mod/lesson/tests/numeric_helper_test.php @@ -26,7 +26,7 @@ use mod_lesson\local\numeric\helper; * @copyright 2020 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class numeric_helper_test extends \advanced_testcase { +final class numeric_helper_test extends \advanced_testcase { /** * Test the lesson_unformat_numeric_value function. * diff --git a/mod/lesson/tests/pagetypes_test.php b/mod/lesson/tests/pagetypes_test.php index 5fe3a0db371..3e131d3ae93 100644 --- a/mod/lesson/tests/pagetypes_test.php +++ b/mod/lesson/tests/pagetypes_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/lesson/pagetypes/essay.php'); * @copyright 2015 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class pagetypes_test extends \advanced_testcase { - public function test_lesson_essay_extract_useranswer() { +final class pagetypes_test extends \advanced_testcase { + public function test_lesson_essay_extract_useranswer(): void { // Test that reponseformat is added when not present. $answer = 'O:8:"stdClass":6:{s:4:"sent";i:1;s:6:"graded";i:1;s:5:"score";s:1:"1";' . 's:6:"answer";s:64:"

This is my answer with bold and italics

";' diff --git a/mod/lesson/tests/privacy/provider_test.php b/mod/lesson/tests/privacy/provider_test.php index 9a94eae7526..e0c95322516 100644 --- a/mod/lesson/tests/privacy/provider_test.php +++ b/mod/lesson/tests/privacy/provider_test.php @@ -44,7 +44,7 @@ use mod_lesson\privacy\provider; * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php index 9b7da079693..d8b47458c43 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 01e5493f68b..f6cb38dce63 100644 --- a/mod/lti/service/gradebookservices/tests/lineitem_test.php +++ b/mod/lti/service/gradebookservices/tests/lineitem_test.php @@ -28,7 +28,7 @@ use ltiservice_gradebookservices\local\service\gradebookservices; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_lti\service\gradebookservices\local\resources\lineitem */ -class lineitem_test extends \advanced_testcase { +final class lineitem_test extends \advanced_testcase { /** * @covers ::execute diff --git a/mod/lti/service/gradebookservices/tests/privacy/provider_test.php b/mod/lti/service/gradebookservices/tests/privacy/provider_test.php index 398aeb71d9f..ea4a58a7db7 100644 --- a/mod/lti/service/gradebookservices/tests/privacy/provider_test.php +++ b/mod/lti/service/gradebookservices/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/mod/lti/service/gradebookservices/tests/task/cleanup_test.php b/mod/lti/service/gradebookservices/tests/task/cleanup_test.php index 16564b40325..d1b8b8ed0c6 100644 --- a/mod/lti/service/gradebookservices/tests/task/cleanup_test.php +++ b/mod/lti/service/gradebookservices/tests/task/cleanup_test.php @@ -24,7 +24,7 @@ namespace ltiservice_gradebookservices\task; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cleanup_test extends \advanced_testcase { +final class cleanup_test extends \advanced_testcase { /** * Test set up. diff --git a/mod/lti/service/memberships/tests/privacy/provider_test.php b/mod/lti/service/memberships/tests/privacy/provider_test.php index 3f8ae108bbd..fcf7f2c6cd5 100644 --- a/mod/lti/service/memberships/tests/privacy/provider_test.php +++ b/mod/lti/service/memberships/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/mod/lti/tests/event/unknown_service_api_called_test.php b/mod/lti/tests/event/unknown_service_api_called_test.php index ec87886d986..9786fc026b2 100644 --- a/mod/lti/tests/event/unknown_service_api_called_test.php +++ b/mod/lti/tests/event/unknown_service_api_called_test.php @@ -23,7 +23,7 @@ namespace mod_lti\event; * @copyright Copyright (c) 2012 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class unknown_service_api_called_test extends \advanced_testcase { +final class unknown_service_api_called_test extends \advanced_testcase { /* * Ensure create event works. */ diff --git a/mod/lti/tests/external/delete_course_tool_type_test.php b/mod/lti/tests/external/delete_course_tool_type_test.php index 3d5ba831362..f57e441bd24 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 b6c408ffa24..8ee6382b0a4 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 a482db767e8..c1da3c2612e 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 493c041bab5..4cdc29d26fd 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 4cee9bb25a2..f8f183a0122 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 66418f39c64..05a7b15b57b 100644 --- a/mod/lti/tests/generator_test.php +++ b/mod/lti/tests/generator_test.php @@ -25,8 +25,8 @@ namespace mod_lti; * @author Mark Nielsen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB; $this->resetAfterTest(true); diff --git a/mod/lti/tests/lib_test.php b/mod/lti/tests/lib_test.php index d8173017769..5d3baea33cf 100644 --- a/mod/lti/tests/lib_test.php +++ b/mod/lti/tests/lib_test.php @@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/lti/tests/local/ltiopenid/jwks_helper_test.php b/mod/lti/tests/local/ltiopenid/jwks_helper_test.php index 8fcac76df8c..a76da8f3560 100644 --- a/mod/lti/tests/local/ltiopenid/jwks_helper_test.php +++ b/mod/lti/tests/local/ltiopenid/jwks_helper_test.php @@ -42,7 +42,7 @@ namespace mod_lti\local\ltiopenid; * @copyright 2023 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class jwks_helper_test extends \basic_testcase { +final class jwks_helper_test extends \basic_testcase { /** * Test the fix_jwks_alg method with a range of inputs. diff --git a/mod/lti/tests/local/ltiopenid/registration_test.php b/mod/lti/tests/local/ltiopenid/registration_test.php index d700a6570f6..8951ea262a7 100644 --- a/mod/lti/tests/local/ltiopenid/registration_test.php +++ b/mod/lti/tests/local/ltiopenid/registration_test.php @@ -42,7 +42,7 @@ namespace mod_lti\local\ltiopenid; * @author Claude Vervoort * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class registration_test extends \advanced_testcase { +final class registration_test extends \advanced_testcase { /** * @var string A has-it-all client registration. diff --git a/mod/lti/tests/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 cc491e8d9e5..be07c9549b7 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 ffdf8027485..1ad89e1b816 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 ddb36629e2b..aaeef5b047f 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 28ad8b9b791..618f8761533 100644 --- a/mod/lti/tests/service_exception_handler_test.php +++ b/mod/lti/tests/service_exception_handler_test.php @@ -23,7 +23,7 @@ namespace mod_lti; * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class service_exception_handler_test extends \advanced_testcase { +final class service_exception_handler_test extends \advanced_testcase { /** * Testing service error handling. */ diff --git a/mod/lti/tests/servicelib_test.php b/mod/lti/tests/servicelib_test.php index 1fd5c321a1a..401f33e0883 100644 --- a/mod/lti/tests/servicelib_test.php +++ b/mod/lti/tests/servicelib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/mod/lti/servicelib.php'); * @copyright Copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class servicelib_test extends \basic_testcase { +final class servicelib_test extends \basic_testcase { /** * Test that lti_parse_message_id never fails with good and bad XML. * diff --git a/mod/lti/tests/task/clean_access_tokens_test.php b/mod/lti/tests/task/clean_access_tokens_test.php index ccc1a08c1a0..598407e4063 100644 --- a/mod/lti/tests/task/clean_access_tokens_test.php +++ b/mod/lti/tests/task/clean_access_tokens_test.php @@ -24,7 +24,7 @@ namespace mod_lti\task; * @copyright 2019 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class clean_access_tokens_test extends \advanced_testcase { +final class clean_access_tokens_test extends \advanced_testcase { /** * Test set up. diff --git a/mod/page/tests/externallib_test.php b/mod/page/tests/externallib_test.php index 666b1b0206e..c5c79fad43a 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 a96cab55584..64d7e781b36 100644 --- a/mod/page/tests/generator_test.php +++ b/mod/page/tests/generator_test.php @@ -24,8 +24,8 @@ namespace mod_page; * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB, $SITE; $this->resetAfterTest(true); diff --git a/mod/page/tests/lib_test.php b/mod/page/tests/lib_test.php index 96712c0d232..ff32ae8c669 100644 --- a/mod/page/tests/lib_test.php +++ b/mod/page/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php b/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php index 72c902813af..4dfc5eb19be 100644 --- a/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/delaybetweenattempts/rule.php * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_just_first_delay() { +final class rule_test extends \basic_testcase { + public function test_just_first_delay(): void { $quiz = new \stdClass(); $quiz->attempts = 3; $quiz->timelimit = 0; diff --git a/mod/quiz/accessrule/ipaddress/tests/rule_test.php b/mod/quiz/accessrule/ipaddress/tests/rule_test.php index 9a4d73df39d..0757b525bf9 100644 --- a/mod/quiz/accessrule/ipaddress/tests/rule_test.php +++ b/mod/quiz/accessrule/ipaddress/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/ipaddress/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_ipaddress_access_rule() { +final class rule_test extends \basic_testcase { + public function test_ipaddress_access_rule(): void { $quiz = new \stdClass(); $attempt = new \stdClass(); $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/numattempts/tests/rule_test.php b/mod/quiz/accessrule/numattempts/tests/rule_test.php index ada15512243..786228ed402 100644 --- a/mod/quiz/accessrule/numattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/numattempts/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/numattempts/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_num_attempts_access_rule() { +final class rule_test extends \basic_testcase { + public function test_num_attempts_access_rule(): void { $quiz = new \stdClass(); $quiz->attempts = 3; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php index 85e08089c3e..29855d12b30 100644 --- a/mod/quiz/accessrule/offlineattempts/tests/rule_test.php +++ b/mod/quiz/accessrule/offlineattempts/tests/rule_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/offlineattempts/rule.php'); * @copyright 2016 Juan Leyva * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_offlineattempts_access_rule() { +final class rule_test extends \basic_testcase { + public function test_offlineattempts_access_rule(): void { $quiz = new \stdClass(); $quiz->allowofflineattempts = 1; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/openclosedate/tests/rule_test.php b/mod/quiz/accessrule/openclosedate/tests/rule_test.php index afa7940abd4..f12279991cf 100644 --- a/mod/quiz/accessrule/openclosedate/tests/rule_test.php +++ b/mod/quiz/accessrule/openclosedate/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/openclosedate/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_no_dates() { +final class rule_test extends \basic_testcase { + public function test_no_dates(): void { $quiz = new \stdClass(); $quiz->timeopen = 0; $quiz->timeclose = 0; diff --git a/mod/quiz/accessrule/password/tests/rule_test.php b/mod/quiz/accessrule/password/tests/rule_test.php index fb4c779e706..53c422746e5 100644 --- a/mod/quiz/accessrule/password/tests/rule_test.php +++ b/mod/quiz/accessrule/password/tests/rule_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/password/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_password_access_rule() { +final class rule_test extends \basic_testcase { + public function test_password_access_rule(): void { $quiz = new \stdClass(); $quiz->password = 'frog'; $cm = new \stdClass(); diff --git a/mod/quiz/accessrule/seb/tests/access_manager_test.php b/mod/quiz/accessrule/seb/tests/access_manager_test.php index 835869ef3a6..61c4bf9e74f 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 15ff6376fc6..ee125259e5a 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 744cac2313a..7250e0b0d0b 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 9bd55004d27..835b8c78123 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 b1fd0f4d9a5..190b78176d8 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 96f23e37045..0ca3184f62b 100644 --- a/mod/quiz/accessrule/seb/tests/helper_test.php +++ b/mod/quiz/accessrule/seb/tests/helper_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/hideif_rule_test.php b/mod/quiz/accessrule/seb/tests/hideif_rule_test.php index 69214a913ca..215f833eeaa 100644 --- a/mod/quiz/accessrule/seb/tests/hideif_rule_test.php +++ b/mod/quiz/accessrule/seb/tests/hideif_rule_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class hideif_rule_test extends \advanced_testcase { +final class hideif_rule_test extends \advanced_testcase { /** * Test that can get rule data. diff --git a/mod/quiz/accessrule/seb/tests/link_generator_test.php b/mod/quiz/accessrule/seb/tests/link_generator_test.php index 57ff94f2c81..a0db9bd3403 100644 --- a/mod/quiz/accessrule/seb/tests/link_generator_test.php +++ b/mod/quiz/accessrule/seb/tests/link_generator_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class link_generator_test extends \advanced_testcase { +final class link_generator_test extends \advanced_testcase { /** * Called before every test. diff --git a/mod/quiz/accessrule/seb/tests/privacy/provider_test.php b/mod/quiz/accessrule/seb/tests/privacy/provider_test.php index 836326f5e3c..cba48a3e5c3 100644 --- a/mod/quiz/accessrule/seb/tests/privacy/provider_test.php +++ b/mod/quiz/accessrule/seb/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once(__DIR__ . '/../test_helper_trait.php'); * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { use \quizaccess_seb_test_helper_trait; /** diff --git a/mod/quiz/accessrule/seb/tests/property_list_test.php b/mod/quiz/accessrule/seb/tests/property_list_test.php index b6def63d989..e0dc5440f61 100644 --- a/mod/quiz/accessrule/seb/tests/property_list_test.php +++ b/mod/quiz/accessrule/seb/tests/property_list_test.php @@ -24,7 +24,7 @@ namespace quizaccess_seb; * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class property_list_test extends \advanced_testcase { +final class property_list_test extends \advanced_testcase { /** * Test that an empty PList with a root dictionary is created. diff --git a/mod/quiz/accessrule/seb/tests/quiz_settings_test.php b/mod/quiz/accessrule/seb/tests/quiz_settings_test.php index ae69a8a3edd..f6bb66c6d61 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 feaf4d70f0e..f7a87a90146 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 8d3713eb0e5..1b1e2470408 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 c3105607e4d..957795b0447 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 cfc5117e46f..a01478eda99 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() { $quiz = new \stdClass(); diff --git a/mod/quiz/accessrule/timelimit/tests/rule_test.php b/mod/quiz/accessrule/timelimit/tests/rule_test.php index 7ecb86073a0..51657ba4390 100644 --- a/mod/quiz/accessrule/timelimit/tests/rule_test.php +++ b/mod/quiz/accessrule/timelimit/tests/rule_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/mod/quiz/accessrule/timelimit/rule.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class rule_test extends \basic_testcase { - public function test_time_limit_access_rule() { +final class rule_test extends \basic_testcase { + public function test_time_limit_access_rule(): void { $quiz = new \stdClass(); $quiz->timeclose = 0; $quiz->timelimit = 3600; diff --git a/mod/quiz/report/grading/tests/privacy/provider_test.php b/mod/quiz/report/grading/tests/privacy/provider_test.php index cce967d1749..ee9cac009ca 100644 --- a/mod/quiz/report/grading/tests/privacy/provider_test.php +++ b/mod/quiz/report/grading/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/questionattempt.php'); /** * Privacy provider tests class. */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/overview/tests/privacy/provider_test.php b/mod/quiz/report/overview/tests/privacy/provider_test.php index 289edd58499..a16be7079f8 100644 --- a/mod/quiz/report/overview/tests/privacy/provider_test.php +++ b/mod/quiz/report/overview/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/overview/tests/report_test.php b/mod/quiz/report/overview/tests/report_test.php index 74dd18c545a..28dcd38abf2 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 6801cd59b8e..09e9609570a 100644 --- a/mod/quiz/report/responses/tests/privacy/provider_test.php +++ b/mod/quiz/report/responses/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ require_once($CFG->dirroot . '/question/engine/questionattempt.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ diff --git a/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php b/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php index 796f5f08edf..3f8f1057cdd 100644 --- a/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php +++ b/mod/quiz/report/statistics/tests/event/observer/attempt_submitted_test.php @@ -34,7 +34,7 @@ use quiz_statistics\tests\statistics_test_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics\event\observer\attempt_submitted */ -class attempt_submitted_test extends \advanced_testcase { +final class quiz_attempt_submitted_test extends \advanced_testcase { use \quiz_question_helper_test_trait; use statistics_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php b/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php index 6b1ca956e3a..a2f9b2d57be 100644 --- a/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php +++ b/mod/quiz/report/statistics/tests/quiz_attempt_deleted_test.php @@ -34,7 +34,7 @@ use quiz_statistics\tests\statistics_test_trait; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics\quiz_attempt_deleted */ -class quiz_attempt_deleted_test extends \advanced_testcase { +final class quiz_attempt_deleted_test extends \advanced_testcase { use \quiz_question_helper_test_trait; use statistics_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php b/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php index 0170a3769fe..472f49eeee3 100644 --- a/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php +++ b/mod/quiz/report/statistics/tests/quiz_statistics_report_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \quiz_statistics_report */ -class quiz_statistics_report_test extends \advanced_testcase { +final class quiz_statistics_report_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php b/mod/quiz/report/statistics/tests/quiz_structure_modified_test.php index 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 1169112d545..645705f7742 100644 --- a/mod/quiz/report/statistics/tests/statistics_table_test.php +++ b/mod/quiz/report/statistics/tests/statistics_table_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/quiz/report/statistics/statistics_table.php') * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class statistics_table_test extends \advanced_testcase { +final class statistics_table_test extends \advanced_testcase { public function test_format_percentage() { $table = new quiz_statistics_table(); diff --git a/mod/quiz/report/statistics/tests/statistics_test.php b/mod/quiz/report/statistics/tests/statistics_test.php index ed9655fb980..b399085f3e1 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 8d55acfb1cc..33d7f05f2af 100644 --- a/mod/quiz/tests/attempt_test.php +++ b/mod/quiz/tests/attempt_test.php @@ -38,7 +38,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 1de3efb8732..a46506879e6 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 76dcc08c7f6..b013896b7f1 100644 --- a/mod/quiz/tests/backup/restore_date_test.php +++ b/mod/quiz/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/quiz/tests/calendar_event_modified_test.php b/mod/quiz/tests/calendar_event_modified_test.php index 542040123c7..9428435effd 100644 --- a/mod/quiz/tests/calendar_event_modified_test.php +++ b/mod/quiz/tests/calendar_event_modified_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/mod/quiz/lib.php'); * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class calendar_event_modified_test extends \advanced_testcase { +final class calendar_event_modified_test extends \advanced_testcase { /** * Create an instance of the quiz activity. diff --git a/mod/quiz/tests/custom_completion_test.php b/mod/quiz/tests/custom_completion_test.php index 5d8084d0066..d8a654b1cfa 100644 --- a/mod/quiz/tests/custom_completion_test.php +++ b/mod/quiz/tests/custom_completion_test.php @@ -40,7 +40,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_quiz\completion\custom_completion */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Setup function for all tests. diff --git a/mod/quiz/tests/dates_test.php b/mod/quiz/tests/dates_test.php index 5b0c135612c..e657b31527d 100644 --- a/mod/quiz/tests/dates_test.php +++ b/mod/quiz/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/quiz/tests/event/events_test.php b/mod/quiz/tests/event/events_test.php index 983f6af3361..d91a4b613c1 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 { /** * Setup a quiz. diff --git a/mod/quiz/tests/external/external_test.php b/mod/quiz/tests/external/external_test.php index 7db338f6ffb..b38008e2db3 100644 --- a/mod/quiz/tests/external/external_test.php +++ b/mod/quiz/tests/external/external_test.php @@ -85,7 +85,7 @@ class testable_mod_quiz_external extends mod_quiz_external { * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class external_test extends externallib_advanced_testcase { +final class external_test extends externallib_advanced_testcase { 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 2e5ec8cdea2..fd309ea86e1 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 76435349233..648ffc65faa 100644 --- a/mod/quiz/tests/generator_test.php +++ b/mod/quiz/tests/generator_test.php @@ -25,8 +25,8 @@ namespace mod_quiz; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \mod_quiz_generator */ -class generator_test extends \advanced_testcase { - public function test_generator() { +final class generator_test extends \advanced_testcase { + public function test_generator(): void { global $DB, $SITE; $this->resetAfterTest(true); diff --git a/mod/quiz/tests/lib_test.php b/mod/quiz/tests/lib_test.php index 540f34d74d0..f03a9ea1782 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() { diff --git a/mod/quiz/tests/local_structure_slot_random_test.php b/mod/quiz/tests/local_structure_slot_random_test.php index 3a29b7e5757..b9762b611c6 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 8e11b8cdd96..03ac642e434 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 742cb6c6726..b5ed13f544a 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 f34b01a0458..8b816c2a189 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 7fe1fb10f7a..0379c0814c1 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 21e245c8f06..2be905a3f15 100644 --- a/mod/quiz/tests/question/display_options_test.php +++ b/mod/quiz/tests/question/display_options_test.php @@ -30,8 +30,8 @@ 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 { - public function test_num_attempts_access_rule() { +final class display_options_test extends \basic_testcase { + public function test_num_attempts_access_rule(): void { $quiz = new \stdClass(); $quiz->decimalpoints = 2; $quiz->questiondecimalpoints = -1; 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 8a47453d41c..d3a4c6b7608 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 dff013c9526..86207f5ae34 100644 --- a/mod/quiz/tests/quiz_question_bank_view_test.php +++ b/mod/quiz/tests/quiz_question_bank_view_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @copyright 2018 the Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class quiz_question_bank_view_test extends \advanced_testcase { +final class quiz_question_bank_view_test extends \advanced_testcase { public function test_viewing_question_bank_should_not_load_individual_questions() { $this->resetAfterTest(); diff --git a/mod/quiz/tests/quiz_question_restore_test.php b/mod/quiz/tests/quiz_question_restore_test.php index f83c52dac72..66f0dcd5e27 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 e8d5d20e8df..54f727ea404 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 17fd9e3ad55..54b1e0c24ee 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 289eb7f8ea6..2e559db67f9 100644 --- a/mod/quiz/tests/reportlib_test.php +++ b/mod/quiz/tests/reportlib_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); * @copyright 2008 Jamie Pratt me@jamiep.org * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -class reportlib_test extends \advanced_testcase { - public function test_quiz_report_index_by_keys() { +final class reportlib_test extends \advanced_testcase { + public function test_quiz_report_index_by_keys(): void { $datum = []; $object = new \stdClass(); $object->qid = 3; diff --git a/mod/quiz/tests/restore_attempt_test.php b/mod/quiz/tests/restore_attempt_test.php index 5fd21c18c9b..46512a33366 100644 --- a/mod/quiz/tests/restore_attempt_test.php +++ b/mod/quiz/tests/restore_attempt_test.php @@ -28,7 +28,7 @@ use restore_dbops; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_attempt_test extends \advanced_testcase { +final class restore_attempt_test extends \advanced_testcase { /** * Load required libraries diff --git a/mod/quiz/tests/restore_override_test.php b/mod/quiz/tests/restore_override_test.php index 2773df5fdd5..1f117a3b49a 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 6e198469889..a542b7907dd 100644 --- a/mod/quiz/tests/structure_test.php +++ b/mod/quiz/tests/structure_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/quiz/tests/quiz_question_helper_test_trait.ph * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class structure_test extends \advanced_testcase { +final class structure_test extends \advanced_testcase { use \quiz_question_helper_test_trait; diff --git a/mod/quiz/tests/tags_test.php b/mod/quiz/tests/tags_test.php index e9fdfe6428f..c35cb4413f9 100644 --- a/mod/quiz/tests/tags_test.php +++ b/mod/quiz/tests/tags_test.php @@ -28,8 +28,8 @@ 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 { - public function test_restore_random_question_by_tag() { +final class tags_test extends \advanced_testcase { + public function test_restore_random_question_by_tag(): void { global $CFG, $USER, $DB; require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); diff --git a/mod/resource/tests/backup/restore_date_test.php b/mod/resource/tests/backup/restore_date_test.php index 40d311fe714..5dec86f155f 100644 --- a/mod/resource/tests/backup/restore_date_test.php +++ b/mod/resource/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/resource/tests/event/events_test.php b/mod/resource/tests/event/events_test.php index a60e695c6a0..e4869aca4b2 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 4b26c2fdbac..2a5c345703d 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 af6016a958d..0c0536d16bf 100644 --- a/mod/resource/tests/generator_test.php +++ b/mod/resource/tests/generator_test.php @@ -25,7 +25,7 @@ namespace mod_resource; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_generator() { global $DB, $SITE; diff --git a/mod/resource/tests/lib_test.php b/mod/resource/tests/lib_test.php index bb0945a0221..7282d3f173e 100644 --- a/mod/resource/tests/lib_test.php +++ b/mod/resource/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/resource/tests/search/search_test.php b/mod/resource/tests/search/search_test.php index 7bbd6cf29dc..5490f2b54b3 100644 --- a/mod/resource/tests/search/search_test.php +++ b/mod/resource/tests/search/search_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/scorm/report/basic/tests/privacy/provider_test.php b/mod/scorm/report/basic/tests/privacy/provider_test.php index 8d781849570..c158b2b1a46 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 c87dbcb45f4..2ff0e30826f 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 5f9c4ed9c0e..7e9eb2a9806 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 d82abaf96a7..36b56c9d366 100644 --- a/mod/scorm/tests/backup/restore_date_test.php +++ b/mod/scorm/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB, $USER; diff --git a/mod/scorm/tests/custom_completion_test.php b/mod/scorm/tests/custom_completion_test.php index fdb083d4282..7bf2af5be72 100644 --- a/mod/scorm/tests/custom_completion_test.php +++ b/mod/scorm/tests/custom_completion_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot.'/mod/scorm/locallib.php'); * @copyright 2021 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/scorm/tests/dates_test.php b/mod/scorm/tests/dates_test.php index f9cf79c1dcc..878bcbd091f 100644 --- a/mod/scorm/tests/dates_test.php +++ b/mod/scorm/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/scorm/tests/event/events_test.php b/mod/scorm/tests/event/events_test.php index 2828ad3797a..50a9592ef24 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 f6ef94c501a..3c2983a463b 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 606a346d0de..8d655a8e90a 100644 --- a/mod/scorm/tests/formatduration_test.php +++ b/mod/scorm/tests/formatduration_test.php @@ -30,8 +30,8 @@ require_once($CFG->dirroot . '/mod/scorm/locallib.php'); // Include the code to * @copyright 2009 Dan Marsden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formatduration_test extends \basic_testcase { - public function test_scorm2004_format() { +final class formatduration_test extends \basic_testcase { + public function test_scorm2004_format(): void { $stryears = get_string('years'); $strmonths = trim(get_string('nummonths')); $strdays = get_string('days'); diff --git a/mod/scorm/tests/generator_test.php b/mod/scorm/tests/generator_test.php index 7ba6cefba43..ae67c0a64f9 100644 --- a/mod/scorm/tests/generator_test.php +++ b/mod/scorm/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_scorm; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB, $CFG, $USER; diff --git a/mod/scorm/tests/lib_test.php b/mod/scorm/tests/lib_test.php index 92453b73a37..1fda231cd3e 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 6f7093a50c4..928d7474ac7 100644 --- a/mod/scorm/tests/locallib_test.php +++ b/mod/scorm/tests/locallib_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/mod/scorm/tests/privacy/provider_test.php b/mod/scorm/tests/privacy/provider_test.php index 8182ab90ed6..b730cb04c97 100644 --- a/mod/scorm/tests/privacy/provider_test.php +++ b/mod/scorm/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Sara Arjona * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var stdClass User without any AICC/SCORM attempt. */ protected $student0; diff --git a/mod/scorm/tests/validatepackage_test.php b/mod/scorm/tests/validatepackage_test.php index 69bb4e723c3..5bc7871d962 100644 --- a/mod/scorm/tests/validatepackage_test.php +++ b/mod/scorm/tests/validatepackage_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/mod/scorm/locallib.php'); * @copyright 2013 Dan Marsden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class validatepackage_test extends \advanced_testcase { +final class validatepackage_test extends \advanced_testcase { /** * Convenience to take a fixture test file and create a stored_file. diff --git a/mod/survey/tests/backup/restore_date_test.php b/mod/survey/tests/backup/restore_date_test.php index c8720d929e0..4adaab8e975 100644 --- a/mod/survey/tests/backup/restore_date_test.php +++ b/mod/survey/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { public function test_restore_dates() { global $DB; diff --git a/mod/survey/tests/custom_completion_test.php b/mod/survey/tests/custom_completion_test.php index 98373d8e05b..a9562b70341 100644 --- a/mod/survey/tests/custom_completion_test.php +++ b/mod/survey/tests/custom_completion_test.php @@ -44,7 +44,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @copyright Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class custom_completion_test extends advanced_testcase { +final class custom_completion_test extends advanced_testcase { /** * Data provider for get_state(). diff --git a/mod/survey/tests/event/events_test.php b/mod/survey/tests/event/events_test.php index cf5bd501c80..73bf22de4ad 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 105bfd64ff8..8468ceeb279 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 841c497db3e..c8dc47000bf 100644 --- a/mod/survey/tests/generator_test.php +++ b/mod/survey/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_survey; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/survey/tests/lib_test.php b/mod/survey/tests/lib_test.php index 8b874b2e7ac..8b2499040b3 100644 --- a/mod/survey/tests/lib_test.php +++ b/mod/survey/tests/lib_test.php @@ -37,7 +37,7 @@ defined('MOODLE_INTERNAL') || die(); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.0 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/survey/tests/privacy/provider_test.php b/mod/survey/tests/privacy/provider_test.php index ef3e32c035f..c5763a106d1 100644 --- a/mod/survey/tests/privacy/provider_test.php +++ b/mod/survey/tests/privacy/provider_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/mod/survey/lib.php'); * @author Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { public function setUp(): void { global $PAGE; diff --git a/mod/survey/tests/search/search_test.php b/mod/survey/tests/search/search_test.php index 709be295a8a..999524b3d6c 100644 --- a/mod/survey/tests/search/search_test.php +++ b/mod/survey/tests/search/search_test.php @@ -37,7 +37,7 @@ namespace mod_survey\search; * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test survey_view diff --git a/mod/url/tests/externallib_test.php b/mod/url/tests/externallib_test.php index 50bf5f40a08..430bb29ae26 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 ecb983d2464..70cfa0b81b3 100644 --- a/mod/url/tests/generator_test.php +++ b/mod/url/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_url; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/url/tests/lib_test.php b/mod/url/tests/lib_test.php index f23e121b2e1..30203ceff36 100644 --- a/mod/url/tests/lib_test.php +++ b/mod/url/tests/lib_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2011 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Prepares things before this test case is initialised diff --git a/mod/wiki/tests/backup/restore_date_test.php b/mod/wiki/tests/backup/restore_date_test.php index 5de3d6c8a60..e8abb132127 100644 --- a/mod/wiki/tests/backup/restore_date_test.php +++ b/mod/wiki/tests/backup/restore_date_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/wiki/tests/backup/restore_format_test.php b/mod/wiki/tests/backup/restore_format_test.php index 0c4ff22f62a..c27cc5eae58 100644 --- a/mod/wiki/tests/backup/restore_format_test.php +++ b/mod/wiki/tests/backup/restore_format_test.php @@ -24,7 +24,7 @@ namespace mod_wiki\backup; * * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_format_test extends \advanced_testcase { +final class restore_format_test extends \advanced_testcase { /** * Data provider for test_duplicating_wiki_removes_unwanted_formats. diff --git a/mod/wiki/tests/event/events_test.php b/mod/wiki/tests/event/events_test.php index e1363b6722d..711205c3e26 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 e8d0775a5ad..656fd91e6f8 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 601b2d1bdcb..444c1327b0a 100644 --- a/mod/wiki/tests/generator_test.php +++ b/mod/wiki/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_wiki; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/wiki/tests/lib_test.php b/mod/wiki/tests/lib_test.php index 88aa4105d4a..625b6e1aae4 100644 --- a/mod/wiki/tests/lib_test.php +++ b/mod/wiki/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->libdir . '/completionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 3.1 */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test wiki_view. diff --git a/mod/wiki/tests/privacy/provider_test.php b/mod/wiki/tests/privacy/provider_test.php index be61e2e21b6..ac26818dfe2 100644 --- a/mod/wiki/tests/privacy/provider_test.php +++ b/mod/wiki/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot.'/mod/wiki/locallib.php'); * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var array */ protected $users = []; diff --git a/mod/wiki/tests/search/search_test.php b/mod/wiki/tests/search/search_test.php index 29d97934c04..14ab1a62e36 100644 --- a/mod/wiki/tests/search/search_test.php +++ b/mod/wiki/tests/search/search_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/mod/wiki/tests/wikiparser_test.php b/mod/wiki/tests/wikiparser_test.php index d878a9e4338..8b35c578a12 100644 --- a/mod/wiki/tests/wikiparser_test.php +++ b/mod/wiki/tests/wikiparser_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/wiki/parser/parser.php'); * * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class wikiparser_test extends \advanced_testcase { +final class wikiparser_test extends \advanced_testcase { /** * URL inside the clickable text of some link should not be turned into a new link via the url_tag_rule. diff --git a/mod/workshop/allocation/manual/tests/privacy/provider_test.php b/mod/workshop/allocation/manual/tests/privacy/provider_test.php index c3a05324daa..024bd8fb744 100644 --- a/mod/workshop/allocation/manual/tests/privacy/provider_test.php +++ b/mod/workshop/allocation/manual/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. diff --git a/mod/workshop/allocation/random/tests/allocator_test.php b/mod/workshop/allocation/random/tests/allocator_test.php index b8d3914e0f6..f1d1386093e 100644 --- a/mod/workshop/allocation/random/tests/allocator_test.php +++ b/mod/workshop/allocation/random/tests/allocator_test.php @@ -43,7 +43,7 @@ require_once($CFG->dirroot . '/mod/workshop/allocation/random/lib.php'); * @copyright 2009 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class allocator_test extends \advanced_testcase { +final class allocator_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php b/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php index d227143fab1..cf65e510035 100644 --- a/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php +++ b/mod/workshop/allocation/scheduled/tests/scheduled_allocator_test.php @@ -23,7 +23,7 @@ namespace workshopallocation_scheduled; * @copyright 2020 Jaume I University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scheduled_allocator_test extends \advanced_testcase { +final class scheduled_allocator_test extends \advanced_testcase { /** @var \stdClass $course The course where the tests will be run */ private $course; diff --git a/mod/workshop/eval/best/tests/lib_test.php b/mod/workshop/eval/best/tests/lib_test.php index 21208ce662a..bd24e68d097 100644 --- a/mod/workshop/eval/best/tests/lib_test.php +++ b/mod/workshop/eval/best/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->libdir . '/gradelib.php'); /** * Unit tests for grading evaluation lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/accumulative/tests/lib_test.php b/mod/workshop/form/accumulative/tests/lib_test.php index 5c609de73fd..e1d9d73ea39 100644 --- a/mod/workshop/form/accumulative/tests/lib_test.php +++ b/mod/workshop/form/accumulative/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/accumulative/lib.php'); /** * Unit tests for Accumulative grading strategy lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/accumulative/tests/privacy/provider_test.php b/mod/workshop/form/accumulative/tests/privacy/provider_test.php index b3b4f3eeb7b..3b51f6d35b3 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 e0771b6abe7..f99a9a02bc2 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 931c4649759..8f10b5ba9de 100644 --- a/mod/workshop/form/numerrors/tests/lib_test.php +++ b/mod/workshop/form/numerrors/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/numerrors/lib.php'); /** * Unit tests for Number of errors grading lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/numerrors/tests/privacy/provider_test.php b/mod/workshop/form/numerrors/tests/privacy/provider_test.php index d574cd58951..3b40e9b39ea 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 803e8ef0be1..78b19151d4a 100644 --- a/mod/workshop/form/rubric/tests/lib_test.php +++ b/mod/workshop/form/rubric/tests/lib_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/workshop/form/rubric/lib.php'); /** * Unit tests for Rubric grading strategy lib.php */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** workshop instance emulation */ protected $workshop; diff --git a/mod/workshop/form/rubric/tests/privacy/provider_test.php b/mod/workshop/form/rubric/tests/privacy/provider_test.php index 817ae122829..b9eccd21f10 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 2c58be0a81f..261e337b0a7 100644 --- a/mod/workshop/tests/backup/restore_date_test.php +++ b/mod/workshop/tests/backup/restore_date_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . "/mod/workshop/tests/fixtures/testable.php"); * @copyright 2017 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_date_test extends \restore_date_testcase { +final class restore_date_test extends \restore_date_testcase { /** * Test restore dates. diff --git a/mod/workshop/tests/dates_test.php b/mod/workshop/tests/dates_test.php index 3c49437bf81..b3c8c112f78 100644 --- a/mod/workshop/tests/dates_test.php +++ b/mod/workshop/tests/dates_test.php @@ -37,7 +37,7 @@ use core\activity_dates; * @copyright 2021 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class dates_test extends advanced_testcase { +final class dates_test extends advanced_testcase { /** * Data provider for get_dates_for_module(). diff --git a/mod/workshop/tests/event/events_test.php b/mod/workshop/tests/event/events_test.php index b8c1ae77ce0..afcd9863213 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 8b1d0b80fe9..b3a2d7cd044 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 efa2b7ca8b5..bc82786352a 100644 --- a/mod/workshop/tests/generator_test.php +++ b/mod/workshop/tests/generator_test.php @@ -24,7 +24,7 @@ namespace mod_workshop; * @copyright 2013 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_instance() { global $DB; diff --git a/mod/workshop/tests/lib_test.php b/mod/workshop/tests/lib_test.php index eddb14b9c53..7be1fa9564b 100644 --- a/mod/workshop/tests/lib_test.php +++ b/mod/workshop/tests/lib_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/workshop/lib.php'); * @copyright 2017 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test calendar event provide action open. diff --git a/mod/workshop/tests/locallib_test.php b/mod/workshop/tests/locallib_test.php index 802163fcf58..3ee885e37a0 100644 --- a/mod/workshop/tests/locallib_test.php +++ b/mod/workshop/tests/locallib_test.php @@ -39,7 +39,7 @@ require_once(__DIR__ . '/fixtures/testable.php'); /** * Test cases for the internal workshop api */ -class locallib_test extends \advanced_testcase { +final class locallib_test extends \advanced_testcase { /** @var object */ protected $course; diff --git a/mod/workshop/tests/portfolio_caller_test.php b/mod/workshop/tests/portfolio_caller_test.php index 195f9101eb2..ff4da301f9a 100644 --- a/mod/workshop/tests/portfolio_caller_test.php +++ b/mod/workshop/tests/portfolio_caller_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/mod/workshop/classes/portfolio_caller.php'); * @copyright 2016 An Pham Van * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class portfolio_caller_test extends \advanced_testcase { +final class portfolio_caller_test extends \advanced_testcase { /** @var \stdClass $workshop Basic workshop data stored in an object. */ protected $workshop; diff --git a/mod/workshop/tests/privacy/provider_test.php b/mod/workshop/tests/privacy/provider_test.php index a33272fab4e..99e630297d8 100644 --- a/mod/workshop/tests/privacy/provider_test.php +++ b/mod/workshop/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** @var testing_data_generator */ protected $generator; diff --git a/mod/workshop/tests/task/cron_task_test.php b/mod/workshop/tests/task/cron_task_test.php index 68f8cae17d9..f3cee355d1e 100644 --- a/mod/workshop/tests/task/cron_task_test.php +++ b/mod/workshop/tests/task/cron_task_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/mod/workshop/lib.php'); * @copyright 2019 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cron_task_test extends \advanced_testcase { +final class cron_task_test extends \advanced_testcase { /** * Test that the phase is automatically switched after the submissions deadline. diff --git a/my/tests/event/events_test.php b/my/tests/event/events_test.php index 3b7c486a6f4..0697e68c906 100644 --- a/my/tests/event/events_test.php +++ b/my/tests/event/events_test.php @@ -27,7 +27,7 @@ use context_user; * @copyright 2016 Stephen Bourget * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** @var user cobject */ protected $user; diff --git a/my/tests/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 88feb2f3862..eec73504b9b 100644 --- a/my/tests/privacy/provider_test.php +++ b/my/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_my\privacy\provider; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Test for provider::test_export_user_preferences(). diff --git a/notes/tests/event/events_test.php b/notes/tests/event/events_test.php index c449a3630bb..18fab298798 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 e425ac191cd..64269bdec52 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 b8eafd0f6b5..3516212e497 100644 --- a/notes/tests/generator_test.php +++ b/notes/tests/generator_test.php @@ -31,7 +31,7 @@ namespace core_notes; * @copyright 2013 Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** Test create_instance method */ public function test_create_instance() { diff --git a/notes/tests/lib_test.php b/notes/tests/lib_test.php index 2ec419bfdd0..b9bb4e3d52f 100644 --- a/notes/tests/lib_test.php +++ b/notes/tests/lib_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/notes/lib.php'); * @copyright 2015 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/notes/tests/privacy/provider_test.php b/notes/tests/privacy/provider_test.php index 632e0ba7f9f..fa2042d318a 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 afd03dcfee7..b09657576c4 100644 --- a/payment/tests/generator_test.php +++ b/payment/tests/generator_test.php @@ -33,7 +33,7 @@ namespace core_payment; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { public function test_create_account() { global $DB; diff --git a/payment/tests/helper_test.php b/payment/tests/helper_test.php index eb9e9b5a025..491716fc2bb 100644 --- a/payment/tests/helper_test.php +++ b/payment/tests/helper_test.php @@ -36,7 +36,7 @@ use core\plugininfo\paygw; * @copyright 2020 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends advanced_testcase { +final class helper_test extends advanced_testcase { protected function enable_paypal_gateway(): bool { if (!array_key_exists('paypal', \core_component::get_plugin_list('paygw'))) { diff --git a/plagiarism/tests/privacy/legacy_polyfill_test.php b/plagiarism/tests/privacy/legacy_polyfill_test.php index 9072b28ea32..b7a1697572a 100644 --- a/plagiarism/tests/privacy/legacy_polyfill_test.php +++ b/plagiarism/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_plagiarism\privacy\legacy_polyfill works and that the static _export_plagiarism_user_data can be called. */ diff --git a/portfolio/flickr/tests/privacy/provider_test.php b/portfolio/flickr/tests/privacy/provider_test.php index 99fac592a19..2c40697f6ef 100644 --- a/portfolio/flickr/tests/privacy/provider_test.php +++ b/portfolio/flickr/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/googledocs/tests/plugin_test.php b/portfolio/googledocs/tests/plugin_test.php index faedd4073fe..6be051e284e 100644 --- a/portfolio/googledocs/tests/plugin_test.php +++ b/portfolio/googledocs/tests/plugin_test.php @@ -32,7 +32,7 @@ require_once($CFG->libdir . '/portfolio/forms.php'); * @copyright 2016 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class plugin_test extends \advanced_testcase { +final class plugin_test extends \advanced_testcase { /** @var string name of the portfolio plugin */ protected $pluginname = 'googledocs'; diff --git a/portfolio/googledocs/tests/privacy/provider_test.php b/portfolio/googledocs/tests/privacy/provider_test.php index e5e7e5d9934..3fdba63c1bb 100644 --- a/portfolio/googledocs/tests/privacy/provider_test.php +++ b/portfolio/googledocs/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/mahara/tests/privacy/provider_test.php b/portfolio/mahara/tests/privacy/provider_test.php index 5b7e8c18907..b130b0132b8 100644 --- a/portfolio/mahara/tests/privacy/provider_test.php +++ b/portfolio/mahara/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/portfolio/tests/privacy/legacy_polyfill_test.php b/portfolio/tests/privacy/legacy_polyfill_test.php index 621f7432e33..4839e7cd560 100644 --- a/portfolio/tests/privacy/legacy_polyfill_test.php +++ b/portfolio/tests/privacy/legacy_polyfill_test.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_portfolio\privacy\legacy_polyfill works and that the static _export_portfolio_user_data can be called. */ diff --git a/portfolio/tests/privacy/provider_test.php b/portfolio/tests/privacy/provider_test.php index b654da1efd9..c29464bd908 100644 --- a/portfolio/tests/privacy/provider_test.php +++ b/portfolio/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { protected function create_portfolio_data($plugin, $name, $user, $preference, $value) { global $DB; diff --git a/privacy/tests/approved_contextlist_test.php b/privacy/tests/approved_contextlist_test.php index a5057f0232d..ba2d33f01d9 100644 --- a/privacy/tests/approved_contextlist_test.php +++ b/privacy/tests/approved_contextlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\approved_contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\approved_contextlist */ -class approved_contextlist_test extends advanced_testcase { +final class approved_contextlist_test extends advanced_testcase { /** * The approved contextlist should not be modifiable once set. diff --git a/privacy/tests/approved_userlist_test.php b/privacy/tests/approved_userlist_test.php index f78e4414507..2a17ad02d7a 100644 --- a/privacy/tests/approved_userlist_test.php +++ b/privacy/tests/approved_userlist_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\approved_userlist */ -class approved_userlist_test extends advanced_testcase { +final class approved_userlist_test extends advanced_testcase { /** * The approved userlist should not be modifiable once set. * diff --git a/privacy/tests/collection_test.php b/privacy/tests/collection_test.php index 9a7c482c706..ee308616eba 100644 --- a/privacy/tests/collection_test.php +++ b/privacy/tests/collection_test.php @@ -32,7 +32,7 @@ use core_privacy\local\metadata\types; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\collection */ -class collection_test extends \advanced_testcase { +final class collection_test extends \advanced_testcase { /** * Test that adding an unknown type causes the type to be added to the collection. diff --git a/privacy/tests/contextlist_base_test.php b/privacy/tests/contextlist_base_test.php index bdef2e312c4..5e7b83d860e 100644 --- a/privacy/tests/contextlist_base_test.php +++ b/privacy/tests/contextlist_base_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\contextlist_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist_base */ -class contextlist_base_test extends advanced_testcase { +final class contextlist_base_test extends advanced_testcase { /** * Ensure that get_contextids returns the list of unique contextids. * diff --git a/privacy/tests/contextlist_collection_test.php b/privacy/tests/contextlist_collection_test.php index 2d75eb8f360..0b221a25c29 100644 --- a/privacy/tests/contextlist_collection_test.php +++ b/privacy/tests/contextlist_collection_test.php @@ -38,7 +38,7 @@ use \core_privacy\local\request\approved_contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist_collection */ -class contextlist_collection_test extends advanced_testcase { +final class contextlist_collection_test extends advanced_testcase { /** * A contextlist_collection should support the contextlist type. * diff --git a/privacy/tests/contextlist_test.php b/privacy/tests/contextlist_test.php index a7038d0066c..d77a66c580d 100644 --- a/privacy/tests/contextlist_test.php +++ b/privacy/tests/contextlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\contextlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\contextlist */ -class contextlist_test extends advanced_testcase { +final class contextlist_test extends advanced_testcase { /** * Ensure that valid SQL results in the relevant contexts being added. diff --git a/privacy/tests/legacy_polyfill_test.php b/privacy/tests/legacy_polyfill_test.php index a56d5545ab6..8b37e1ca2eb 100644 --- a/privacy/tests/legacy_polyfill_test.php +++ b/privacy/tests/legacy_polyfill_test.php @@ -42,7 +42,7 @@ global $CFG; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\legacy_polyfill */ -class legacy_polyfill_test extends \advanced_testcase { +final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the null_provider polyfill works and that the static _get_reason can be * successfully called. diff --git a/privacy/tests/manager_test.php b/privacy/tests/manager_test.php index c91002e8ab8..06924339dca 100644 --- a/privacy/tests/manager_test.php +++ b/privacy/tests/manager_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/privacy/tests/fixtures/provider_throwing_exceptio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\manager */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Test tearDown. */ diff --git a/privacy/tests/moodle_content_writer_test.php b/privacy/tests/moodle_content_writer_test.php index 939ef1dd546..2ee9c756e91 100644 --- a/privacy/tests/moodle_content_writer_test.php +++ b/privacy/tests/moodle_content_writer_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\moodle_content_writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\moodle_content_writer */ -class moodle_content_writer_test extends advanced_testcase { +final class moodle_content_writer_test extends advanced_testcase { /** * Test that exported data is saved correctly within the system context. diff --git a/privacy/tests/privacy/provider_test.php b/privacy/tests/privacy/provider_test.php index 87125bba89c..44de755e5a5 100644 --- a/privacy/tests/privacy/provider_test.php +++ b/privacy/tests/privacy/provider_test.php @@ -40,7 +40,7 @@ use core_privacy\local\metadata\types\user_preference; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \advanced_testcase { +final class provider_test extends \advanced_testcase { /** * Returns a list of frankenstyle names of core components (plugins and subsystems). * diff --git a/privacy/tests/request_helper_test.php b/privacy/tests/request_helper_test.php index 62f100960d1..dfc1d7d02fb 100644 --- a/privacy/tests/request_helper_test.php +++ b/privacy/tests/request_helper_test.php @@ -37,7 +37,7 @@ use \core_privacy\local\request\writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\helper */ -class request_helper_test extends advanced_testcase { +final class request_helper_test extends advanced_testcase { /** * Test that basic module data is returned. * diff --git a/privacy/tests/request_transform_test.php b/privacy/tests/request_transform_test.php index da5505a7768..a97eb63c8c9 100644 --- a/privacy/tests/request_transform_test.php +++ b/privacy/tests/request_transform_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\transform; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\transform */ -class request_transform_test extends advanced_testcase { +final class request_transform_test extends advanced_testcase { /** * Test that user translation currently does nothing. * diff --git a/privacy/tests/sitepolicy_test.php b/privacy/tests/sitepolicy_test.php index 157d62a36b2..06bc69b5cc5 100644 --- a/privacy/tests/sitepolicy_test.php +++ b/privacy/tests/sitepolicy_test.php @@ -35,7 +35,7 @@ global $CFG; * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class sitepolicy_test extends advanced_testcase { +final class sitepolicy_test extends advanced_testcase { /** diff --git a/privacy/tests/tests_content_writer_test.php b/privacy/tests/tests_content_writer_test.php index f3a86984995..8c3f181be62 100644 --- a/privacy/tests/tests_content_writer_test.php +++ b/privacy/tests/tests_content_writer_test.php @@ -36,7 +36,7 @@ use \core_privacy\tests\request\content_writer; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tests_content_writer_test extends advanced_testcase { +final class tests_content_writer_test extends advanced_testcase { /** * It should be possible to store and retrieve data. diff --git a/privacy/tests/types_database_table_test.php b/privacy/tests/types_database_table_test.php index 714a6b5faf9..e92a7a219e2 100644 --- a/privacy/tests/types_database_table_test.php +++ b/privacy/tests/types_database_table_test.php @@ -31,7 +31,7 @@ global $CFG; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\database_table */ -class types_database_table_test extends \advanced_testcase { +final class types_database_table_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_external_location_test.php b/privacy/tests/types_external_location_test.php index 34bfa71e52d..f0d40004e8c 100644 --- a/privacy/tests/types_external_location_test.php +++ b/privacy/tests/types_external_location_test.php @@ -31,7 +31,7 @@ use core_privacy\local\metadata\types\external_location; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\external_location */ -class types_external_location_test extends \advanced_testcase { +final class types_external_location_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_plugintype_link_test.php b/privacy/tests/types_plugintype_link_test.php index e268941a19b..6f6c37494f1 100644 --- a/privacy/tests/types_plugintype_link_test.php +++ b/privacy/tests/types_plugintype_link_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\plugintype_link; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\plugintype_link */ -class types_plugintype_link_test extends \advanced_testcase { +final class types_plugintype_link_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_subsystem_link_test.php b/privacy/tests/types_subsystem_link_test.php index aaace71ae41..c4b022e7fa4 100644 --- a/privacy/tests/types_subsystem_link_test.php +++ b/privacy/tests/types_subsystem_link_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\subsystem_link; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\subsystem_link */ -class types_subsystem_link_test extends \advanced_testcase { +final class types_subsystem_link_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/types_user_preference_test.php b/privacy/tests/types_user_preference_test.php index c0c12b4a64b..3b08b582060 100644 --- a/privacy/tests/types_user_preference_test.php +++ b/privacy/tests/types_user_preference_test.php @@ -27,7 +27,7 @@ use core_privacy\local\metadata\types\user_preference; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\metadata\types\user_preference */ -class types_user_preference_test extends \advanced_testcase { +final class types_user_preference_test extends \advanced_testcase { /** * Ensure that warnings are thrown if string identifiers contain invalid characters. diff --git a/privacy/tests/userlist_base_test.php b/privacy/tests/userlist_base_test.php index 9e8ffaf39d1..dc9be852415 100644 --- a/privacy/tests/userlist_base_test.php +++ b/privacy/tests/userlist_base_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\userlist_base; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\userlist_base */ -class userlist_base_test extends advanced_testcase { +final class userlist_base_test extends advanced_testcase { /** * Ensure that get_userids returns the list of unique userids. * diff --git a/privacy/tests/userlist_test.php b/privacy/tests/userlist_test.php index 8df9c97c82a..4b9322818c7 100644 --- a/privacy/tests/userlist_test.php +++ b/privacy/tests/userlist_test.php @@ -36,7 +36,7 @@ use \core_privacy\local\request\userlist; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\userlist */ -class userlist_test extends advanced_testcase { +final class userlist_test extends advanced_testcase { /** * Ensure that valid SQL results in the relevant users being added. diff --git a/privacy/tests/writer_test.php b/privacy/tests/writer_test.php index 47960afd270..7991d2a8e14 100644 --- a/privacy/tests/writer_test.php +++ b/privacy/tests/writer_test.php @@ -40,7 +40,7 @@ use \core_privacy\local\request\writer; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_privacy\local\request\writer */ -class writer_test extends advanced_testcase { +final class writer_test extends advanced_testcase { /** * Ensure that the writer is cleared away as appropriate after each * test. diff --git a/question/bank/bulkmove/tests/helper_test.php b/question/bank/bulkmove/tests/helper_test.php index 7b6fa71c634..21ff1bbe4d4 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 bff2d5df975..6fb2b81c002 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 6c5f303ed03..bd83d04aaff 100644 --- a/question/bank/comment/tests/backup_test.php +++ b/question/bank/comment/tests/backup_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot. '/comment/lib.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * @var array Data object for generating a question. diff --git a/question/bank/comment/tests/event/comment_created_deleted_test.php b/question/bank/comment/tests/event/comment_created_deleted_test.php index 16007badad3..ada80d78469 100644 --- a/question/bank/comment/tests/event/comment_created_deleted_test.php +++ b/question/bank/comment/tests/event/comment_created_deleted_test.php @@ -32,7 +32,7 @@ use stdClass; * @author Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class comment_created_deleted_test extends advanced_testcase { +final class comment_created_deleted_test extends advanced_testcase { /** @var stdClass Keeps course object */ private $course; diff --git a/question/bank/comment/tests/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 f1dcc8098da..63fc564578e 100644 --- a/question/bank/comment/tests/lib_test.php +++ b/question/bank/comment/tests/lib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/bank/comment/lib.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Test the comment validation callback. diff --git a/question/bank/comment/tests/privacy/provider_test.php b/question/bank/comment/tests/privacy/provider_test.php index c80e4939a63..4b02af8cfdb 100644 --- a/question/bank/comment/tests/privacy/provider_test.php +++ b/question/bank/comment/tests/privacy/provider_test.php @@ -32,7 +32,7 @@ use stdClass; * @author Safat Shahin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass A teacher who is only enrolled in course1. */ protected $teacher1; diff --git a/question/bank/customfields/tests/customfield_test.php b/question/bank/customfields/tests/customfield_test.php index 962ba0c8f6a..852def1058a 100644 --- a/question/bank/customfields/tests/customfield_test.php +++ b/question/bank/customfields/tests/customfield_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @author Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class customfield_test extends \advanced_testcase { +final class customfield_test extends \advanced_testcase { /** * @var array Data object for generating a question. diff --git a/question/bank/customfields/tests/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 3af3f6d42b5..508c5bc1a69 100644 --- a/question/bank/deletequestion/tests/helper_test.php +++ b/question/bank/deletequestion/tests/helper_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2023 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * @var \context_module module context. diff --git a/question/bank/editquestion/tests/external/update_question_version_status_test.php b/question/bank/editquestion/tests/external/update_question_version_status_test.php index 189444425ee..dec557b2218 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 fde535a2d13..15aed236a80 100644 --- a/question/bank/exporttoxml/tests/helper_test.php +++ b/question/bank/exporttoxml/tests/helper_test.php @@ -30,7 +30,7 @@ use question_bank; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_exporttoxml\helper */ -class helper_test extends \advanced_testcase { +final class helper_test extends \advanced_testcase { /** * Test the export single question url. diff --git a/question/bank/history/tests/helper_test.php b/question/bank/history/tests/helper_test.php index d68d65cae32..c745c55eeaa 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 122a238d274..b3c341f933c 100644 --- a/question/bank/history/tests/question_history_view_test.php +++ b/question/bank/history/tests/question_history_view_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_history\question_history_view */ -class question_history_view_test extends \advanced_testcase { +final class question_history_view_test extends \advanced_testcase { /** * Test that the history page shows all the versions of a question. diff --git a/question/bank/managecategories/tests/question_category_object_test.php b/question/bank/managecategories/tests/question_category_object_test.php index 398a769cd3a..3eef0177f3d 100644 --- a/question/bank/managecategories/tests/question_category_object_test.php +++ b/question/bank/managecategories/tests/question_category_object_test.php @@ -37,7 +37,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_managecategories\question_category_object */ -class question_category_object_test extends \advanced_testcase { +final class question_category_object_test extends \advanced_testcase { /** * @var question_category_object used in the tests. diff --git a/question/bank/previewquestion/tests/qbank_preview_helper_test.php b/question/bank/previewquestion/tests/qbank_preview_helper_test.php index dbb4d509d13..dc4545ee848 100644 --- a/question/bank/previewquestion/tests/qbank_preview_helper_test.php +++ b/question/bank/previewquestion/tests/qbank_preview_helper_test.php @@ -32,7 +32,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \qbank_previewquestion\helper */ -class qbank_preview_helper_test extends \advanced_testcase { +final class qbank_preview_helper_test extends \advanced_testcase { /** * @var bool|\context|\context_course $context diff --git a/question/bank/statistics/tests/helper_test.php b/question/bank/statistics/tests/helper_test.php index 8f9e72befae..dcfefb239b3 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 dbe24e69813..f838d22bddd 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 efab696af7c..3fb86ea32b3 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 0583bf911d4..1933aba5a1a 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 ffc5badf4bc..45d683b6bed 100644 --- a/question/behaviour/adaptive/tests/behaviour_type_test.php +++ b/question/behaviour/adaptive/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_adaptive_type */ protected $behaviourtype; diff --git a/question/behaviour/adaptive/tests/mark_display_test.php b/question/behaviour/adaptive/tests/mark_display_test.php index 1a6678b7c75..8a4da207a3e 100644 --- a/question/behaviour/adaptive/tests/mark_display_test.php +++ b/question/behaviour/adaptive/tests/mark_display_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../behaviour.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class mark_display_test extends \basic_testcase { +final class mark_display_test extends \basic_testcase { /** @var qbehaviour_adaptive_renderer the renderer to test. */ protected $renderer; diff --git a/question/behaviour/adaptive/tests/walkthrough_test.php b/question/behaviour/adaptive/tests/walkthrough_test.php index f91e26d6fd5..c81fd21e5d5 100644 --- a/question/behaviour/adaptive/tests/walkthrough_test.php +++ b/question/behaviour/adaptive/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_penalty_info_expectation($penalty) { $penaltyinfo = get_string('gradingdetailspenalty', 'qbehaviour_adaptive', format_float($penalty, $this->displayoptions->markdp)); diff --git a/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php b/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php index 24a9687670b..7c0f4ecf40c 100644 --- a/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php +++ b/question/behaviour/adaptivenopenalty/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_does_not_contain_gradingdetails_expectation() { return new \question_no_pattern_expectation('/class="gradingdetails"/'); diff --git a/question/behaviour/deferredcbm/tests/behaviour_type_test.php b/question/behaviour/deferredcbm/tests/behaviour_type_test.php index 6cff5fef789..b39bdcfb68e 100644 --- a/question/behaviour/deferredcbm/tests/behaviour_type_test.php +++ b/question/behaviour/deferredcbm/tests/behaviour_type_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_deferredcbm_type */ protected $behaviourtype; diff --git a/question/behaviour/deferredcbm/tests/question_cbm_test.php b/question/behaviour/deferredcbm/tests/question_cbm_test.php index d098606c0f7..db20d5c2330 100644 --- a/question/behaviour/deferredcbm/tests/question_cbm_test.php +++ b/question/behaviour/deferredcbm/tests/question_cbm_test.php @@ -30,7 +30,7 @@ require_once(__DIR__ . '/../../../engine/lib.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_cbm_test extends \basic_testcase { +final class question_cbm_test extends \basic_testcase { public function test_adjust_fraction() { $this->assertEqualsWithDelta( 1, question_cbm::adjust_fraction( 1, question_cbm::LOW), 0.0000001); diff --git a/question/behaviour/deferredcbm/tests/walkthrough_test.php b/question/behaviour/deferredcbm/tests/walkthrough_test.php index c5a3bad1b9b..c7b599bb957 100644 --- a/question/behaviour/deferredcbm/tests/walkthrough_test.php +++ b/question/behaviour/deferredcbm/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferred_cbm_truefalse_high_certainty() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferred_cbm_truefalse_high_certainty(): void { // Create a true-false question with correct answer true. $tf = \test_question_maker::make_question('truefalse', 'true'); diff --git a/question/behaviour/deferredfeedback/tests/behaviour_type_test.php b/question/behaviour/deferredfeedback/tests/behaviour_type_test.php index 858a3908946..577ddcbb0cc 100644 --- a/question/behaviour/deferredfeedback/tests/behaviour_type_test.php +++ b/question/behaviour/deferredfeedback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_deferredfeedback_type */ protected $behaviourtype; diff --git a/question/behaviour/deferredfeedback/tests/walkthrough_test.php b/question/behaviour/deferredfeedback/tests/walkthrough_test.php index 8441574e3e1..bbfaee170ec 100644 --- a/question/behaviour/deferredfeedback/tests/walkthrough_test.php +++ b/question/behaviour/deferredfeedback/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferredfeedback_feedback_truefalse() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferredfeedback_feedback_truefalse(): void { // Create a true-false question with correct answer true. $tf = \test_question_maker::make_question('truefalse', 'true'); diff --git a/question/behaviour/immediatecbm/tests/behaviour_type_test.php b/question/behaviour/immediatecbm/tests/behaviour_type_test.php index 237a91471dd..f8c6dda7ea7 100644 --- a/question/behaviour/immediatecbm/tests/behaviour_type_test.php +++ b/question/behaviour/immediatecbm/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \qbehaviour_walkthrough_test_base { +final class behaviour_type_test extends \qbehaviour_walkthrough_test_base { /** @var qbehaviour_immediatecbm_type */ protected $behaviourtype; diff --git a/question/behaviour/immediatecbm/tests/walkthrough_test.php b/question/behaviour/immediatecbm/tests/walkthrough_test.php index 790b5583d5b..b02bc9793a4 100644 --- a/question/behaviour/immediatecbm/tests/walkthrough_test.php +++ b/question/behaviour/immediatecbm/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_immediatecbm_feedback_multichoice_right() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_immediatecbm_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/behaviour/immediatefeedback/tests/behaviour_type_test.php b/question/behaviour/immediatefeedback/tests/behaviour_type_test.php index 8f4e8b807d2..84e3f389b82 100644 --- a/question/behaviour/immediatefeedback/tests/behaviour_type_test.php +++ b/question/behaviour/immediatefeedback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_immediatefeedback_type */ protected $behaviourtype; diff --git a/question/behaviour/immediatefeedback/tests/walkthrough_test.php b/question/behaviour/immediatefeedback/tests/walkthrough_test.php index b48047cb4c0..d64497a5603 100644 --- a/question/behaviour/immediatefeedback/tests/walkthrough_test.php +++ b/question/behaviour/immediatefeedback/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_immediatefeedback_feedback_multichoice_right() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_immediatefeedback_feedback_multichoice_right(): void { // Create a true-false question with correct answer true. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/behaviour/informationitem/tests/behaviour_type_test.php b/question/behaviour/informationitem/tests/behaviour_type_test.php index ddcca899e9e..2f8a28e9041 100644 --- a/question/behaviour/informationitem/tests/behaviour_type_test.php +++ b/question/behaviour/informationitem/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_informationitem_type */ protected $behaviourtype; diff --git a/question/behaviour/informationitem/tests/walkthrough_test.php b/question/behaviour/informationitem/tests/walkthrough_test.php index 575b0e63c53..58377938551 100644 --- a/question/behaviour/informationitem/tests/walkthrough_test.php +++ b/question/behaviour/informationitem/tests/walkthrough_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qbehaviour_informationitem */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_informationitem_feedback_description() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_informationitem_feedback_description(): void { // Create a true-false question with correct answer true. $description = \test_question_maker::make_question('description'); diff --git a/question/behaviour/interactive/tests/behaviour_type_test.php b/question/behaviour/interactive/tests/behaviour_type_test.php index 2298059e8e4..7ad997c28ac 100644 --- a/question/behaviour/interactive/tests/behaviour_type_test.php +++ b/question/behaviour/interactive/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_interactive_type */ protected $behaviourtype; diff --git a/question/behaviour/interactive/tests/walkthrough_test.php b/question/behaviour/interactive/tests/walkthrough_test.php index 5cb0145540b..7ee0c1f66f0 100644 --- a/question/behaviour/interactive/tests/walkthrough_test.php +++ b/question/behaviour/interactive/tests/walkthrough_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_feedback_multichoice_right() { diff --git a/question/behaviour/interactivecountback/tests/behaviour_type_test.php b/question/behaviour/interactivecountback/tests/behaviour_type_test.php index 83aea488e0e..edbff4c93aa 100644 --- a/question/behaviour/interactivecountback/tests/behaviour_type_test.php +++ b/question/behaviour/interactivecountback/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_interactivecountback_type */ protected $behaviourtype; diff --git a/question/behaviour/interactivecountback/tests/walkthrough_test.php b/question/behaviour/interactivecountback/tests/walkthrough_test.php index 291567c3acc..e9740b619f4 100644 --- a/question/behaviour/interactivecountback/tests/walkthrough_test.php +++ b/question/behaviour/interactivecountback/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_feedback_match_reset() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_feedback_match_reset(): void { // Create a matching question. $m = \test_question_maker::make_question('match'); diff --git a/question/behaviour/manualgraded/tests/behaviour_type_test.php b/question/behaviour/manualgraded/tests/behaviour_type_test.php index f7a26b0b5db..cb315a0525a 100644 --- a/question/behaviour/manualgraded/tests/behaviour_type_test.php +++ b/question/behaviour/manualgraded/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_manualgraded_type */ protected $behaviourtype; diff --git a/question/behaviour/manualgraded/tests/walkthrough_test.php b/question/behaviour/manualgraded/tests/walkthrough_test.php index f829c3ce689..90fa54bc796 100644 --- a/question/behaviour/manualgraded/tests/walkthrough_test.php +++ b/question/behaviour/manualgraded/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_manual_graded_essay() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_manual_graded_essay(): void { global $PAGE; // The current text editor depends on the users profile setting - so it needs a valid user. diff --git a/question/behaviour/missing/tests/behaviour_type_test.php b/question/behaviour/missing/tests/behaviour_type_test.php index fb47958c4d0..e7aad105b31 100644 --- a/question/behaviour/missing/tests/behaviour_type_test.php +++ b/question/behaviour/missing/tests/behaviour_type_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../../../engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class behaviour_type_test extends \basic_testcase { +final class behaviour_type_test extends \basic_testcase { /** @var qbehaviour_missing_type */ protected $behaviourtype; diff --git a/question/behaviour/missing/tests/missingbehaviour_test.php b/question/behaviour/missing/tests/missingbehaviour_test.php index cc20b64b666..ddc95c57a56 100644 --- a/question/behaviour/missing/tests/missingbehaviour_test.php +++ b/question/behaviour/missing/tests/missingbehaviour_test.php @@ -40,7 +40,7 @@ require_once(__DIR__ . '/../behaviour.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class missingbehaviour_test extends \advanced_testcase { +final class missingbehaviour_test extends \advanced_testcase { public function test_missing_cannot_start() { $qa = new question_attempt(\test_question_maker::make_question('truefalse', 'true'), 0); diff --git a/question/engine/tests/datalib_reporting_queries_test.php b/question/engine/tests/datalib_reporting_queries_test.php index 2450b685ee4..27393acc229 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 490d29f4120..81dcf39d0f8 100644 --- a/question/engine/tests/datalib_test.php +++ b/question/engine/tests/datalib_test.php @@ -42,7 +42,7 @@ require_once(__DIR__ . '/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \question_engine_data_mapper */ -class datalib_test extends \qbehaviour_walkthrough_test_base { +final class datalib_test extends \qbehaviour_walkthrough_test_base { /** * We create two usages, each with two questions, a short-answer marked diff --git a/question/engine/tests/qubaid_condition_test.php b/question/engine/tests/qubaid_condition_test.php index 5852c7804a5..757e5307858 100644 --- a/question/engine/tests/qubaid_condition_test.php +++ b/question/engine/tests/qubaid_condition_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qubaid_condition_test extends \advanced_testcase { +final class qubaid_condition_test extends \advanced_testcase { protected function normalize_sql($sql, $params) { $newparams = array(); diff --git a/question/engine/tests/question_display_options_test.php b/question/engine/tests/question_display_options_test.php index ece6c30f22a..6d888ccd62c 100644 --- a/question/engine/tests/question_display_options_test.php +++ b/question/engine/tests/question_display_options_test.php @@ -25,7 +25,7 @@ namespace core_question; * @copyright 2023 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_display_options_test extends \advanced_testcase { +final class question_display_options_test extends \advanced_testcase { /** * Data provider for {@see self::test_has_question_identifier()} diff --git a/question/engine/tests/question_engine_test.php b/question/engine/tests/question_engine_test.php index 6bc38bd6b55..84a6e7132b5 100644 --- a/question/engine/tests/question_engine_test.php +++ b/question/engine/tests/question_engine_test.php @@ -36,7 +36,7 @@ use question_engine; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \question_engine */ -class question_engine_test extends advanced_testcase { +final class question_engine_test extends advanced_testcase { /** * Load required libraries. diff --git a/question/engine/tests/question_reference_manager_test.php b/question/engine/tests/question_reference_manager_test.php index 69d104aa157..cc2175c41fb 100644 --- a/question/engine/tests/question_reference_manager_test.php +++ b/question/engine/tests/question_reference_manager_test.php @@ -30,7 +30,7 @@ use core_question_generator; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_question\question_reference_manager */ -class question_reference_manager_test extends advanced_testcase { +final class question_reference_manager_test extends advanced_testcase { public function test_questions_with_references() { global $DB; diff --git a/question/engine/tests/questionattempt_db_test.php b/question/engine/tests/questionattempt_db_test.php index 779b0efad62..8e60bd6cd3e 100644 --- a/question/engine/tests/questionattempt_db_test.php +++ b/question/engine/tests/questionattempt_db_test.php @@ -41,8 +41,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_db_test extends \data_loading_method_test_base { - public function test_load() { +final class questionattempt_db_test extends \data_loading_method_test_base { + public function test_load(): void { $records = new question_test_recordset(array( array('questionattemptid', 'contextid', 'questionusageid', 'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction', 'maxfraction', 'flagged', diff --git a/question/engine/tests/questionattempt_test.php b/question/engine/tests/questionattempt_test.php index fe1397fec54..ee439ac2c32 100644 --- a/question/engine/tests/questionattempt_test.php +++ b/question/engine/tests/questionattempt_test.php @@ -37,7 +37,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_test extends \advanced_testcase { +final class questionattempt_test extends \advanced_testcase { /** @var question_definition a question that can be used in the tests. */ private $question; /** @var int fake question_usage id used in some tests. */ diff --git a/question/engine/tests/questionattempt_with_steps_test.php b/question/engine/tests/questionattempt_with_steps_test.php index e0cc0c7f20c..500e794bb6b 100644 --- a/question/engine/tests/questionattempt_with_steps_test.php +++ b/question/engine/tests/questionattempt_with_steps_test.php @@ -38,7 +38,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattempt_with_steps_test extends \advanced_testcase { +final class questionattempt_with_steps_test extends \advanced_testcase { private $question; private $qa; diff --git a/question/engine/tests/questionattemptiterator_test.php b/question/engine/tests/questionattemptiterator_test.php index d979be80013..94a2023d9d7 100644 --- a/question/engine/tests/questionattemptiterator_test.php +++ b/question/engine/tests/questionattemptiterator_test.php @@ -32,7 +32,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptiterator_test extends \advanced_testcase { +final class questionattemptiterator_test extends \advanced_testcase { private $quba; private $qas = array(); private $iterator; diff --git a/question/engine/tests/questionattemptstep_db_test.php b/question/engine/tests/questionattemptstep_db_test.php index e7982b61ad6..fb1d1613065 100644 --- a/question/engine/tests/questionattemptstep_db_test.php +++ b/question/engine/tests/questionattemptstep_db_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstep_db_test extends \data_loading_method_test_base { - public function test_load_with_data() { +final class questionattemptstep_db_test extends \data_loading_method_test_base { + public function test_load_with_data(): void { $records = new question_test_recordset(array( array('attemptstepid', 'questionattemptid', 'sequencenumber', 'state', 'fraction', 'timecreated', 'userid', 'name', 'value', 'qtype', 'contextid'), array( 1, 1, 0, 'todo', null, 1256228502, 13, null, null, 'description', 1), diff --git a/question/engine/tests/questionattemptstep_test.php b/question/engine/tests/questionattemptstep_test.php index 4b9e149abb1..dde90e599bd 100644 --- a/question/engine/tests/questionattemptstep_test.php +++ b/question/engine/tests/questionattemptstep_test.php @@ -33,8 +33,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstep_test extends \advanced_testcase { - public function test_initial_state_unprocessed() { +final class questionattemptstep_test extends \advanced_testcase { + public function test_initial_state_unprocessed(): void { $step = new question_attempt_step(); $this->assertEquals(question_state::$unprocessed, $step->get_state()); } diff --git a/question/engine/tests/questionattemptstepiterator_test.php b/question/engine/tests/questionattemptstepiterator_test.php index 8ebacfa30ac..b6ddb3b485c 100644 --- a/question/engine/tests/questionattemptstepiterator_test.php +++ b/question/engine/tests/questionattemptstepiterator_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionattemptstepiterator_test extends \advanced_testcase { +final class questionattemptstepiterator_test extends \advanced_testcase { private $qa; private $iterator; diff --git a/question/engine/tests/questionbank_test.php b/question/engine/tests/questionbank_test.php index c21c45841a1..c4004ed10fa 100644 --- a/question/engine/tests/questionbank_test.php +++ b/question/engine/tests/questionbank_test.php @@ -35,7 +35,7 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionbank_test extends \advanced_testcase { +final class questionbank_test extends \advanced_testcase { public function test_sort_qtype_array() { $config = new \stdClass(); diff --git a/question/engine/tests/questionstate_test.php b/question/engine/tests/questionstate_test.php index 332fac84fa0..9367df4b68d 100644 --- a/question/engine/tests/questionstate_test.php +++ b/question/engine/tests/questionstate_test.php @@ -33,8 +33,8 @@ require_once($CFG->libdir . '/questionlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \question_state */ -class questionstate_test extends \advanced_testcase { - public function test_is_active() { +final class questionstate_test extends \advanced_testcase { + public function test_is_active(): void { $this->assertFalse(question_state::$notstarted->is_active()); $this->assertFalse(question_state::$unprocessed->is_active()); $this->assertTrue(question_state::$todo->is_active()); diff --git a/question/engine/tests/questionusage_autosave_test.php b/question/engine/tests/questionusage_autosave_test.php index 660744cbd63..053b60d9178 100644 --- a/question/engine/tests/questionusage_autosave_test.php +++ b/question/engine/tests/questionusage_autosave_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusage_autosave_test extends \qbehaviour_walkthrough_test_base { +final class questionusage_autosave_test extends \qbehaviour_walkthrough_test_base { public function test_autosave_then_display() { $this->resetAfterTest(); diff --git a/question/engine/tests/questionusagebyactivity_data_test.php b/question/engine/tests/questionusagebyactivity_data_test.php index 0ee53471d70..fbf4440f57f 100644 --- a/question/engine/tests/questionusagebyactivity_data_test.php +++ b/question/engine/tests/questionusagebyactivity_data_test.php @@ -34,8 +34,8 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusagebyactivity_data_test extends \data_loading_method_test_base { - public function test_load() { +final class questionusagebyactivity_data_test extends \data_loading_method_test_base { + public function test_load(): void { $scid = \context_system::instance()->id; $records = new question_test_recordset(array( array('qubaid', 'contextid', 'component', 'preferredbehaviour', diff --git a/question/engine/tests/questionusagebyactivity_test.php b/question/engine/tests/questionusagebyactivity_test.php index 476e11abc85..f8c428c9565 100644 --- a/question/engine/tests/questionusagebyactivity_test.php +++ b/question/engine/tests/questionusagebyactivity_test.php @@ -33,7 +33,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionusagebyactivity_test extends \advanced_testcase { +final class questionusagebyactivity_test extends \advanced_testcase { public function test_set_get_preferred_model() { // Set up diff --git a/question/engine/tests/questionutils_test.php b/question/engine/tests/questionutils_test.php index cb8fa7e3270..5a845f0e3c9 100644 --- a/question/engine/tests/questionutils_test.php +++ b/question/engine/tests/questionutils_test.php @@ -31,8 +31,8 @@ require_once(__DIR__ . '/../lib.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class questionutils_test extends \advanced_testcase { - public function test_arrays_have_same_keys_and_values() { +final class questionutils_test extends \advanced_testcase { + public function test_arrays_have_same_keys_and_values(): void { $this->assertTrue(question_utils::arrays_have_same_keys_and_values( array(), array())); diff --git a/question/engine/tests/unitofwork_test.php b/question/engine/tests/unitofwork_test.php index 021e1389c80..c1fe7c6f6de 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 678f7a57d33..51e507b020e 100644 --- a/question/engine/tests/walkthrough_test.php +++ b/question/engine/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once(__DIR__ . '/helpers.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_regrade_does_not_lose_flag() { diff --git a/question/format/aiken/tests/aikenformat_test.php b/question/format/aiken/tests/aikenformat_test.php index 9f8fc0538c9..1bee9832ea6 100644 --- a/question/format/aiken/tests/aikenformat_test.php +++ b/question/format/aiken/tests/aikenformat_test.php @@ -38,8 +38,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2018 Eric Merrill (eric.a.merrill@gmail.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class aikenformat_test extends question_testcase { - public function test_readquestions() { +final class aikenformat_test extends question_testcase { + public function test_readquestions(): void { global $CFG; $lines = file($CFG->dirroot.'/question/format/aiken/tests/fixtures/aiken_errors.txt'); diff --git a/question/format/aiken/tests/qformat_aiken_export_test.php b/question/format/aiken/tests/qformat_aiken_export_test.php index 6dee376530f..9b7ec292901 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 9917ebadec6..6df3b2db976 100644 --- a/question/format/blackboard_six/tests/blackboardformatpool_test.php +++ b/question/format/blackboard_six/tests/blackboardformatpool_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blackboardformatpool_test extends \question_testcase { +final class blackboardformatpool_test extends \question_testcase { public function make_test_xml() { $xmlfile = new qformat_blackboard_six_file(); diff --git a/question/format/blackboard_six/tests/blackboardsixformatqti_test.php b/question/format/blackboard_six/tests/blackboardsixformatqti_test.php index 6573b50e989..924921fb016 100644 --- a/question/format/blackboard_six/tests/blackboardsixformatqti_test.php +++ b/question/format/blackboard_six/tests/blackboardsixformatqti_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class blackboardsixformatqti_test extends \question_testcase { +final class blackboardsixformatqti_test extends \question_testcase { public function make_test_xml() { $xmlfile = new qformat_blackboard_six_file(); diff --git a/question/format/gift/tests/giftformat_test.php b/question/format/gift/tests/giftformat_test.php index 52924ae6730..a2170b85dbc 100644 --- a/question/format/gift/tests/giftformat_test.php +++ b/question/format/gift/tests/giftformat_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class giftformat_test extends \question_testcase { +final class giftformat_test extends \question_testcase { public function assert_same_gift($expectedtext, $text) { $this->assertEquals(str_replace("\r\n", "\n", $expectedtext), str_replace("\r\n", "\n", $text)); diff --git a/question/format/multianswer/tests/multianswerformat_test.php b/question/format/multianswer/tests/multianswerformat_test.php index debf40d0d55..7255a4a7a56 100644 --- a/question/format/multianswer/tests/multianswerformat_test.php +++ b/question/format/multianswer/tests/multianswerformat_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class multianswerformat_test extends \question_testcase { +final class multianswerformat_test extends \question_testcase { public function test_import() { $lines = file(__DIR__ . '/fixtures/questions.multianswer.txt'); diff --git a/question/format/xml/tests/qformat_xml_import_export_test.php b/question/format/xml/tests/qformat_xml_import_export_test.php index f8d671c3348..741b2447534 100644 --- a/question/format/xml/tests/qformat_xml_import_export_test.php +++ b/question/format/xml/tests/qformat_xml_import_export_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/editlib.php'); * @copyright 2014 Nikita Nikitsky, Volgograd State Technical University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class qformat_xml_import_export_test extends advanced_testcase { +final class qformat_xml_import_export_test extends advanced_testcase { /** * Create object qformat_xml for test. * @param string $filename with name for testing file. diff --git a/question/format/xml/tests/xmlformat_test.php b/question/format/xml/tests/xmlformat_test.php index fd8138819c7..b6f6606af78 100644 --- a/question/format/xml/tests/xmlformat_test.php +++ b/question/format/xml/tests/xmlformat_test.php @@ -46,7 +46,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class xmlformat_test extends \question_testcase { +final class xmlformat_test extends \question_testcase { public function assert_same_xml($expectedxml, $xml) { $this->assertEquals(str_replace("\r\n", "\n", $expectedxml), str_replace("\r\n", "\n", $xml)); diff --git a/question/tests/backup_test.php b/question/tests/backup_test.php index e7d954efd76..854678286b0 100644 --- a/question/tests/backup_test.php +++ b/question/tests/backup_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * Makes a backup of the course. diff --git a/question/tests/calculated_question_summary_test.php b/question/tests/calculated_question_summary_test.php index 2d536e7b709..ad3416eb781 100644 --- a/question/tests/calculated_question_summary_test.php +++ b/question/tests/calculated_question_summary_test.php @@ -26,7 +26,7 @@ use core_question\statistics\questions\calculated_question_summary; * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class calculated_question_summary_test extends \advanced_testcase { +final class calculated_question_summary_test extends \advanced_testcase { /** * Provider for test_get_min_max_of. diff --git a/question/tests/event/events_test.php b/question/tests/event/events_test.php index 9e99976791c..f6137f741d7 100644 --- a/question/tests/event/events_test.php +++ b/question/tests/event/events_test.php @@ -36,7 +36,7 @@ global $CFG; require_once($CFG->dirroot . '/question/editlib.php'); -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Tests set up. diff --git a/question/tests/externallib_test.php b/question/tests/externallib_test.php index 0a27d9f668a..2906db985fa 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 67de12f442e..5fe304a51ea 100644 --- a/question/tests/generator_test.php +++ b/question/tests/generator_test.php @@ -31,8 +31,8 @@ namespace core_question; * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { - public function test_create() { +final class generator_test extends \advanced_testcase { + public function test_create(): void { global $DB; $this->resetAfterTest(); diff --git a/question/tests/importexport_test.php b/question/tests/importexport_test.php index a3cd0e064d4..52e2cc12bac 100644 --- a/question/tests/importexport_test.php +++ b/question/tests/importexport_test.php @@ -55,8 +55,8 @@ class testable_qformat extends qformat_default { * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class importexport_test extends \advanced_testcase { - public function test_assemble_category_path() { +final class importexport_test extends \advanced_testcase { + public function test_assemble_category_path(): void { $format = new testable_qformat(); $pathsections = [ '$course$', diff --git a/question/tests/least_used_variant_strategy_test.php b/question/tests/least_used_variant_strategy_test.php index 4a76d11e65f..fac49f3b331 100644 --- a/question/tests/least_used_variant_strategy_test.php +++ b/question/tests/least_used_variant_strategy_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class least_used_variant_strategy_test extends \advanced_testcase { +final class least_used_variant_strategy_test extends \advanced_testcase { public function test_question_with_one_variant_always_picks_that() { $question = \test_question_maker::make_question('shortanswer'); diff --git a/question/tests/local/bank/context_to_string_translator_test.php b/question/tests/local/bank/context_to_string_translator_test.php index d761861d752..9e09dbb0f9a 100644 --- a/question/tests/local/bank/context_to_string_translator_test.php +++ b/question/tests/local/bank/context_to_string_translator_test.php @@ -31,7 +31,7 @@ use context_user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_question\local\bank\context_to_string_translator */ -class context_to_string_translator_test extends \advanced_testcase { +final class context_to_string_translator_test extends \advanced_testcase { public function test_context_to_string_translator_test_good_case() { $this->resetAfterTest(); diff --git a/question/tests/privacy/provider_test.php b/question/tests/privacy/provider_test.php index 78dd9360b61..65fbe4c9eae 100644 --- a/question/tests/privacy/provider_test.php +++ b/question/tests/privacy/provider_test.php @@ -42,7 +42,7 @@ require_once(__DIR__ . '/../../engine/tests/helpers.php'); * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. use \core_question_privacy_helper; diff --git a/question/tests/question_bank_column_test.php b/question/tests/question_bank_column_test.php index ea8bfce8445..bf274d303ec 100644 --- a/question/tests/question_bank_column_test.php +++ b/question/tests/question_bank_column_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/tests/fixtures/testable_core_question_co * @copyright 2018 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_bank_column_test extends \advanced_testcase { +final class question_bank_column_test extends \advanced_testcase { /** * Test function display_header multiple sorts with no custom tooltips. diff --git a/question/tests/version_test.php b/question/tests/version_test.php index 547beeae818..021afd78f1b 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 a0bbc88460b..4c69d47ec1c 100644 --- a/question/type/calculated/tests/formula_validation_test.php +++ b/question/type/calculated/tests/formula_validation_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/question/type/calculated/questiontype.php'); * @copyright 2014 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class formula_validation_test extends \basic_testcase { +final class formula_validation_test extends \basic_testcase { protected function assert_nonempty_string($actual) { $this->assertIsString($actual); $this->assertNotEquals('', $actual); diff --git a/question/type/calculated/tests/question_test.php b/question/type/calculated/tests/question_test.php index 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 d1504b535d7..56be0f1a02c 100644 --- a/question/type/calculated/tests/question_type_test.php +++ b/question/type/calculated/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/calculated/tests/helper.php'); * @covers \question_type * @covers \qtype_calculated */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $tolerance = 0.00000001; protected $qtype; diff --git a/question/type/calculated/tests/upgrade_old_attempt_data_test.php b/question/type/calculated/tests/upgrade_old_attempt_data_test.php index 7a0a3586e2e..4afd0a6d73f 100644 --- a/question/type/calculated/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculated/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculated_adaptive_qsession97() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculated_adaptive_qsession97(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculated/tests/variablesubstituter_test.php b/question/type/calculated/tests/variablesubstituter_test.php index 453f8b490ef..4953ce26d64 100644 --- a/question/type/calculated/tests/variablesubstituter_test.php +++ b/question/type/calculated/tests/variablesubstituter_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/question/type/calculated/questiontype.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class variablesubstituter_test extends \advanced_testcase { - public function test_simple_expression() { +final class variablesubstituter_test extends \advanced_testcase { + public function test_simple_expression(): void { $vs = new qtype_calculated_variable_substituter(array('a' => 1, 'b' => 2), '.'); $this->assertEquals(3, $vs->calculate('{a} + {b}')); } diff --git a/question/type/calculated/tests/walkthrough_test.php b/question/type/calculated/tests/walkthrough_test.php index 5ddb1c7592a..cc75a11e4ca 100644 --- a/question/type/calculated/tests/walkthrough_test.php +++ b/question/type/calculated/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive(): void { // Create a gapselect question. $q = \test_question_maker::make_question('calculated'); diff --git a/question/type/calculatedmulti/tests/question_test.php b/question/type/calculatedmulti/tests/question_test.php index 0c7a572181a..ad20310728a 100644 --- a/question/type/calculatedmulti/tests/question_test.php +++ b/question/type/calculatedmulti/tests/question_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculated'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php b/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php index 7f3fefa487a..10091a5e709 100644 --- a/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedmulti/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculatedmulti_adaptive_qsession96() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculatedmulti_adaptive_qsession96(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculatedmulti/tests/walkthrough_test.php b/question/type/calculatedmulti/tests/walkthrough_test.php index dc997d40355..05c8ee2d08a 100644 --- a/question/type/calculatedmulti/tests/walkthrough_test.php +++ b/question/type/calculatedmulti/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_interactive_single_response() { diff --git a/question/type/calculatedsimple/tests/question_test.php b/question/type/calculatedsimple/tests/question_test.php index f6f529ad1d8..83776e0ab67 100644 --- a/question/type/calculatedsimple/tests/question_test.php +++ b/question/type/calculatedsimple/tests/question_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('calculatedsimple'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/calculatedsimple/tests/question_type_test.php b/question/type/calculatedsimple/tests/question_type_test.php index aef8180b1fe..7a51df13285 100644 --- a/question/type/calculatedsimple/tests/question_type_test.php +++ b/question/type/calculatedsimple/tests/question_type_test.php @@ -44,7 +44,7 @@ require_once($CFG->dirroot . '/question/type/calculatedsimple/edit_calculatedsim * @covers \qtype_calculatedsimple_edit_form * */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php b/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php index c89293d4047..062c9090c6b 100644 --- a/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php +++ b/question/type/calculatedsimple/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_calculatedsimple_adaptive_qsession95() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_calculatedsimple_adaptive_qsession95(): void { $quiz = (object) array( 'id' => '4', 'course' => '2', diff --git a/question/type/calculatedsimple/tests/walkthrough_test.php b/question/type/calculatedsimple/tests/walkthrough_test.php index 5917bcaa8b6..2999eea994b 100644 --- a/question/type/calculatedsimple/tests/walkthrough_test.php +++ b/question/type/calculatedsimple/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive(): void { // Create a gapselect question. $q = \test_question_maker::make_question('calculatedsimple'); diff --git a/question/type/ddimageortext/tests/form/edit_form_test.php b/question/type/ddimageortext/tests/form/edit_form_test.php index 920ee99012d..94c26828a81 100644 --- a/question/type/ddimageortext/tests/form/edit_form_test.php +++ b/question/type/ddimageortext/tests/form/edit_form_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/edit_ddimageortext_fo * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddimageortext/tests/privacy/provider_test.php b/question/type/ddimageortext/tests/privacy/provider_test.php index 353f014d890..5bb0994aa38 100644 --- a/question/type/ddimageortext/tests/privacy/provider_test.php +++ b/question/type/ddimageortext/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/classes/privacy/provi * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddimageortext/tests/question_type_test.php b/question/type/ddimageortext/tests/question_type_test.php index 8b39c2673ed..8c672d25477 100644 --- a/question/type/ddimageortext/tests/question_type_test.php +++ b/question/type/ddimageortext/tests/question_type_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/tests/helper.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \basic_testcase { +final class question_type_test extends \basic_testcase { /** @var qtype_ddimageortext instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddimageortext/tests/walkthrough_test.php b/question/type/ddimageortext/tests/walkthrough_test.php index 79373ed08d2..5d74b3a11b1 100644 --- a/question/type/ddimageortext/tests/walkthrough_test.php +++ b/question/type/ddimageortext/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/tests/helper.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { /** * Get an expectation that the output contains an item ready to drag. diff --git a/question/type/ddmarker/tests/form/edit_form_test.php b/question/type/ddmarker/tests/form/edit_form_test.php index b71f1fbaad6..5b74cc019a9 100644 --- a/question/type/ddmarker/tests/form/edit_form_test.php +++ b/question/type/ddmarker/tests/form/edit_form_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/edit_ddmarker_form.php'); * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddmarker/tests/privacy/provider_test.php b/question/type/ddmarker/tests/privacy/provider_test.php index 94cb4654891..92300a18e1f 100644 --- a/question/type/ddmarker/tests/privacy/provider_test.php +++ b/question/type/ddmarker/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/classes/privacy/provider.p * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddmarker/tests/question_type_test.php b/question/type/ddmarker/tests/question_type_test.php index 03acc328f28..6eae328d573 100644 --- a/question/type/ddmarker/tests/question_type_test.php +++ b/question/type/ddmarker/tests/question_type_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_ddmarker instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddmarker/tests/shapes_test.php b/question/type/ddmarker/tests/shapes_test.php index 5a43282c8ab..6f72f7a55ad 100644 --- a/question/type/ddmarker/tests/shapes_test.php +++ b/question/type/ddmarker/tests/shapes_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/type/ddmarker/shapes.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class shapes_test extends \basic_testcase { +final class shapes_test extends \basic_testcase { public function test_polygon_valdiation_test_ok() { $shape = new qtype_ddmarker_shape_polygon('10, 10; 20, 10; 20, 20; 10, 20'); diff --git a/question/type/ddmarker/tests/walkthrough_test.php b/question/type/ddmarker/tests/walkthrough_test.php index 652f0f1f636..5d50c16363a 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 62e54436958..b522404a754 100644 --- a/question/type/ddwtos/tests/form/edit_form_test.php +++ b/question/type/ddwtos/tests/form/edit_form_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/edit_ddwtos_form.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/ddwtos/tests/privacy/provider_test.php b/question/type/ddwtos/tests/privacy/provider_test.php index 1dda6d7f42a..5c40a77fdb3 100644 --- a/question/type/ddwtos/tests/privacy/provider_test.php +++ b/question/type/ddwtos/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/classes/privacy/provider.php * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/ddwtos/tests/question_test.php b/question/type/ddwtos/tests/question_test.php index 006d864b45e..afefd63a745 100644 --- a/question/type/ddwtos/tests/question_test.php +++ b/question/type/ddwtos/tests/question_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \basic_testcase { +final class question_test extends \basic_testcase { public function test_get_question_summary() { $dd = \test_question_maker::make_question('ddwtos'); diff --git a/question/type/ddwtos/tests/question_type_test.php b/question/type/ddwtos/tests/question_type_test.php index 16de9a09e35..989dc8d4ca4 100644 --- a/question/type/ddwtos/tests/question_type_test.php +++ b/question/type/ddwtos/tests/question_type_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \question_testcase { +final class question_type_test extends \question_testcase { /** @var qtype_ddwtos instance of the question type class to test. */ protected $qtype; diff --git a/question/type/ddwtos/tests/walkthrough_test.php b/question/type/ddwtos/tests/walkthrough_test.php index 2a2bd5f67df..e28a0baf74b 100644 --- a/question/type/ddwtos/tests/walkthrough_test.php +++ b/question/type/ddwtos/tests/walkthrough_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/type/ddwtos/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_drop_box_expectation($place, $group, $readonly, $stateclass = '0') { diff --git a/question/type/description/tests/question_type_test.php b/question/type/description/tests/question_type_test.php index 2c4f082dac8..6cdf6948ec8 100644 --- a/question/type/description/tests/question_type_test.php +++ b/question/type/description/tests/question_type_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/type/description/edit_description_form.p * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/description/tests/upgrade_old_attempt_data_test.php b/question/type/description/tests/upgrade_old_attempt_data_test.php index 7e2a863cc76..1414c11869b 100644 --- a/question/type/description/tests/upgrade_old_attempt_data_test.php +++ b/question/type/description/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_description_deferredfeedback_history80() { $quiz = (object) array( diff --git a/question/type/description/tests/walkthrough_test.php b/question/type/description/tests/walkthrough_test.php index c5737d2a6a0..a116e5a7a9c 100644 --- a/question/type/description/tests/walkthrough_test.php +++ b/question/type/description/tests/walkthrough_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_informationitem_feedback_description() { diff --git a/question/type/essay/tests/form/edit_form_test.php b/question/type/essay/tests/form/edit_form_test.php index f55765a44e5..165a66559d6 100644 --- a/question/type/essay/tests/form/edit_form_test.php +++ b/question/type/essay/tests/form/edit_form_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/essay/edit_essay_form.php'); * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. * diff --git a/question/type/essay/tests/privacy/provider_test.php b/question/type/essay/tests/privacy/provider_test.php index b5016af5371..1782a54ab7c 100644 --- a/question/type/essay/tests/privacy/provider_test.php +++ b/question/type/essay/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/essay/classes/privacy/provider.php' * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/essay/tests/question_test.php b/question/type/essay/tests/question_test.php index 6102b1ea40e..9d6ca4ffc53 100644 --- a/question/type/essay/tests/question_test.php +++ b/question/type/essay/tests/question_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_get_question_summary() { +final class question_test extends \advanced_testcase { + public function test_get_question_summary(): void { $essay = \test_question_maker::make_an_essay_question(); $essay->questiontext = 'Hello world'; $this->assertEquals('Hello [world]', $essay->get_question_summary()); diff --git a/question/type/essay/tests/question_type_test.php b/question/type/essay/tests/question_type_test.php index 410ba2fd779..18716d53c6f 100644 --- a/question/type/essay/tests/question_type_test.php +++ b/question/type/essay/tests/question_type_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/question/type/essay/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/essay/tests/restore_test.php b/question/type/essay/tests/restore_test.php index 5269fe00dc5..95e8ab19c3c 100644 --- a/question/type/essay/tests/restore_test.php +++ b/question/type/essay/tests/restore_test.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . "/phpunit/classes/restore_date_testcase.php"); * @copyright 2019 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class restore_test extends \restore_date_testcase { +final class restore_test extends \restore_date_testcase { /** * Test missing qtype_essay_options creation. diff --git a/question/type/essay/tests/upgrade_old_attempt_data_test.php b/question/type/essay/tests/upgrade_old_attempt_data_test.php index 6b4f59c5549..70c3daa0e83 100644 --- a/question/type/essay/tests/upgrade_old_attempt_data_test.php +++ b/question/type/essay/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_essay_deferredfeedback_history98220() { $quiz = (object) array( diff --git a/question/type/essay/tests/walkthrough_test.php b/question/type/essay/tests/walkthrough_test.php index 2bc993054cf..1f6088a26fe 100644 --- a/question/type/essay/tests/walkthrough_test.php +++ b/question/type/essay/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function check_contains_textarea($name, $content = '', $height = 10) { $fieldname = $this->quba->get_field_prefix($this->slot) . $name; diff --git a/question/type/gapselect/tests/form/edit_form_test.php b/question/type/gapselect/tests/form/edit_form_test.php index 17e890b4fd4..4d0cd4bddd1 100644 --- a/question/type/gapselect/tests/form/edit_form_test.php +++ b/question/type/gapselect/tests/form/edit_form_test.php @@ -64,7 +64,7 @@ class qtype_gapselect_edit_form_base_testable extends \qtype_gapselect_edit_form * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class edit_form_test extends \advanced_testcase { +final class edit_form_test extends \advanced_testcase { /** * Helper method. diff --git a/question/type/gapselect/tests/privacy/provider_test.php b/question/type/gapselect/tests/privacy/provider_test.php index 0fa9f6a402d..245ac509cfd 100644 --- a/question/type/gapselect/tests/privacy/provider_test.php +++ b/question/type/gapselect/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/gapselect/classes/privacy/provider. * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/gapselect/tests/question_test.php b/question/type/gapselect/tests/question_test.php index 5aef925f250..9deb07d6af6 100644 --- a/question/type/gapselect/tests/question_test.php +++ b/question/type/gapselect/tests/question_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/gapselect/tests/helper.php'); * @covers \qtype_gapselect_question_base * @covers \qtype_gapselect_question */ -class question_test extends \basic_testcase { +final class question_test extends \basic_testcase { public function test_get_question_summary() { $gapselect = \test_question_maker::make_question('gapselect'); diff --git a/question/type/gapselect/tests/question_type_test.php b/question/type/gapselect/tests/question_type_test.php index 019542fc56f..921acefbe55 100644 --- a/question/type/gapselect/tests/question_type_test.php +++ b/question/type/gapselect/tests/question_type_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \question_testcase { +final class question_type_test extends \question_testcase { /** @var qtype_gapselect instance of the question type class to test. */ protected $qtype; diff --git a/question/type/gapselect/tests/walkthrough_test.php b/question/type/gapselect/tests/walkthrough_test.php index 04473468552..4cfbca05f25 100644 --- a/question/type/gapselect/tests/walkthrough_test.php +++ b/question/type/gapselect/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/gapselect/tests/helper.php'); * @copyright 2012 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_behaviour() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_behaviour(): void { // Create a gapselect question. $q = \test_question_maker::make_question('gapselect'); diff --git a/question/type/match/tests/backup_test.php b/question/type/match/tests/backup_test.php index 3673cb42ff3..b3836c39a54 100644 --- a/question/type/match/tests/backup_test.php +++ b/question/type/match/tests/backup_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/course/externallib.php'); * @copyright 2020 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class backup_test extends \advanced_testcase { +final class backup_test extends \advanced_testcase { /** * Duplicate quiz with a matching question, and check it worked. diff --git a/question/type/match/tests/privacy/provider_test.php b/question/type/match/tests/privacy/provider_test.php index 7bffe8e9f90..7b2adfae0d1 100644 --- a/question/type/match/tests/privacy/provider_test.php +++ b/question/type/match/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/match/classes/privacy/provider.php' * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/match/tests/question_test.php b/question/type/match/tests/question_test.php index 4068c11659f..65c8d6e8a2a 100644 --- a/question/type/match/tests/question_test.php +++ b/question/type/match/tests/question_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_match_question */ -class question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_question('match'); diff --git a/question/type/match/tests/question_type_test.php b/question/type/match/tests/question_type_test.php index da3b51514cd..e816bc9f478 100644 --- a/question/type/match/tests/question_type_test.php +++ b/question/type/match/tests/question_type_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/match/edit_match_form.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_match instance of the question type class to test. */ protected $qtype; diff --git a/question/type/match/tests/upgrade_old_attempt_data_test.php b/question/type/match/tests/upgrade_old_attempt_data_test.php index 7c902a0a708..62e459a802a 100644 --- a/question/type/match/tests/upgrade_old_attempt_data_test.php +++ b/question/type/match/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_match_deferredfeedback_history6220() { $quiz = (object) array( diff --git a/question/type/match/tests/walkthrough_test.php b/question/type/match/tests/walkthrough_test.php index ce92d2ba837..7851b8c1c49 100644 --- a/question/type/match/tests/walkthrough_test.php +++ b/question/type/match/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_deferred_feedback_unanswered() { diff --git a/question/type/missingtype/tests/missingtype_test.php b/question/type/missingtype/tests/missingtype_test.php index 44ab9e414c3..83ad708837c 100644 --- a/question/type/missingtype/tests/missingtype_test.php +++ b/question/type/missingtype/tests/missingtype_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/missingtype/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class missingtype_test extends \question_testcase { +final class missingtype_test extends \question_testcase { protected function get_unknown_questiondata() { $questiondata = new \stdClass(); diff --git a/question/type/multianswer/tests/question_test.php b/question/type/multianswer/tests/question_test.php index c386ed88fe9..316ce2ad5cc 100644 --- a/question/type/multianswer/tests/question_test.php +++ b/question/type/multianswer/tests/question_test.php @@ -35,8 +35,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multianswer_question */ -class question_test extends \advanced_testcase { - public function test_get_expected_data() { +final class question_test extends \advanced_testcase { + public function test_get_expected_data(): void { $question = \test_question_maker::make_question('multianswer'); $this->assertEquals(array('sub1_answer' => PARAM_RAW_TRIMMED, 'sub2_answer' => PARAM_RAW), $question->get_expected_data()); diff --git a/question/type/multianswer/tests/question_type_test.php b/question/type/multianswer/tests/question_type_test.php index fe36a8b0a3a..87a2cefa8db 100644 --- a/question/type/multianswer/tests/question_type_test.php +++ b/question/type/multianswer/tests/question_type_test.php @@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/question/type/multianswer/edit_multianswer_form.p * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multianswer */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { /** @var qtype_multianswer instance of the question type class to test. */ protected $qtype; diff --git a/question/type/multianswer/tests/upgrade_old_attempt_data_test.php b/question/type/multianswer/tests/upgrade_old_attempt_data_test.php index 9cde6383693..8577205d8b6 100644 --- a/question/type/multianswer/tests/upgrade_old_attempt_data_test.php +++ b/question/type/multianswer/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_multianswer_adaptivenopenalty_qsession104() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_multianswer_adaptivenopenalty_qsession104(): void { $quiz = (object) array( 'id' => '5', 'course' => '2', diff --git a/question/type/multianswer/tests/walkthrough_test.php b/question/type/multianswer/tests/walkthrough_test.php index 389427a902e..c838ed79a82 100644 --- a/question/type/multianswer/tests/walkthrough_test.php +++ b/question/type/multianswer/tests/walkthrough_test.php @@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/multianswer/questiontype.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { protected function get_contains_subq_status(question_state $state) { return new \question_pattern_expectation('~' . diff --git a/question/type/multichoice/tests/privacy/provider_test.php b/question/type/multichoice/tests/privacy/provider_test.php index d8fc1877ff5..9b6d57e1cea 100644 --- a/question/type/multichoice/tests/privacy/provider_test.php +++ b/question/type/multichoice/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/multichoice/classes/privacy/provide * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/multichoice/tests/question_multi_test.php b/question/type/multichoice/tests/question_multi_test.php index 99ff5165d3b..33773dbba23 100644 --- a/question/type/multichoice/tests/question_multi_test.php +++ b/question/type/multichoice/tests/question_multi_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice_multi_question */ -class question_multi_test extends \advanced_testcase { +final class question_multi_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_a_multichoice_multi_question(); diff --git a/question/type/multichoice/tests/question_single_test.php b/question/type/multichoice/tests/question_single_test.php index 7a7c370bfdb..d0587b18d24 100644 --- a/question/type/multichoice/tests/question_single_test.php +++ b/question/type/multichoice/tests/question_single_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice_single_question */ -class question_single_test extends \advanced_testcase { +final class question_single_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/type/multichoice/tests/question_type_test.php b/question/type/multichoice/tests/question_type_test.php index 0a053e7e117..aa9632319dc 100644 --- a/question/type/multichoice/tests/question_type_test.php +++ b/question/type/multichoice/tests/question_type_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/type/multichoice/edit_multichoice_form.p * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_multichoice */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/multichoice/tests/walkthrough_test.php b/question/type/multichoice/tests/walkthrough_test.php index 61239422a62..658c06ebb66 100644 --- a/question/type/multichoice/tests/walkthrough_test.php +++ b/question/type/multichoice/tests/walkthrough_test.php @@ -38,8 +38,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @covers \qtype_multichoice_single_question * @covers \qtype_multichoice_single_base */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_deferredfeedback_feedback_multichoice_single() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_deferredfeedback_feedback_multichoice_single(): void { // Create a multichoice, single question. $mc = \test_question_maker::make_a_multichoice_single_question(); diff --git a/question/type/numerical/tests/answer_test.php b/question/type/numerical/tests/answer_test.php index 10e2c261006..4669a1754aa 100644 --- a/question/type/numerical/tests/answer_test.php +++ b/question/type/numerical/tests/answer_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/type/numerical/question.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class answer_test extends \advanced_testcase { - public function test_within_tolerance_nominal() { +final class answer_test extends \advanced_testcase { + public function test_within_tolerance_nominal(): void { $answer = new qtype_numerical_answer(13, 7.0, 1.0, '', FORMAT_MOODLE, 1.0); $this->assertFalse($answer->within_tolerance(5.99)); diff --git a/question/type/numerical/tests/answerprocessor_test.php b/question/type/numerical/tests/answerprocessor_test.php index d62bc52ca8f..de133fac740 100644 --- a/question/type/numerical/tests/answerprocessor_test.php +++ b/question/type/numerical/tests/answerprocessor_test.php @@ -36,7 +36,7 @@ use qtype_numerical_answer_processor; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_numerical_answer_processor */ -class answerprocessor_test extends \advanced_testcase { +final class answerprocessor_test extends \advanced_testcase { /** * Test setup. */ diff --git a/question/type/numerical/tests/question_test.php b/question/type/numerical/tests/question_test.php index 52b723907df..e2713c03631 100644 --- a/question/type/numerical/tests/question_test.php +++ b/question/type/numerical/tests/question_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('numerical'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/numerical/tests/question_type_test.php b/question/type/numerical/tests/question_type_test.php index 9231ae63ae9..74782a1da92 100644 --- a/question/type/numerical/tests/question_type_test.php +++ b/question/type/numerical/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/numerical/edit_numerical_form.php') * @covers \question_type * @covers \qtype_numerical */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $tolerance = 0.00000001; protected $qtype; diff --git a/question/type/numerical/tests/upgrade_old_attempt_data_test.php b/question/type/numerical/tests/upgrade_old_attempt_data_test.php index c82c19ecb4a..5bc63bfb516 100644 --- a/question/type/numerical/tests/upgrade_old_attempt_data_test.php +++ b/question/type/numerical/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_numerical_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/numerical/tests/walkthrough_test.php b/question/type/numerical/tests/walkthrough_test.php index ebc45905ea2..4dbf10133ff 100644 --- a/question/type/numerical/tests/walkthrough_test.php +++ b/question/type/numerical/tests/walkthrough_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/numerical/tests/helper.php'); * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_interactive_currency() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_interactive_currency(): void { // Create a gapselect question. $q = \test_question_maker::make_question('numerical', 'currency'); diff --git a/question/type/random/tests/question_type_test.php b/question/type/random/tests/question_type_test.php index f2d9e6f687b..7d54d1d0f41 100644 --- a/question/type/random/tests/question_type_test.php +++ b/question/type/random/tests/question_type_test.php @@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/question/type/random/questiontype.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/random/tests/upgrade_old_attempt_data_test.php b/question/type/random/tests/upgrade_old_attempt_data_test.php index 0cd0c37b3c4..d66727c6b8a 100644 --- a/question/type/random/tests/upgrade_old_attempt_data_test.php +++ b/question/type/random/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_random_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/randomsamatch/tests/question_test.php b/question/type/randomsamatch/tests/question_test.php index 9a6325e3ac5..6e590d39caa 100644 --- a/question/type/randomsamatch/tests/question_test.php +++ b/question/type/randomsamatch/tests/question_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { +final class question_test extends \advanced_testcase { public function test_get_expected_data() { $question = \test_question_maker::make_question('randomsamatch'); diff --git a/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php b/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php index da8844d6962..3649d289079 100644 --- a/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php +++ b/question/type/randomsamatch/tests/upgrade_old_attempt_data_test.php @@ -29,8 +29,8 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { - public function test_randomsamatch_deferredfeedback_qsession1() { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { + public function test_randomsamatch_deferredfeedback_qsession1(): void { $quiz = (object) array( 'id' => '1', 'course' => '2', diff --git a/question/type/randomsamatch/tests/walkthrough_test.php b/question/type/randomsamatch/tests/walkthrough_test.php index face79665d4..6a797788bb3 100644 --- a/question/type/randomsamatch/tests/walkthrough_test.php +++ b/question/type/randomsamatch/tests/walkthrough_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2013 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { public function test_deferred_feedback_unanswered() { diff --git a/question/type/shortanswer/tests/privacy/provider_test.php b/question/type/shortanswer/tests/privacy/provider_test.php index beb293198dd..db1a22edb51 100644 --- a/question/type/shortanswer/tests/privacy/provider_test.php +++ b/question/type/shortanswer/tests/privacy/provider_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/question/type/shortanswer/classes/privacy/provide * @copyright 2021 The Open university * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { // Include the privacy helper which has assertions on it. public function test_get_metadata() { diff --git a/question/type/shortanswer/tests/question_test.php b/question/type/shortanswer/tests/question_test.php index 4a65108cc9a..8a9977f6f68 100644 --- a/question/type/shortanswer/tests/question_test.php +++ b/question/type/shortanswer/tests/question_test.php @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/question/type/shortanswer/question.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_compare_string_with_wildcard() { +final class question_test extends \advanced_testcase { + public function test_compare_string_with_wildcard(): void { // Test case sensitive literal matches. $this->assertTrue((bool)qtype_shortanswer_question::compare_string_with_wildcard( 'Frog', 'Frog', false)); diff --git a/question/type/shortanswer/tests/question_type_test.php b/question/type/shortanswer/tests/question_type_test.php index a63728fcfb7..747318da234 100644 --- a/question/type/shortanswer/tests/question_type_test.php +++ b/question/type/shortanswer/tests/question_type_test.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . '/question/type/shortanswer/edit_shortanswer_form.p * @covers \question_type * @covers \qtype_shortanswer */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php b/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php index d002d721b3d..abcd8da7891 100644 --- a/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php +++ b/question/type/shortanswer/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_shortanswer_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/tests/question_definition_test.php b/question/type/tests/question_definition_test.php index aeafe70fa86..d7154747867 100644 --- a/question/type/tests/question_definition_test.php +++ b/question/type/tests/question_definition_test.php @@ -28,8 +28,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2015 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_definition_test extends \advanced_testcase { - public function test_make_html_inline() { +final class question_definition_test extends \advanced_testcase { + public function test_make_html_inline(): void { // Base class is abstract, so we need to pick one qusetion type to test this method. $mc = \test_question_maker::make_a_multichoice_single_question(); $this->assertEquals('Frog', $mc->make_html_inline('

Frog

')); diff --git a/question/type/tests/question_first_matching_answer_grading_strategy_test.php b/question/type/tests/question_first_matching_answer_grading_strategy_test.php index b515c943438..d6dacfbbada 100644 --- a/question/type/tests/question_first_matching_answer_grading_strategy_test.php +++ b/question/type/tests/question_first_matching_answer_grading_strategy_test.php @@ -61,7 +61,7 @@ class test_response_answer_comparer implements \question_response_answer_compare * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_first_matching_answer_grading_strategy_test extends \advanced_testcase { +final class question_first_matching_answer_grading_strategy_test extends \advanced_testcase { protected function setUp(): void { } diff --git a/question/type/tests/question_hint_test.php b/question/type/tests/question_hint_test.php index 7978764e1fe..dcb5072ba9b 100644 --- a/question/type/tests/question_hint_test.php +++ b/question/type/tests/question_hint_test.php @@ -31,8 +31,8 @@ require_once($CFG->dirroot . '/question/type/questiontypebase.php'); * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_hint_test extends \advanced_testcase { - public function test_basic() { +final class question_hint_test extends \advanced_testcase { + public function test_basic(): void { $row = new \stdClass(); $row->id = 123; $row->hint = 'A hint'; diff --git a/question/type/tests/question_type_test.php b/question/type/tests/question_type_test.php index 59fe3daa33c..8d575488e06 100644 --- a/question/type/tests/question_type_test.php +++ b/question/type/tests/question_type_test.php @@ -33,8 +33,8 @@ require_once($CFG->dirroot . '/question/type/questiontypebase.php'); * * @covers \question_type */ -class question_type_test extends \advanced_testcase { - public function test_save_question_name() { +final class question_type_test extends \advanced_testcase { + public function test_save_question_name(): void { $this->resetAfterTest(); $questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question'); diff --git a/question/type/truefalse/tests/question_test.php b/question/type/truefalse/tests/question_test.php index 6060ecfda50..e7e99d12357 100644 --- a/question/type/truefalse/tests/question_test.php +++ b/question/type/truefalse/tests/question_test.php @@ -34,8 +34,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @copyright 2008 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_test extends \advanced_testcase { - public function test_is_complete_response() { +final class question_test extends \advanced_testcase { + public function test_is_complete_response(): void { $question = \test_question_maker::make_question('truefalse', 'true'); $this->assertFalse($question->is_complete_response(array())); diff --git a/question/type/truefalse/tests/question_type_test.php b/question/type/truefalse/tests/question_type_test.php index 239718ff82c..96fe7da76bf 100644 --- a/question/type/truefalse/tests/question_type_test.php +++ b/question/type/truefalse/tests/question_type_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/question/type/truefalse/edit_truefalse_form.php') * @copyright 2007 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class question_type_test extends \advanced_testcase { +final class question_type_test extends \advanced_testcase { protected $qtype; protected function setUp(): void { diff --git a/question/type/truefalse/tests/upgrade_old_attempt_data_test.php b/question/type/truefalse/tests/upgrade_old_attempt_data_test.php index 17b8002b652..fea7ec29d50 100644 --- a/question/type/truefalse/tests/upgrade_old_attempt_data_test.php +++ b/question/type/truefalse/tests/upgrade_old_attempt_data_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/question/engine/upgrade/tests/helper.php'); * @copyright 2009 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { +final class upgrade_old_attempt_data_test extends \question_attempt_upgrader_test_base { public function test_truefalse_deferredfeedback_history620() { $quiz = (object) array( diff --git a/question/type/truefalse/tests/walkthrough_test.php b/question/type/truefalse/tests/walkthrough_test.php index 94bb1166ccb..35c65c454a8 100644 --- a/question/type/truefalse/tests/walkthrough_test.php +++ b/question/type/truefalse/tests/walkthrough_test.php @@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \qtype_truefalse_question */ -class walkthrough_test extends \qbehaviour_walkthrough_test_base { - public function test_false_right_does_not_show_feedback_when_not_answered() { +final class walkthrough_test extends \qbehaviour_walkthrough_test_base { + public function test_false_right_does_not_show_feedback_when_not_answered(): void { // Create a true-false question with correct answer false. $tf = \test_question_maker::make_question('truefalse', 'false'); diff --git a/rating/tests/externallib_test.php b/rating/tests/externallib_test.php index e4890ed1f76..aa9b9f99fd5 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 d605c74f54d..6cb6fd3382f 100644 --- a/rating/tests/privacy/provider_test.php +++ b/rating/tests/privacy/provider_test.php @@ -38,7 +38,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Rate something as a user. diff --git a/rating/tests/rating_test.php b/rating/tests/rating_test.php index f9f034a41d3..307b77786be 100644 --- a/rating/tests/rating_test.php +++ b/rating/tests/rating_test.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot . '/rating/lib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \rating */ -class rating_test extends \advanced_testcase { +final class rating_test extends \advanced_testcase { protected $syscontext; protected $neededcaps = array('view', 'viewall', 'viewany', 'rate'); diff --git a/report/completion/tests/event/events_test.php b/report/completion/tests/event/events_test.php index c3b58673e61..84b388626d8 100644 --- a/report/completion/tests/event/events_test.php +++ b/report/completion/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace report_completion\event; * @copyright 2014 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * Setup testcase. diff --git a/report/insights/tests/externallib_test.php b/report/insights/tests/externallib_test.php index 0013668b336..6ff48e1cfbc 100644 --- a/report/insights/tests/externallib_test.php +++ b/report/insights/tests/externallib_test.php @@ -36,7 +36,7 @@ require_once(__DIR__ . '/../../../analytics/tests/fixtures/test_target_shortname * @copyright 2019 David Monllaó {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class externallib_test extends \advanced_testcase { +final class externallib_test extends \advanced_testcase { /** * test_action_executed diff --git a/report/log/tests/event/events_test.php b/report/log/tests/event/events_test.php index c5ff682ba7d..12c0c299904 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 722d1b9bb0b..e00aa6dc050 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 cb57595a785..9641ab9e589 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 5698bfc75ac..178b1d6f597 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 5a3d16989be..abf90c80739 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 fd4cc371e2d..7c71d602cee 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 9704ea31b30..ded78590e92 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 c4034d31ffd..acb83609474 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 0da9f424606..a623a9b9d6f 100644 --- a/report/stats/tests/lib_test.php +++ b/report/stats/tests/lib_test.php @@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/report/stats/tests/privacy/provider_test.php b/report/stats/tests/privacy/provider_test.php index f538eb61e13..d8c52a698ce 100644 --- a/report/stats/tests/privacy/provider_test.php +++ b/report/stats/tests/privacy/provider_test.php @@ -34,7 +34,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Convenience function to create stats. diff --git a/report/usersessions/tests/lib_test.php b/report/usersessions/tests/lib_test.php index 30e1609bea6..290056e640e 100644 --- a/report/usersessions/tests/lib_test.php +++ b/report/usersessions/tests/lib_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot. '/report/usersessions/lib.php'); * @copyright 2014 onwards Ankit agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * @var stdClass The user. diff --git a/reportbuilder/tests/external/audiences/delete_test.php b/reportbuilder/tests/external/audiences/delete_test.php index 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/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/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_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_exporter_test.php b/reportbuilder/tests/external/custom_report_exporter_test.php index 297db31ddb0..eb0f888dbeb 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/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 881a97bb213..67289cf4e3c 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 0b0d151d2a3..0dadf22ad83 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 f867a6f41b6..1b24059c652 100644 --- a/reportbuilder/tests/generator_test.php +++ b/reportbuilder/tests/generator_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends advanced_testcase { +final class generator_test extends advanced_testcase { /** * Test creating a report diff --git a/reportbuilder/tests/local/aggregation/avg_test.php b/reportbuilder/tests/local/aggregation/avg_test.php index 86123c3c7de..cea5099deed 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 cbdc62b4c96..45212eac839 100644 --- a/reportbuilder/tests/local/aggregation/count_test.php +++ b/reportbuilder/tests/local/aggregation/count_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class count_test extends core_reportbuilder_testcase { +final class count_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/countdistinct_test.php b/reportbuilder/tests/local/aggregation/countdistinct_test.php index a3103c3cdc3..6ad16d1aefe 100644 --- a/reportbuilder/tests/local/aggregation/countdistinct_test.php +++ b/reportbuilder/tests/local/aggregation/countdistinct_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class countdistinct_test extends core_reportbuilder_testcase { +final class countdistinct_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/groupconcat_test.php b/reportbuilder/tests/local/aggregation/groupconcat_test.php index 94b6e9643e7..bd3e47977f5 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 0477ba8a423..6739e01fac9 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 546900507c8..42bd3ff61e2 100644 --- a/reportbuilder/tests/local/aggregation/max_test.php +++ b/reportbuilder/tests/local/aggregation/max_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class max_test extends core_reportbuilder_testcase { +final class max_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/min_test.php b/reportbuilder/tests/local/aggregation/min_test.php index 6f5503846b2..a8baf22ee18 100644 --- a/reportbuilder/tests/local/aggregation/min_test.php +++ b/reportbuilder/tests/local/aggregation/min_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class min_test extends core_reportbuilder_testcase { +final class min_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/percent_test.php b/reportbuilder/tests/local/aggregation/percent_test.php index cbf84343873..53d54f02a67 100644 --- a/reportbuilder/tests/local/aggregation/percent_test.php +++ b/reportbuilder/tests/local/aggregation/percent_test.php @@ -36,7 +36,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class percent_test extends core_reportbuilder_testcase { +final class percent_test extends core_reportbuilder_testcase { /** * Test aggregation when applied to column diff --git a/reportbuilder/tests/local/aggregation/sum_test.php b/reportbuilder/tests/local/aggregation/sum_test.php index c8b8aaa467e..c725113cbea 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/user_test.php b/reportbuilder/tests/local/entities/user_test.php index ee0535d55a0..413d6d34132 100644 --- a/reportbuilder/tests/local/entities/user_test.php +++ b/reportbuilder/tests/local/entities/user_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_test extends advanced_testcase { +final class user_test extends advanced_testcase { /** * Test getting user identity column diff --git a/reportbuilder/tests/local/filters/autocomplete_test.php b/reportbuilder/tests/local/filters/autocomplete_test.php index 5216cccc7c4..de2e6962063 100644 --- a/reportbuilder/tests/local/filters/autocomplete_test.php +++ b/reportbuilder/tests/local/filters/autocomplete_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2022 Nathan Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class autocomplete_test extends advanced_testcase { +final class autocomplete_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/boolean_select_test.php b/reportbuilder/tests/local/filters/boolean_select_test.php index f808e66c326..54add02e6ad 100644 --- a/reportbuilder/tests/local/filters/boolean_select_test.php +++ b/reportbuilder/tests/local/filters/boolean_select_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class boolean_select_test extends advanced_testcase { +final class boolean_select_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/category_test.php b/reportbuilder/tests/local/filters/category_test.php index 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/course_selector_test.php b/reportbuilder/tests/local/filters/course_selector_test.php index 56da54a805e..b3efe3c3005 100644 --- a/reportbuilder/tests/local/filters/course_selector_test.php +++ b/reportbuilder/tests/local/filters/course_selector_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class course_selector_test extends advanced_testcase { +final class course_selector_test extends advanced_testcase { /** * Test getting filter SQL diff --git a/reportbuilder/tests/local/filters/select_test.php b/reportbuilder/tests/local/filters/select_test.php index 475ae6b5851..6bbbc6b9a42 100644 --- a/reportbuilder/tests/local/filters/select_test.php +++ b/reportbuilder/tests/local/filters/select_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class select_test extends advanced_testcase { +final class select_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/tags_test.php b/reportbuilder/tests/local/filters/tags_test.php index a3148673c08..5d487e42b9c 100644 --- a/reportbuilder/tests/local/filters/tags_test.php +++ b/reportbuilder/tests/local/filters/tags_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class tags_test extends advanced_testcase { +final class tags_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/filters/text_test.php b/reportbuilder/tests/local/filters/text_test.php index 0125ebdc7d1..d6ad518e04c 100644 --- a/reportbuilder/tests/local/filters/text_test.php +++ b/reportbuilder/tests/local/filters/text_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class text_test extends advanced_testcase { +final class text_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter_simple} diff --git a/reportbuilder/tests/local/filters/user_test.php b/reportbuilder/tests/local/filters/user_test.php index ea041c402e9..8757a625711 100644 --- a/reportbuilder/tests/local/filters/user_test.php +++ b/reportbuilder/tests/local/filters/user_test.php @@ -31,7 +31,7 @@ use core_reportbuilder\local\report\filter; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_test extends advanced_testcase { +final class user_test extends advanced_testcase { /** * Data provider for {@see test_get_sql_filter} diff --git a/reportbuilder/tests/local/helpers/user_filter_manager_test.php b/reportbuilder/tests/local/helpers/user_filter_manager_test.php index 909c3667877..5a7416d1e16 100644 --- a/reportbuilder/tests/local/helpers/user_filter_manager_test.php +++ b/reportbuilder/tests/local/helpers/user_filter_manager_test.php @@ -28,7 +28,7 @@ use advanced_testcase; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class user_filter_manager_test extends advanced_testcase { +final class user_filter_manager_test extends advanced_testcase { /** * Helper method to return all user preferences for filters - based on the current storage backend using the same diff --git a/reportbuilder/tests/local/models/audience_test.php b/reportbuilder/tests/local/models/audience_test.php index 257b0b17d5e..9e46c901507 100644 --- a/reportbuilder/tests/local/models/audience_test.php +++ b/reportbuilder/tests/local/models/audience_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class audience_test extends advanced_testcase { +final class audience_test extends advanced_testcase { /** * Tests for audience_created event diff --git a/reportbuilder/tests/local/models/report_test.php b/reportbuilder/tests/local/models/report_test.php index 688010d4d51..e0bf5762d86 100644 --- a/reportbuilder/tests/local/models/report_test.php +++ b/reportbuilder/tests/local/models/report_test.php @@ -33,7 +33,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_test extends advanced_testcase { +final class report_test extends advanced_testcase { /** * Tests for report_created event diff --git a/reportbuilder/tests/local/models/schedule_test.php b/reportbuilder/tests/local/models/schedule_test.php index 25e50e2c97f..53fdd103cfd 100644 --- a/reportbuilder/tests/local/models/schedule_test.php +++ b/reportbuilder/tests/local/models/schedule_test.php @@ -34,7 +34,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class schedule_test extends advanced_testcase { +final class schedule_test extends advanced_testcase { /** * Tests for schedule_created event diff --git a/reportbuilder/tests/local/report/action_test.php b/reportbuilder/tests/local/report/action_test.php index 1e3735c96ea..2fcf3809020 100644 --- a/reportbuilder/tests/local/report/action_test.php +++ b/reportbuilder/tests/local/report/action_test.php @@ -32,7 +32,7 @@ use stdClass; * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class action_test extends advanced_testcase { +final class action_test extends advanced_testcase { /** * Test adding a callback that returns true diff --git a/reportbuilder/tests/local/report/base_test.php b/reportbuilder/tests/local/report/base_test.php index 63ea6aa792d..c26315efe5c 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/manager_test.php b/reportbuilder/tests/manager_test.php index 983661927aa..e2638d4c4b8 100644 --- a/reportbuilder/tests/manager_test.php +++ b/reportbuilder/tests/manager_test.php @@ -39,7 +39,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php"); * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends core_reportbuilder_testcase { +final class manager_test extends core_reportbuilder_testcase { /** * Test creating a report instance from persistent diff --git a/reportbuilder/tests/output/audience_heading_editable_test.php b/reportbuilder/tests/output/audience_heading_editable_test.php index 266cb49b99a..d1b2bc0e124 100644 --- a/reportbuilder/tests/output/audience_heading_editable_test.php +++ b/reportbuilder/tests/output/audience_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class audience_heading_editable_test extends advanced_testcase { +final class audience_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/column_aggregation_editable_test.php b/reportbuilder/tests/output/column_aggregation_editable_test.php index 1c7bf1dbd87..f2726dfa9b4 100644 --- a/reportbuilder/tests/output/column_aggregation_editable_test.php +++ b/reportbuilder/tests/output/column_aggregation_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class column_aggregation_editable_test extends advanced_testcase { +final class column_aggregation_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/column_heading_editable_test.php b/reportbuilder/tests/output/column_heading_editable_test.php index 9f02bb10109..70c9ed40b4f 100644 --- a/reportbuilder/tests/output/column_heading_editable_test.php +++ b/reportbuilder/tests/output/column_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class column_heading_editable_test extends advanced_testcase { +final class column_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/filter_heading_editable_test.php b/reportbuilder/tests/output/filter_heading_editable_test.php index f4d5d5af5e4..c0a48bc75fa 100644 --- a/reportbuilder/tests/output/filter_heading_editable_test.php +++ b/reportbuilder/tests/output/filter_heading_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_heading_editable_test extends advanced_testcase { +final class filter_heading_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/report_name_editable_test.php b/reportbuilder/tests/output/report_name_editable_test.php index 78aac9d72c9..301571f4e5f 100644 --- a/reportbuilder/tests/output/report_name_editable_test.php +++ b/reportbuilder/tests/output/report_name_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class report_name_editable_test extends advanced_testcase { +final class report_name_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/output/schedule_name_editable_test.php b/reportbuilder/tests/output/schedule_name_editable_test.php index 639626de94a..028eed1a39c 100644 --- a/reportbuilder/tests/output/schedule_name_editable_test.php +++ b/reportbuilder/tests/output/schedule_name_editable_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class schedule_name_editable_test extends advanced_testcase { +final class schedule_name_editable_test extends advanced_testcase { /** * Test update method diff --git a/reportbuilder/tests/privacy/provider_test.php b/reportbuilder/tests/privacy/provider_test.php index 4b9d2328223..34deb283a29 100644 --- a/reportbuilder/tests/privacy/provider_test.php +++ b/reportbuilder/tests/privacy/provider_test.php @@ -43,7 +43,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Test provider metadata diff --git a/reportbuilder/tests/reportbuilder/audience/admins_test.php b/reportbuilder/tests/reportbuilder/audience/admins_test.php index 0a381f3ebff..7b9952fa206 100644 --- a/reportbuilder/tests/reportbuilder/audience/admins_test.php +++ b/reportbuilder/tests/reportbuilder/audience/admins_test.php @@ -30,7 +30,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2022 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class admins_test extends advanced_testcase { +final class admins_test extends advanced_testcase { /** * Test whether user can add this audience diff --git a/reportbuilder/tests/reportbuilder/audience/allusers_test.php b/reportbuilder/tests/reportbuilder/audience/allusers_test.php index f76455c9702..a9fbe3f77bf 100644 --- a/reportbuilder/tests/reportbuilder/audience/allusers_test.php +++ b/reportbuilder/tests/reportbuilder/audience/allusers_test.php @@ -31,7 +31,7 @@ use core_user\reportbuilder\datasource\users; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class allusers_test extends advanced_testcase { +final class allusers_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/reportbuilder/audience/manual_test.php b/reportbuilder/tests/reportbuilder/audience/manual_test.php index 2462dad5489..b8a98fe5299 100644 --- a/reportbuilder/tests/reportbuilder/audience/manual_test.php +++ b/reportbuilder/tests/reportbuilder/audience/manual_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manual_test extends advanced_testcase { +final class manual_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/reportbuilder/audience/systemrole_test.php b/reportbuilder/tests/reportbuilder/audience/systemrole_test.php index 5f97942c8ad..78c6d9fc614 100644 --- a/reportbuilder/tests/reportbuilder/audience/systemrole_test.php +++ b/reportbuilder/tests/reportbuilder/audience/systemrole_test.php @@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class systemrole_test extends advanced_testcase { +final class systemrole_test extends advanced_testcase { /** * Test that this audience type description is generated correctly diff --git a/reportbuilder/tests/system_report_factory_test.php b/reportbuilder/tests/system_report_factory_test.php index 96245be9cac..4055d1c2fd8 100644 --- a/reportbuilder/tests/system_report_factory_test.php +++ b/reportbuilder/tests/system_report_factory_test.php @@ -30,7 +30,7 @@ use stdClass; * @copyright 2020 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_factory_test extends advanced_testcase { +final class system_report_factory_test extends advanced_testcase { /** * Test creating a valid/available system report diff --git a/reportbuilder/tests/system_report_test.php b/reportbuilder/tests/system_report_test.php index 79660592d1b..cfd3322ed0c 100644 --- a/reportbuilder/tests/system_report_test.php +++ b/reportbuilder/tests/system_report_test.php @@ -30,7 +30,7 @@ use core_reportbuilder\local\report\action; * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class system_report_test extends advanced_testcase { +final class system_report_test extends advanced_testcase { /** * Test for actions */ diff --git a/reportbuilder/tests/task/send_schedule_test.php b/reportbuilder/tests/task/send_schedule_test.php index 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 b7e6cafe0d5..179ebc3b6cc 100644 --- a/repository/contentbank/tests/browser_test.php +++ b/repository/contentbank/tests/browser_test.php @@ -29,7 +29,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2020 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class browser_test extends \advanced_testcase { +final class browser_test extends \advanced_testcase { /** * Test get_content() in the system context with users that have capability to access/view content bank content diff --git a/repository/contentbank/tests/search/search_test.php b/repository/contentbank/tests/search/search_test.php index 76a62d7443c..c01bba16f90 100644 --- a/repository/contentbank/tests/search/search_test.php +++ b/repository/contentbank/tests/search/search_test.php @@ -37,7 +37,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2020 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * Test get_search_contents() by searching through some existing content using different search terms. diff --git a/repository/dropbox/tests/api_test.php b/repository/dropbox/tests/api_test.php index 4b128c160c7..8ad215cc6bb 100644 --- a/repository/dropbox/tests/api_test.php +++ b/repository/dropbox/tests/api_test.php @@ -23,7 +23,7 @@ namespace repository_dropbox; * @copyright Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class api_test extends \advanced_testcase { +final class api_test extends \advanced_testcase { /** * Data provider for has_additional_results. * diff --git a/repository/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 544cec329cf..e0b3948d7db 100644 --- a/repository/flickr/tests/privacy/provider_test.php +++ b/repository/flickr/tests/privacy/provider_test.php @@ -36,7 +36,7 @@ use core_privacy\tests\provider_testcase; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Overriding setUp() function to always reset after tests. */ diff --git a/repository/googledocs/tests/googledocs_search_content_test.php b/repository/googledocs/tests/googledocs_search_content_test.php index 4bdf067cbea..601ba76d402 100644 --- a/repository/googledocs/tests/googledocs_search_content_test.php +++ b/repository/googledocs/tests/googledocs_search_content_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googledocs_search_content_test extends \googledocs_content_testcase { +final class googledocs_search_content_test extends \googledocs_content_testcase { /** * Test get_content_nodes(). diff --git a/repository/googledocs/tests/helper_test.php b/repository/googledocs/tests/helper_test.php index dd761c446af..e979490d206 100644 --- a/repository/googledocs/tests/helper_test.php +++ b/repository/googledocs/tests/helper_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class helper_test extends \repository_googledocs_testcase { +final class helper_test extends \repository_googledocs_testcase { /** * Test build_node_path(). diff --git a/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php b/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php index f7b2d36ffc2..350d20d048b 100644 --- a/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php +++ b/repository/googledocs/tests/local/browser/googledocs_drive_content_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/repository/googledocs/lib.php'); * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class googledocs_drive_content_test extends \googledocs_content_testcase { +final class googledocs_drive_content_test extends \googledocs_content_testcase { /** * Test get_content_nodes(). diff --git a/repository/googledocs/tests/local/node/folder_node_test.php b/repository/googledocs/tests/local/node/folder_node_test.php index fce98c80d26..c0933b69dd4 100644 --- a/repository/googledocs/tests/local/node/folder_node_test.php +++ b/repository/googledocs/tests/local/node/folder_node_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/repository/googledocs/tests/repository_googledocs * @copyright 2021 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class folder_node_test extends \repository_googledocs_testcase { +final class folder_node_test extends \repository_googledocs_testcase { /** * Test create_node_array(). diff --git a/repository/nextcloud/tests/access_controlled_link_manager_test.php b/repository/nextcloud/tests/access_controlled_link_manager_test.php index 4dc409c964e..cf5ebe26935 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 fb942cf5b58..c41965782c3 100644 --- a/repository/nextcloud/tests/lib_test.php +++ b/repository/nextcloud/tests/lib_test.php @@ -38,7 +38,7 @@ require_once($CFG->libdir . '/webdavlib.php'); * @copyright 2017 Project seminar (Learnweb, University of Münster) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** @var null|\repository_nextcloud the repository_nextcloud object, which the tests are run on. */ private $repo = null; diff --git a/repository/nextcloud/tests/ocs_test.php b/repository/nextcloud/tests/ocs_test.php index 8982b8fe419..6405e2b28f8 100644 --- a/repository/nextcloud/tests/ocs_test.php +++ b/repository/nextcloud/tests/ocs_test.php @@ -24,7 +24,7 @@ namespace repository_nextcloud; * @copyright 2017 Jan Dageförde (Learnweb, University of Münster) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class ocs_test extends \advanced_testcase { +final class ocs_test extends \advanced_testcase { /** * @var \core\oauth2\issuer diff --git a/repository/onedrive/tests/privacy/provider_test.php b/repository/onedrive/tests/privacy/provider_test.php index 6b988f24a93..f767204ee62 100644 --- a/repository/onedrive/tests/privacy/provider_test.php +++ b/repository/onedrive/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use repository_onedrive\privacy\provider; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/repository/recent/tests/lib_test.php b/repository/recent/tests/lib_test.php index 270e1f841aa..c28f12b5926 100644 --- a/repository/recent/tests/lib_test.php +++ b/repository/recent/tests/lib_test.php @@ -41,7 +41,7 @@ require_once($CFG->dirroot . '/files/externallib.php'); * @copyright Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** @var repository Recent repository */ private $repo; diff --git a/repository/tests/generator_test.php b/repository/tests/generator_test.php index aea74f8cd97..14b0eecdf44 100644 --- a/repository/tests/generator_test.php +++ b/repository/tests/generator_test.php @@ -35,7 +35,7 @@ use repository_exception; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class generator_test extends \advanced_testcase { +final class generator_test extends \advanced_testcase { /** * Basic test of creation of repository types. diff --git a/repository/tests/privacy/provider_test.php b/repository/tests/privacy/provider_test.php index d6b4b845663..172fdcc1b2e 100644 --- a/repository/tests/privacy/provider_test.php +++ b/repository/tests/privacy/provider_test.php @@ -37,7 +37,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Overriding setUp() function to always reset after tests. diff --git a/repository/tests/repositorylib_test.php b/repository/tests/repositorylib_test.php index 10416016bcd..ec1827faeba 100644 --- a/repository/tests/repositorylib_test.php +++ b/repository/tests/repositorylib_test.php @@ -33,7 +33,7 @@ require_once("$CFG->dirroot/repository/lib.php"); * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class repositorylib_test extends \advanced_testcase { +final class repositorylib_test extends \advanced_testcase { /** * Installing repository tests diff --git a/repository/url/tests/lib_test.php b/repository/url/tests/lib_test.php index e26aabf2578..ddbc718db8d 100644 --- a/repository/url/tests/lib_test.php +++ b/repository/url/tests/lib_test.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot . '/repository/url/lib.php'); * @copyright 2014 John Okely * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \advanced_testcase { +final class lib_test extends \advanced_testcase { /** * Check that the url escaper performs as expected diff --git a/rss/tests/privacy/provider_test.php b/rss/tests/privacy/provider_test.php index c44f4125940..5cebc4a6346 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 22fdc0ff59e..c15edb10fcb 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 9bc628fb36f..acd2c914b7d 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 e6b0f879f0e..ee49a82d768 100644 --- a/search/engine/solr/tests/privacy/provider_test.php +++ b/search/engine/solr/tests/privacy/provider_test.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2018 David Monllao * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Verify that a collection of metadata is returned for this component and that it just links to an external location. diff --git a/search/tests/area_category_test.php b/search/tests/area_category_test.php index 814f3fd3e14..4a4bb0abf4a 100644 --- a/search/tests/area_category_test.php +++ b/search/tests/area_category_test.php @@ -22,7 +22,7 @@ namespace core_search; * @copyright 2018 Dmitrii Metelkin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class area_category_test extends \advanced_testcase { +final class area_category_test extends \advanced_testcase { /** * A helper function to get a mocked search area. diff --git a/search/tests/base_activity_test.php b/search/tests/base_activity_test.php index ebd615e48d8..4df6fa1d489 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 7ce367c960b..33162557597 100644 --- a/search/tests/base_block_test.php +++ b/search/tests/base_block_test.php @@ -28,7 +28,7 @@ require_once(__DIR__ . '/fixtures/mock_block_area.php'); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_block_test extends \advanced_testcase { +final class base_block_test extends \advanced_testcase { /** * Tests getting the name out of the class name. */ diff --git a/search/tests/base_test.php b/search/tests/base_test.php index a9058902560..0de6d9e7e26 100644 --- a/search/tests/base_test.php +++ b/search/tests/base_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/mock_search_area.php'); * @copyright 2017 Matt Porritt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class base_test extends \advanced_testcase { +final class base_test extends \advanced_testcase { /** * @var \core_search::manager */ diff --git a/search/tests/document_icon_test.php b/search/tests/document_icon_test.php index 7fbb837f1b7..6c46be33591 100644 --- a/search/tests/document_icon_test.php +++ b/search/tests/document_icon_test.php @@ -23,7 +23,7 @@ namespace core_search; * @copyright 2018 Dmitrii Metelkin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class document_icon_test extends \advanced_testcase { +final class document_icon_test extends \advanced_testcase { /** * Test that default component gets returned correctly. */ diff --git a/search/tests/document_test.php b/search/tests/document_test.php index 6ae7dee5fb3..6f45a5ac563 100644 --- a/search/tests/document_test.php +++ b/search/tests/document_test.php @@ -32,7 +32,7 @@ use stdClass; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core_search\document */ -class document_test extends \advanced_testcase { +final class document_test extends \advanced_testcase { /** * Setup to ensure that fixtures are loaded. diff --git a/search/tests/engine_test.php b/search/tests/engine_test.php index 555818a755b..e04010aa67a 100644 --- a/search/tests/engine_test.php +++ b/search/tests/engine_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/mock_search_area.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class engine_test extends \advanced_testcase { +final class engine_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/event/events_test.php b/search/tests/event/events_test.php index 91dfc35dc2b..def54405b2e 100644 --- a/search/tests/event/events_test.php +++ b/search/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace core_search\event; * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { /** * test_search_results_viewed diff --git a/search/tests/external/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 10ab44c9ec6..ca892ee8fc7 100644 --- a/search/tests/external_test.php +++ b/search/tests/external_test.php @@ -31,7 +31,7 @@ namespace core_search; * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class external_test extends \advanced_testcase { +final class external_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/search/tests/manager_test.php b/search/tests/manager_test.php index 1d4e34c9f75..a8deac7e4fa 100644 --- a/search/tests/manager_test.php +++ b/search/tests/manager_test.php @@ -29,7 +29,7 @@ require_once(__DIR__ . '/fixtures/mock_search_area.php'); * @copyright 2015 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class manager_test extends \advanced_testcase { +final class manager_test extends \advanced_testcase { /** * Forum area id. diff --git a/search/tests/skip_future_documents_iterator_test.php b/search/tests/skip_future_documents_iterator_test.php index a12ce76ac5b..2d137766565 100644 --- a/search/tests/skip_future_documents_iterator_test.php +++ b/search/tests/skip_future_documents_iterator_test.php @@ -35,7 +35,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2017 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class skip_future_documents_iterator_test extends \basic_testcase { +final class skip_future_documents_iterator_test extends \basic_testcase { /** * Test normal case with all documents in the past. diff --git a/search/tests/top_result_test.php b/search/tests/top_result_test.php index 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 8cac237e2df..520955ccaa0 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 071f5da7c66..0aa5809afc0 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 2f41e4e2489..7c063424a91 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 61d9a1d15b4..cd74be7f850 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 1cc7f127592..7e2749d7496 100644 --- a/tag/tests/taglib_test.php +++ b/tag/tests/taglib_test.php @@ -28,7 +28,7 @@ use core_tag_tag; * @copyright 2014 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class taglib_test extends \advanced_testcase { +final class taglib_test extends \advanced_testcase { /** * Test set up. diff --git a/theme/boost/tests/boostnavbar_test.php b/theme/boost/tests/boostnavbar_test.php index 1109d35dd7a..3dbe943f500 100644 --- a/theme/boost/tests/boostnavbar_test.php +++ b/theme/boost/tests/boostnavbar_test.php @@ -24,7 +24,7 @@ namespace theme_boost; * @copyright 2021 Peter Dias * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class boostnavbar_test extends \advanced_testcase { +final class boostnavbar_test extends \advanced_testcase { /** * Provider for test_remove_no_link_items * The setup and expected arrays are defined as an array of 'nodekey' => $hasaction diff --git a/theme/boost/tests/privacy/provider_test.php b/theme/boost/tests/privacy/provider_test.php index 7da1d3e7a4f..52cd6a37743 100644 --- a/theme/boost/tests/privacy/provider_test.php +++ b/theme/boost/tests/privacy/provider_test.php @@ -28,7 +28,7 @@ use core_privacy\local\request\writer; * @copyright 2018 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** * Data provider for {@see test_export_user_preferences} diff --git a/theme/boost/tests/scss_test.php b/theme/boost/tests/scss_test.php index 30d5bb91dc5..95b720b4dd7 100644 --- a/theme/boost/tests/scss_test.php +++ b/theme/boost/tests/scss_test.php @@ -23,7 +23,7 @@ namespace theme_boost; * @copyright 2016 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Test that boost can be compiled using SassC (the defacto implemention). */ diff --git a/theme/classic/tests/scss_test.php b/theme/classic/tests/scss_test.php index 1b5d7ff0903..db4b00255f2 100644 --- a/theme/classic/tests/scss_test.php +++ b/theme/classic/tests/scss_test.php @@ -24,7 +24,7 @@ namespace theme_classic; * @copyright 2019 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class scss_test extends \advanced_testcase { +final class scss_test extends \advanced_testcase { /** * Test that classic can be compiled using SassC (the defacto implemention). */ diff --git a/user/profile/field/checkbox/tests/privacy/provider_test.php b/user/profile/field/checkbox/tests/privacy/provider_test.php index 37cf9e50621..f07fbcc9b9e 100644 --- a/user/profile/field/checkbox/tests/privacy/provider_test.php +++ b/user/profile/field/checkbox/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/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 640a67851ea..323f5c0c709 100644 --- a/user/profile/field/datetime/tests/privacy/provider_test.php +++ b/user/profile/field/datetime/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/menu/tests/privacy/provider_test.php b/user/profile/field/menu/tests/privacy/provider_test.php index dc6f30b9c68..491d8fd6aca 100644 --- a/user/profile/field/menu/tests/privacy/provider_test.php +++ b/user/profile/field/menu/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/social/tests/privacy/provider_test.php b/user/profile/field/social/tests/privacy/provider_test.php index fec6b397ca5..ee78ca30432 100644 --- a/user/profile/field/social/tests/privacy/provider_test.php +++ b/user/profile/field/social/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2020 Bas Brands * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/text/tests/field_class_test.php b/user/profile/field/text/tests/field_class_test.php index 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 d32ec1711eb..2549029ff94 100644 --- a/user/profile/field/text/tests/privacy/provider_test.php +++ b/user/profile/field/text/tests/privacy/provider_test.php @@ -33,7 +33,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/profile/field/textarea/tests/privacy/provider_test.php b/user/profile/field/textarea/tests/privacy/provider_test.php index a4c020c6b0a..023cc8369b8 100644 --- a/user/profile/field/textarea/tests/privacy/provider_test.php +++ b/user/profile/field/textarea/tests/privacy/provider_test.php @@ -35,7 +35,7 @@ use core_privacy\local\request\approved_userlist; * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends provider_testcase { +final class provider_test extends provider_testcase { /** * Basic setup for these tests. diff --git a/user/tests/devicekey_test.php b/user/tests/devicekey_test.php index 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 37b3a30ee1a..1633f73c21f 100644 --- a/user/tests/editlib_test.php +++ b/user/tests/editlib_test.php @@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/user/editlib.php'); * @copyright 2013 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class editlib_test extends \advanced_testcase { +final class editlib_test extends \advanced_testcase { /** * Test that the required fields are returned in the correct order. diff --git a/user/tests/external/update_user_device_public_key_test.php b/user/tests/external/update_user_device_public_key_test.php index 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 5a5fd0fa152..d803bc7980f 100644 --- a/user/tests/fields_test.php +++ b/user/tests/fields_test.php @@ -24,7 +24,7 @@ namespace core_user; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \core_user\fields */ -class fields_test extends \advanced_testcase { +final class fields_test extends \advanced_testcase { /** * Tests getting the user picture fields. diff --git a/user/tests/group_non_members_selector_test.php b/user/tests/group_non_members_selector_test.php index 04524a72cdc..df7a23b2773 100644 --- a/user/tests/group_non_members_selector_test.php +++ b/user/tests/group_non_members_selector_test.php @@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/user/selector/lib.php'); * @copyright 2019 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class group_non_members_selector_test extends \advanced_testcase { +final class group_non_members_selector_test extends \advanced_testcase { /** * Test find_users that only return group non members diff --git a/user/tests/myprofile_test.php b/user/tests/myprofile_test.php index b7bd3761a99..81c5f4139f3 100644 --- a/user/tests/myprofile_test.php +++ b/user/tests/myprofile_test.php @@ -28,7 +28,7 @@ require_once($CFG->dirroot . "/user/tests/fixtures/myprofile_fixtures.php"); * @copyright 2015 onwards Ankit Agarwal * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5) */ -class myprofile_test extends \advanced_testcase { +final class myprofile_test extends \advanced_testcase { /** * Test node::__construct(). */ diff --git a/user/tests/profilelib_test.php b/user/tests/profilelib_test.php index 458739341cc..a166574f61f 100644 --- a/user/tests/profilelib_test.php +++ b/user/tests/profilelib_test.php @@ -23,7 +23,7 @@ namespace core_user; * @copyright 2014 The Open University * @licensehttp://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class profilelib_test extends \advanced_testcase { +final class profilelib_test extends \advanced_testcase { /** * Load required test libraries diff --git a/user/tests/search/search_test.php b/user/tests/search/search_test.php index 91ab540bd6b..ebdfadb62ad 100644 --- a/user/tests/search/search_test.php +++ b/user/tests/search/search_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/search/tests/fixtures/testable_core_search.php'); * @copyright 2016 Devang Gaur {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class search_test extends \advanced_testcase { +final class search_test extends \advanced_testcase { /** * @var string Area id diff --git a/user/tests/userlib_test.php b/user/tests/userlib_test.php index cfde634a6c0..c160d4b2431 100644 --- a/user/tests/userlib_test.php +++ b/user/tests/userlib_test.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/lib/authlib.php'); * @copyright 2013 Rajesh Taneja * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userlib_test extends \advanced_testcase { +final class userlib_test extends \advanced_testcase { /** * Test user_get_user_details_courses */ diff --git a/user/tests/userroleseditable_test.php b/user/tests/userroleseditable_test.php index 04f75e25410..e80abf9bb6e 100644 --- a/user/tests/userroleseditable_test.php +++ b/user/tests/userroleseditable_test.php @@ -23,7 +23,7 @@ namespace core_user; * @copyright 2017 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userroleseditable_test extends \advanced_testcase { +final class userroleseditable_test extends \advanced_testcase { /** * Test user roles editable. */ diff --git a/user/tests/userselector_test.php b/user/tests/userselector_test.php index 2cdf60d7714..3205c681a97 100644 --- a/user/tests/userselector_test.php +++ b/user/tests/userselector_test.php @@ -32,7 +32,7 @@ require_once($CFG->dirroot.'/user/tests/fixtures/testable_user_selector.php'); * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class userselector_test extends \advanced_testcase { +final class userselector_test extends \advanced_testcase { /** * Setup the environment for the tests. diff --git a/webservice/soap/tests/wsdl_test.php b/webservice/soap/tests/wsdl_test.php index 703c0601e6d..a671c691c62 100644 --- a/webservice/soap/tests/wsdl_test.php +++ b/webservice/soap/tests/wsdl_test.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/webservice/soap/classes/wsdl.php'); * @copyright 2016 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class wsdl_test extends \advanced_testcase { +final class wsdl_test extends \advanced_testcase { /** * Test generated WSDL with no added complex types nor functions. diff --git a/webservice/tests/event/events_test.php b/webservice/tests/event/events_test.php index 6ceef550580..15acfc36671 100644 --- a/webservice/tests/event/events_test.php +++ b/webservice/tests/event/events_test.php @@ -33,7 +33,7 @@ namespace core_webservice\event; * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class events_test extends \advanced_testcase { +final class events_test extends \advanced_testcase { public function setUp(): void { $this->resetAfterTest(); diff --git a/webservice/tests/lib_test.php b/webservice/tests/lib_test.php index 53ddcd8f646..2f20f58a6dd 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.