From: monishdeb Date: Wed, 25 Nov 2015 12:18:51 +0000 (+0530) Subject: 4.7beta1 fix for phpunit test failures X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=101d0fef76c0aec3be2850ecc2ac822375cea6c2;p=civicrm-core.git 4.7beta1 fix for phpunit test failures --- diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index c8c31408ff..30692c2c3f 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -348,7 +348,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces $testProcessors = in_array('TestMode', $capabilities) ? self::getAllPaymentProcessors('test') : array(); $processors = self::getAllPaymentProcessors('all'); - if (in_array('TestMode', $capabilities)) { + if (in_array('TestMode', $capabilities) && !is_scalar($ids)) { $possibleLiveIDs = array_diff($ids, array_keys($testProcessors)); foreach ($possibleLiveIDs as $possibleLiveID) { if (isset($processors[$possibleLiveID]) && ($liveProcessorName = $processors[$possibleLiveID]['name']) != FALSE) { diff --git a/tests/phpunit/CRM/Dedupe/MergerTest.php b/tests/phpunit/CRM/Dedupe/MergerTest.php index 7b524acefc..349ae3c205 100644 --- a/tests/phpunit/CRM/Dedupe/MergerTest.php +++ b/tests/phpunit/CRM/Dedupe/MergerTest.php @@ -393,6 +393,7 @@ class CRM_Dedupe_MergerTest extends CiviUnitTestCase { ), 'civicrm_participant' => array( 0 => 'contact_id', + 1 => 'transferred_to_contact_id', //CRM-16761 ), 'civicrm_payment_token' => array( 0 => 'contact_id', diff --git a/tests/phpunit/CRM/Event/BAO/ParticipantTest.php b/tests/phpunit/CRM/Event/BAO/ParticipantTest.php index edec20c1ac..32d41e5190 100644 --- a/tests/phpunit/CRM/Event/BAO/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/BAO/ParticipantTest.php @@ -120,6 +120,7 @@ class CRM_Event_BAO_ParticipantTest extends CiviUnitTestCase { 'discount_amount' => NULL, 'cart_id' => NULL, 'must_wait' => NULL, + 'transferred_to_contact_id' => NULL, //CRM-16761 ); foreach ($compareValues as $key => $value) {