Minor params cleanup in test
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Dec 2023 06:02:56 +0000 (19:02 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Dec 2023 06:02:56 +0000 (19:02 +1300)
tests/phpunit/api/v3/ContributionPageTest.php

index 149ea4e500744c80f5aac878b55062b774cf2db8..d8c1e2e95bf172f6c9faea84fe174d81fe9c1947 100644 (file)
@@ -591,8 +591,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase {
    * @throws \Civi\API\Exception\UnauthorizedException
    */
   public function doSubmitMembershipPriceSetPaymentPaymentProcessorRecurInstantPayment(array $params = []): void {
-    $this->params['is_recur'] = 1;
-    $this->params['recur_frequency_unit'] = $params['recur_frequency_unit'];
+    $params['is_recur'] = 1;
     $membershipTypeParams['duration_unit'] = $params['duration_unit'];
     if ($params['recur_frequency_unit'] === $params['duration_unit']) {
       $durationUnit = $params['duration_unit'];
@@ -617,7 +616,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase {
     $submitParams = array_merge($this->getSubmitParamsMembership(TRUE), [
       'is_recur' => 1,
       'frequency_interval' => 1,
-      'frequency_unit' => $this->params['recur_frequency_unit'],
+      'frequency_unit' => $params['recur_frequency_unit'],
     ]);
 
     $this->callAPISuccess('ContributionPage', 'submit', $submitParams);