From 02509dc8cb6349ea53f420a3a93a6e2af57dc60a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 18 Dec 2023 09:05:54 +1300 Subject: [PATCH] Minor variable standardisation in test --- tests/phpunit/api/v3/ContributionTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 0bb1e080bd..ce56f971d0 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -3379,9 +3379,9 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $this->individualID = $this->createLoggedInUser(); $this->_params['source'] = 'Online Event Registration: Annual CiviCRM meet'; $contributionID = $this->createPendingParticipantContribution(); - $this->createJoinedProfile(['entity_id' => $this->_ids['event']['test'], 'entity_table' => 'civicrm_event']); - $this->createJoinedProfile(['entity_id' => $this->_ids['event']['test'], 'entity_table' => 'civicrm_event', 'weight' => 2], ['name' => 'post_1', 'title' => 'title_post_2', 'frontend_title' => 'public 2']); - $this->createJoinedProfile(['entity_id' => $this->_ids['event']['test'], 'entity_table' => 'civicrm_event', 'weight' => 3], ['name' => 'post_2', 'title' => 'title_post_3', 'frontend_title' => 'public 3']); + $this->createJoinedProfile(['entity_id' => $this->ids['Event']['PaidEvent'], 'entity_table' => 'civicrm_event']); + $this->createJoinedProfile(['entity_id' => $this->ids['Event']['PaidEvent'], 'entity_table' => 'civicrm_event', 'weight' => 2], ['name' => 'post_1', 'title' => 'title_post_2', 'frontend_title' => 'public 2']); + $this->createJoinedProfile(['entity_id' => $this->ids['Event']['PaidEvent'], 'entity_table' => 'civicrm_event', 'weight' => 3], ['name' => 'post_2', 'title' => 'title_post_3', 'frontend_title' => 'public 3']); $this->eliminateUFGroupOne(); $this->callAPISuccess('contribution', 'completetransaction', ['id' => $contributionID]); @@ -3899,8 +3899,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase { * @return int */ public function createPendingParticipantContribution(): int { - $this->_ids['event']['test'] = $this->eventCreatePaid(['is_email_confirm' => 1, 'confirm_from_email' => 'test@civicrm.org', 'confirm_email_text' => ''])['id']; - $participantID = $this->participantCreate(['event_id' => $this->_ids['event']['test'], 'status_id' => 6, 'contact_id' => $this->individualID]); + $this->ids['Event']['PaidEvent'] = $this->eventCreatePaid(['is_email_confirm' => 1, 'confirm_from_email' => 'test@civicrm.org', 'confirm_email_text' => ''])['id']; + $participantID = $this->participantCreate(['event_id' => $this->ids['Event']['PaidEvent'], 'status_id' => 6, 'contact_id' => $this->individualID]); $this->_ids['participant'] = $participantID; $params = array_merge($this->_params, ['contact_id' => $this->individualID, 'contribution_status_id' => 2, 'financial_type_id' => 'Event Fee']); $contribution = $this->callAPISuccess('contribution', 'create', $params); -- 2.25.1