From d2df2f0e84cadc60cafee78d6e65d8be4fa4b91b Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 28 Jan 2023 20:28:37 +0000 Subject: [PATCH] [REF][PHP8.2] Tidy up of CRM_Report_Form_Member_DetailTest --- .../phpunit/CRM/Report/Form/Member/DetailTest.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/CRM/Report/Form/Member/DetailTest.php b/tests/phpunit/CRM/Report/Form/Member/DetailTest.php index 63c4bed4e8..53a66f0ff7 100644 --- a/tests/phpunit/CRM/Report/Form/Member/DetailTest.php +++ b/tests/phpunit/CRM/Report/Form/Member/DetailTest.php @@ -18,11 +18,15 @@ use Civi\Api4\ContributionRecur; */ class CRM_Report_Form_Member_DetailTest extends CiviReportTestCase { + /** + * @var int + */ + private $membershipTypeID; + public function setUp(): void { parent::setUp(); - $this->_financialTypeId = 1; - $this->_membershipStatusID = $this->membershipStatusCreate('test status'); - $this->_membershipTypeID = $this->membershipTypeCreate(['name' => 'Test Member']); + $this->membershipStatusCreate('test status'); + $this->membershipTypeID = $this->membershipTypeCreate(['name' => 'Test Member']); } /** @@ -46,7 +50,7 @@ class CRM_Report_Form_Member_DetailTest extends CiviReportTestCase { ]; $recur1 = ContributionRecur::create()->setValues($recurParams)->execute()->first(); $memParams = [ - 'membership_type_id' => $this->_membershipTypeID, + 'membership_type_id' => $this->membershipTypeID, 'contact_id' => $indContactID1, 'status_id:name' => 'test status', 'contribution_recur_id' => $recur1['id'], @@ -70,7 +74,7 @@ class CRM_Report_Form_Member_DetailTest extends CiviReportTestCase { 'fields' => ['autorenew_status_id'], 'filters' => [ 'tid_op' => 'in', - 'tid_value' => $this->_membershipTypeID, + 'tid_value' => $this->membershipTypeID, 'autorenew_status_id_op' => 'in', 'autorenew_status_id_value' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_ContributionRecur', 'contribution_status_id', 'In Progress'), ], -- 2.25.1