From a160bb08153122ed40338b62aa68cc5abc25132f Mon Sep 17 00:00:00 2001 From: eileenmcnaughton Date: Fri, 11 Sep 2015 01:46:48 +0000 Subject: [PATCH] test fixes --- CRM/Financial/BAO/PaymentProcessor.php | 6 +++--- Civi/Payment/System.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index 19bcbb87e0..e79722e603 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -267,9 +267,9 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces * @throws CiviCRM_API3_Exception * @return array */ - public static function getAllPaymentProcessors($mode, $reset = FALSE) { + public static function getAllPaymentProcessors($mode = 'all', $reset = FALSE) { - $cacheKey = 'CRM_Financial_BAO_Payment_Processor_' . ($mode ? 'test' : 'all') . '_' . CRM_Core_Config::domainID(); + $cacheKey = 'CRM_Financial_BAO_Payment_Processor_' . $mode . '_' . CRM_Core_Config::domainID(); if (!$reset) { $processors = CRM_Utils_Cache::singleton()->get($cacheKey); if (!empty($processors)) { @@ -328,7 +328,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces public static function getPaymentProcessors($capabilities = array(), $ids = FALSE) { $mode = NULL; $testProcessors = in_array('TestMode', $capabilities) ? self::getAllPaymentProcessors('test') : array(); - $processors = $liveProcessors = self::getAllPaymentProcessors('live'); + $processors = $liveProcessors = self::getAllPaymentProcessors('all'); if (in_array('TestMode', $capabilities)) { if ($ids) { diff --git a/Civi/Payment/System.php b/Civi/Payment/System.php index 253784f2d7..5bfa71b2a0 100644 --- a/Civi/Payment/System.php +++ b/Civi/Payment/System.php @@ -99,11 +99,11 @@ class System { * Flush processors from static cache. * * This is particularly used for tests. - * */ public function flushProcessors() { $this->cache = array(); - \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors(NULL, TRUE); + \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('all', TRUE); + \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('live', TRUE); \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('test', TRUE); } -- 2.25.1