test fix
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 12 Jul 2015 23:25:23 +0000 (11:25 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 12 Jul 2015 23:25:23 +0000 (11:25 +1200)
CRM/Contribute/BAO/Contribution.php
tests/phpunit/CRM/Core/Payment/BaseIPNTest.php

index 40dff6d26ef729a5a84e3779edcc1195c687f44f..534b387ced444fe55747121837bb25cc3c7db461 100644 (file)
@@ -2075,9 +2075,8 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
     $paymentProcessorID = CRM_Utils_Array::value('paymentProcessor', $ids);
     $contributionType = new CRM_Financial_BAO_FinancialType();
     $contributionType->id = $this->financial_type_id;
-    if (!$contributionType->find(TRUE)) {
-      throw new Exception("Could not find financial type record: " . $this->financial_type_id);
-    }
+    $contributionType->find(TRUE);
+
     if (!empty($ids['contact'])) {
       $this->_relatedObjects['contact'] = new CRM_Contact_BAO_Contact();
       $this->_relatedObjects['contact']->id = $ids['contact'];
index 495c42fa27a8c060aac116bbb01e36760c37f9c8..82ecc9ab0b3c19dadf9574dc29ea327a7d56a3df 100644 (file)
@@ -422,6 +422,8 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase {
     if (!empty($contributionPage)) {
       $dao = new CRM_Core_DAO();
       $contribution_page = $dao->createTestObject('CRM_Contribute_DAO_ContributionPage');
+      $contribution_page->payment_processor = 1;
+      $contribution_page->save();
       $contribution->contribution_page_id = $contributionPageID = $contribution_page->id;
       //for unknown reasons trying to do a find & save on a contribution with a receive_date set
       // doesn't work. This seems of minimal relevance to this test so ignoring