[NFC] Fix PHP 7.4 errors on ContributionPage tests
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 19 Mar 2021 21:54:54 +0000 (08:54 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 19 Mar 2021 21:54:54 +0000 (08:54 +1100)
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php
tests/phpunit/CRM/Contribute/Form/Contribution/ThankYouTest.php

index 84f42bad60a8a3740e2950ad34b0bffec251093e..1ab47a0d783a128c93e331a90d520634c633efd9 100644 (file)
@@ -65,6 +65,9 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase {
       'is_recur' => FALSE,
       'payment_instrument_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'payment_instrument_id', 'Credit card'),
     ];
+    $form->_values = [
+      'id' => $contributionPageID2,
+    ];
     $form->_params = [
       'contribution_id' => $contribution['id'],
       'credit_card_number' => 4111111111111111,
index 5c32de65f46911c74e39f55e5fabcbd4f7e38c29..aba8e8fa251bd481ff139f422553c787edd890b7 100644 (file)
@@ -77,6 +77,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;
   }