From: demeritcowboy Date: Sat, 1 Jan 2022 19:06:35 +0000 (-0500) Subject: fix tests that will fail after 2021 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=118a7b84b68201f9a89d72ca49b893f96a21a0db;p=civicrm-core.git fix tests that will fail after 2021 --- 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')); }