From 800325fcb6967aa623925dc03619c65f50c117b0 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 10 Nov 2021 02:46:33 +0000 Subject: [PATCH] [NFC] Fix test issue about trying to do array offset on NULL in Payment ProcessorFormTest --- .../CRM/Core/Payment/ProcessorFormTest.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/phpunit/CRM/Core/Payment/ProcessorFormTest.php b/tests/phpunit/CRM/Core/Payment/ProcessorFormTest.php index c924c08c21..ce391b488d 100644 --- a/tests/phpunit/CRM/Core/Payment/ProcessorFormTest.php +++ b/tests/phpunit/CRM/Core/Payment/ProcessorFormTest.php @@ -216,6 +216,19 @@ class CRM_Core_Payment_ProcessorFormTest extends CiviUnitTestCase { class PaymentProcessorWithStandardBillingRequirements extends CRM_Core_Payment { + /** + * Constructor. + */ + public function __construct() { + $this->_paymentProcessor = [ + 'payment_type' => 0, + 'billing_mode' => 0, + 'id' => 0, + 'url_recur' => '', + 'is_recur' => 0, + ]; + } + /** * again, `checkConfig` is abstract in CRM_Core_Payment, so we are forced to implement it */ @@ -226,6 +239,19 @@ class PaymentProcessorWithStandardBillingRequirements extends CRM_Core_Payment { class PaymentProcessorWithCustomBillingRequirements extends CRM_Core_Payment { + /** + * Constructor. + */ + public function __construct() { + $this->_paymentProcessor = [ + 'payment_type' => 0, + 'billing_mode' => 0, + 'id' => 0, + 'url_recur' => '', + 'is_recur' => 0, + ]; + } + /** * again, `checkConfig` is abstract in CRM_Core_Payment, so we are forced to implement it */ -- 2.25.1