From 42bd97fc5f8948a1d152db08082c0c110c8e4b2e Mon Sep 17 00:00:00 2001 From: Mo Farouk <122031508+fmido88@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:37:41 +0200 Subject: [PATCH] test classes declared as final --- tests/coupons_test.php | 2 +- tests/enrol_wallet_test.php | 2 +- tests/externallib_test.php | 2 +- tests/locallib_test.php | 2 +- tests/notifications_test.php | 2 +- tests/observer_test.php | 2 +- tests/payment/service_provider_test.php | 2 +- tests/transactions_test.php | 4 +--- tests/turn_non_refundable_test.php | 2 +- tests/util/balance_op_test.php | 2 +- tests/util/instance_test.php | 2 +- 11 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/coupons_test.php b/tests/coupons_test.php index cba96b17..14942ea8 100644 --- a/tests/coupons_test.php +++ b/tests/coupons_test.php @@ -31,7 +31,7 @@ * @copyright 2024 2024, Mohammad Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class coupons_test extends \advanced_testcase { +final class coupons_test extends \advanced_testcase { /** * Categories. diff --git a/tests/enrol_wallet_test.php b/tests/enrol_wallet_test.php index efc2b15e..9e03e867 100644 --- a/tests/enrol_wallet_test.php +++ b/tests/enrol_wallet_test.php @@ -39,7 +39,7 @@ * @copyright 2023 Mo Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class enrol_wallet_test extends \advanced_testcase { +final class enrol_wallet_test extends \advanced_testcase { /** * Basic test for enrol wallet plugin * @covers \enrol_wallet_plugin diff --git a/tests/externallib_test.php b/tests/externallib_test.php index b46add4e..d8ec771a 100644 --- a/tests/externallib_test.php +++ b/tests/externallib_test.php @@ -32,7 +32,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @runTestsInSeparateProcesses */ -class externallib_test extends externallib_advanced_testcase { +final class externallib_test extends externallib_advanced_testcase { /** * Test get_instance_info diff --git a/tests/locallib_test.php b/tests/locallib_test.php index 924846ac..49391352 100644 --- a/tests/locallib_test.php +++ b/tests/locallib_test.php @@ -37,7 +37,7 @@ * @copyright 2023 Mo Farouk * @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_enrol_wallet_is_borrow_eligible diff --git a/tests/notifications_test.php b/tests/notifications_test.php index 235fc8ed..ed1e9e1c 100644 --- a/tests/notifications_test.php +++ b/tests/notifications_test.php @@ -32,7 +32,7 @@ * @copyright 2023 Mo Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class notifications_test extends \advanced_testcase { +final class notifications_test extends \advanced_testcase { /** * Test transaction_notifications * @covers ::transaction_notify() diff --git a/tests/observer_test.php b/tests/observer_test.php index ce625a1b..23e4c483 100644 --- a/tests/observer_test.php +++ b/tests/observer_test.php @@ -38,7 +38,7 @@ * @copyright 2023 Mo Farouk * @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 event observer completion awards. * @covers ::wallet_completion_awards diff --git a/tests/payment/service_provider_test.php b/tests/payment/service_provider_test.php index 744a5657..33380902 100644 --- a/tests/payment/service_provider_test.php +++ b/tests/payment/service_provider_test.php @@ -30,7 +30,7 @@ * Unit tests for the enrol_wallet's payment subsystem callback implementation. * */ -class service_provider_test extends \advanced_testcase { +final class service_provider_test extends \advanced_testcase { /** * Test for service_provider::get_payable(). diff --git a/tests/transactions_test.php b/tests/transactions_test.php index c8708e53..4899b8c3 100644 --- a/tests/transactions_test.php +++ b/tests/transactions_test.php @@ -23,8 +23,6 @@ */ namespace enrol_wallet; -use enrol_wallet\transactions; - defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot.'/enrol/wallet/lib.php'); @@ -36,7 +34,7 @@ * @copyright 2023 Mo Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class transactions_test extends \advanced_testcase { +final class transactions_test extends \advanced_testcase { /** * The transactions class. diff --git a/tests/turn_non_refundable_test.php b/tests/turn_non_refundable_test.php index cdd78d5c..9721ad3d 100644 --- a/tests/turn_non_refundable_test.php +++ b/tests/turn_non_refundable_test.php @@ -34,7 +34,7 @@ * @copyright 2023 Mo Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class turn_non_refundable_test extends \advanced_testcase { +final class turn_non_refundable_test extends \advanced_testcase { /** * Test adhoc task turn_non_refundable. * @covers \turn_non_refundable diff --git a/tests/util/balance_op_test.php b/tests/util/balance_op_test.php index 4cc41ec1..c2a9c288 100644 --- a/tests/util/balance_op_test.php +++ b/tests/util/balance_op_test.php @@ -36,7 +36,7 @@ * @copyright 2024 Mohammad Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class balance_op_test extends \advanced_testcase { +final class balance_op_test extends \advanced_testcase { /** * Test conditional discounts. * @covers ::conditional_discount_charging() diff --git a/tests/util/instance_test.php b/tests/util/instance_test.php index 60ab06c2..52929983 100644 --- a/tests/util/instance_test.php +++ b/tests/util/instance_test.php @@ -31,7 +31,7 @@ * @copyright 2024 2024, Mohammad Farouk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class instance_test extends \advanced_testcase { +final class instance_test extends \advanced_testcase { /** * Testing get cost after discount. *