Skip to content

Commit

Permalink
Merge pull request #23524 from mattwire/contributiontestfixes
Browse files Browse the repository at this point in the history
Payment forms test fixes
  • Loading branch information
demeritcowboy authored May 20, 2022
2 parents 5e71c13 + 5f51d54 commit 72920ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ public function testGetPreviousFinancialItemHavingTax(string $thousandSeparator)
'contribution_status_id' => 1,
'price_set_id' => 0,
]);
$form->buildForm();
$form->postProcess();
$contribution = $this->callAPISuccessGetSingle('Contribution',
[
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/CRM/Financial/Form/PaymentEditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function testSubmitOnPaymentInstrumentChange(): void {
'check_number' => '123XA',
'contribution_status_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Completed'),
]);
$form->buildForm();
$form->postProcess();
// fetch the financial trxn record later used in setting default values of payment edit form
$contribution = $this->callAPISuccessGetSingle('Contribution', ['contact_id' => $this->_individualID]);
Expand Down Expand Up @@ -123,6 +124,7 @@ public function testSubmitOnCheckNumberChange(): void {
'check_number' => $checkNumber1,
'contribution_status_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Completed'),
]);
$form->buildForm();
$form->postProcess();
$contribution = $this->callAPISuccessGetSingle('Contribution', ['contact_id' => $this->_individualID]);
$payments = CRM_Contribute_BAO_Contribution::getPaymentInfo($contribution['id'], 'contribute', TRUE);
Expand Down

0 comments on commit 72920ca

Please sign in to comment.