From 0b07e32e66fc59a638b27072774dc2c89ca3ee77 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 1 Feb 2022 23:12:26 +0000 Subject: [PATCH] Clean return values for dummy payment processor --- CRM/Core/Payment/Dummy.php | 4 ---- .../phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Core/Payment/Dummy.php b/CRM/Core/Payment/Dummy.php index 9d36f55aff..b48e6bf965 100644 --- a/CRM/Core/Payment/Dummy.php +++ b/CRM/Core/Payment/Dummy.php @@ -126,10 +126,6 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment { } } - // We shouldn't do this but it saves us changing the `testPayNowPayment` test to actually test the contribution - // like it should. - $result = array_merge($params, $result); - return $result; } diff --git a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php index 36b2a5e14b..ec0c119911 100644 --- a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php @@ -105,7 +105,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase { ); // Make sure that certain parameters are set on return from processConfirm - $this->assertEquals('Campaign Contribution', CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'financial_type_id', $processConfirmResult['financial_type_id'])); + $this->assertEquals('Campaign Contribution', CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'financial_type_id', $processConfirmResult['contribution']->financial_type_id)); // Based on the processed contribution, complete transaction which update the contribution status based on payment result. if (!empty($processConfirmResult['contribution'])) { -- 2.25.1