4.7beta1 fix for phpunit test failures
authormonishdeb <monish.deb@webaccessglobal.com>
Wed, 25 Nov 2015 12:18:51 +0000 (17:48 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 25 Nov 2015 12:18:51 +0000 (17:48 +0530)
CRM/Financial/BAO/PaymentProcessor.php
tests/phpunit/CRM/Dedupe/MergerTest.php
tests/phpunit/CRM/Event/BAO/ParticipantTest.php

index c8c31408ffb01b20c4c657922beddba81377e831..30692c2c3fe109119cda64009800ca58f63a6bbe 100644 (file)
@@ -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) {
index 7b524acefcbeaaad1d90488800aa7a67a2d8ea34..349ae3c2056332dea5fb11a50f9c8d8b1d82bd77 100644 (file)
@@ -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',
index edec20c1ac41d456cfd7182eeb81786d58f9999f..32d41e51908ac2ad737fca284df34a127f4043a2 100644 (file)
@@ -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) {