Skip to content

Commit

Permalink
Merge pull request #27166 from eileenmcnaughton/test_fix
Browse files Browse the repository at this point in the history
Remove some unused parameters in test class
  • Loading branch information
demeritcowboy authored Aug 26, 2023
2 parents bde6db9 + ef66db8 commit 5787091
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/phpunit/CRM/Event/Form/ParticipantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testSubmitUnpaidPriceChangeWhileStillPending(): void {

$priceSetID = $this->ids['PriceSet']['PaidEvent'];
$eventFeeBlock = CRM_Price_BAO_PriceSet::getSetDetail($priceSetID)[$priceSetID]['fields'];
CRM_Price_BAO_LineItem::changeFeeSelections($priceSetParams, $participant['id'], 'participant', $contribution['id'], $eventFeeBlock, $lineItem);
CRM_Price_BAO_LineItem::changeFeeSelections($priceSetParams, $participant['id'], 'participant', $contribution['id'], $eventFeeBlock);
// Check that no payment records have been created.
// In https://lab.civicrm.org/dev/financial/issues/94 we had an issue where payments were created when none happened.
$payments = $this->callAPISuccess('Payment', 'get', [])['values'];
Expand Down Expand Up @@ -147,9 +147,8 @@ public function testPaymentAllocationOnMultiLineItemEvent(): void {
'price_' . $this->ids['PriceField']['second_text_field'] => 1,
];
$participant = $this->callAPISuccess('Participant', 'get', []);
$lineItem = CRM_Price_BAO_LineItem::getLineItems($participant['id'], 'participant');
$contribution = $this->callAPISuccessGetSingle('Contribution', []);
CRM_Price_BAO_LineItem::changeFeeSelections($priceSetParams, $participant['id'], 'participant', $contribution['id'], $priceSetBlock, $lineItem);
CRM_Price_BAO_LineItem::changeFeeSelections($priceSetParams, $participant['id'], 'participant', $contribution['id'], $priceSetBlock);

$financialItems = $this->callAPISuccess('FinancialItem', 'get', [])['values'];
$sum = 0;
Expand Down Expand Up @@ -363,7 +362,7 @@ protected function getForm(array $eventParams = [], array $submittedValues = [],
'confirm_email_text' => "Just do it\n Now",
'is_show_location' => TRUE,
], $eventParams), ['is_quick_config' => $isQuickConfig]);
$submittedValues = array_merge($this->getRecordContributionParams('Partially paid', 'Pending'), $submittedValues);
$submittedValues = array_merge($this->getRecordContributionParams('Partially paid'), $submittedValues);
}
else {
$event = $this->eventCreateUnpaid($eventParams);
Expand Down Expand Up @@ -616,7 +615,7 @@ public function testSubmitPendingAddPayment(bool $isQuickConfig): void {
* @param bool $isAmountPaidOnForm
* Was the amount paid entered on the form (if so this should be on the receipt)
*/
protected function assertPartialPaymentResult(bool $isQuickConfig, CiviMailUtils $mut, $isAmountPaidOnForm = TRUE): void {
protected function assertPartialPaymentResult(bool $isQuickConfig, CiviMailUtils $mut, bool $isAmountPaidOnForm = TRUE): void {
$paymentInstrumentID = CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'payment_instrument_id', 'Check');
$contribution = $this->callAPISuccessGetSingle('Contribution', []);
$expected = [
Expand Down Expand Up @@ -791,7 +790,7 @@ public function testTransferParticipantRegistration(): void {
$form->transferParticipantRegistration($toContactId, $participantId);
$mut->checkAllMailLog(['Default Domain Name Anthony']);
$mut->clearMessages();
$this->revertTemplateToReservedTemplate('event_online_receipt', 'html');
$this->revertTemplateToReservedTemplate();

//Assert participant is transferred to $toContactId.
$participant = $this->callAPISuccess('Participant', 'getsingle', [
Expand Down

0 comments on commit 5787091

Please sign in to comment.