Merge pull request #21554 from eileenmcnaughton/loop
[civicrm-core.git] / tests / phpunit / CRM / Contribute / Form / Contribution / ThankYouTest.php
index 5c32de65f46911c74e39f55e5fabcbd4f7e38c29..aa9b3e373f4372c63c53a496102c20d96b83524e 100644 (file)
@@ -21,14 +21,15 @@ class CRM_Contribute_Form_Contribution_ThankYouTest extends CiviUnitTestCase {
   /**
    * Clean up DB.
    */
-  public function tearDown() {
+  public function tearDown(): void {
     $this->quickCleanUpFinancialEntities();
+    parent::tearDown();
   }
 
   /**
    * Test that correct contribution status is fetched for both live and test contributions.
    */
-  public function testLiveAndTestContributionStatus() {
+  public function testLiveAndTestContributionStatus(): void {
     $paymentProcessorID = $this->paymentProcessorCreate(['payment_processor_type_id' => 'Dummy']);
 
     $form = $this->getThankYouFormWithContribution($paymentProcessorID, FALSE, FALSE);
@@ -77,6 +78,10 @@ class CRM_Contribute_Form_Contribution_ThankYouTest extends CiviUnitTestCase {
     if ($isTestContribution) {
       $form->_mode = 'test';
     }
+    $form->_values = [
+      'custom_pre_id' => NULL,
+      'custom_post_id' => NULL,
+    ];
 
     return $form;
   }