diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php index e4c8cbaefb43..db84c19a23e6 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php @@ -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', [ diff --git a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php index 88db91f47872..a043d8b43ab0 100644 --- a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php +++ b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php @@ -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]); @@ -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);