Build form properly for PaymentEditTest::testSubmitOnPaymentInstrumentChange
authorMatthew Wire <mjw@mjwconsult.co.uk>
Mon, 21 Mar 2022 14:31:57 +0000 (14:31 +0000)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 20 May 2022 11:20:45 +0000 (12:20 +0100)
tests/phpunit/CRM/Financial/Form/PaymentEditTest.php

index 88db91f4787229b5743f1aa9dc0a254611b09003..486c90a6dcb78d1f2e4d80ece9c49c10153a0662 100644 (file)
@@ -54,6 +54,7 @@ class CRM_Financial_Form_PaymentEditTest extends CiviUnitTestCase {
       '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]);