From 80b882d55dda4fd7f69b3887d207f32b3453dfa5 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 26 Mar 2023 11:15:58 +0100 Subject: [PATCH] [REF][PHP8.2] Convert dynamic property into a variable --- tests/phpunit/CRM/Member/Form/MembershipTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Member/Form/MembershipTest.php b/tests/phpunit/CRM/Member/Form/MembershipTest.php index f092f0484c..48bb259911 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipTest.php @@ -935,7 +935,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase { * Test membership with soft credits. */ public function testMembershipSoftCredit() { - $this->_softIndividualId = $this->individualCreate(); + $softIndividualId = $this->individualCreate(); $form = $this->getForm(); $form->preProcess(); @@ -948,7 +948,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase { 'name' => "Gift", 'option_group_id' => "soft_credit_type", ]); - $params['soft_credit_contact_id'] = $this->_softIndividualId; + $params['soft_credit_contact_id'] = $softIndividualId; $form->_contactID = $this->_individualId; // $form->_mode = 'test'; $form->testSubmit($params); @@ -957,7 +957,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase { // Verify is main contribution is created on soft contact. $contribution = $this->callAPISuccessGetSingle('Contribution', [ - 'contact_id' => $this->_softIndividualId, + 'contact_id' => $softIndividualId, ]); $this->assertEquals($contribution['soft_credit'][1]['contact_id'], $this->_individualId); -- 2.25.1