From 236054e3a6d43f5770ea0c8bb328614be3e00fbb Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 23 Feb 2022 09:37:08 -0500 Subject: [PATCH 1/2] move file --- .../RecurForms.php => CRMTraits/Contribute/RecurFormsTrait.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/phpunit/{CRM/Contribute/Form/RecurForms.php => CRMTraits/Contribute/RecurFormsTrait.php} (100%) diff --git a/tests/phpunit/CRM/Contribute/Form/RecurForms.php b/tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php similarity index 100% rename from tests/phpunit/CRM/Contribute/Form/RecurForms.php rename to tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php From 9bb5c4bda7040add2c4c6fdcb03c57fac13a8399 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 23 Feb 2022 09:44:53 -0500 Subject: [PATCH 2/2] convert to trait --- tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php | 4 +++- tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php | 4 +++- tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php b/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php index 2e6d65841227..fab2a8e1fb25 100644 --- a/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php @@ -12,7 +12,9 @@ /** * Class CRM_Contribute_Form_UpdateSubscriptionTest */ -class CRM_Contribute_Form_CancelSubscriptionTest extends CRM_Contribute_Form_RecurForms { +class CRM_Contribute_Form_CancelSubscriptionTest extends CiviUnitTestCase { + + use CRMTraits_Contribute_RecurFormsTrait; /** * Test the mail sent on update. diff --git a/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php b/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php index 7cb3d3ee529f..6f5a65ec7384 100644 --- a/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php @@ -12,7 +12,9 @@ /** * Class CRM_Contribute_Form_UpdateSubscriptionTest */ -class CRM_Contribute_Form_UpdateSubscriptionTest extends CRM_Contribute_Form_RecurForms { +class CRM_Contribute_Form_UpdateSubscriptionTest extends CiviUnitTestCase { + + use CRMTraits_Contribute_RecurFormsTrait; /** * Test the mail sent on update. diff --git a/tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php b/tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php index 0126e4182278..bfd35cdd4731 100644 --- a/tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php +++ b/tests/phpunit/CRMTraits/Contribute/RecurFormsTrait.php @@ -10,9 +10,9 @@ */ /** - * Class CRM_Contribute_Form_UpdateSubscriptionTest + * Trait CRMTraits_Contribute_RecurFormsTrait */ -class CRM_Contribute_Form_RecurForms extends CiviUnitTestCase { +trait CRMTraits_Contribute_RecurFormsTrait { /** * @var int