From 118a7b84b68201f9a89d72ca49b893f96a21a0db Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 1 Jan 2022 14:06:35 -0500 Subject: [PATCH] fix tests that will fail after 2021 --- CRM/Core/Payment/Dummy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Payment/Dummy.php b/CRM/Core/Payment/Dummy.php index ba458d1895..9d36f55aff 100644 --- a/CRM/Core/Payment/Dummy.php +++ b/CRM/Core/Payment/Dummy.php @@ -90,7 +90,7 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment { CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $propertyBag); // This means we can test failing transactions by setting a past year in expiry. A full expiry check would // be more complete. - if (!empty($params['credit_card_exp_date']['Y']) && date('Y') > + if (!empty($params['credit_card_exp_date']['Y']) && CRM_Utils_Time::date('Y') > CRM_Core_Payment_Form::getCreditCardExpirationYear($params)) { throw new PaymentProcessorException(ts('Invalid expiry date')); } -- 2.25.1