test-fixes, make use of is_test more consistent
authoreileenmcnaughton <eileen@fuzion.co.nz>
Mon, 13 Jul 2015 08:54:06 +0000 (08:54 +0000)
committereileenmcnaughton <eileen@fuzion.co.nz>
Mon, 13 Jul 2015 08:54:26 +0000 (08:54 +0000)
tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php

index 18f029a97f1622812613cd57bbb8f09ef0d4105e..f5225d7e5c0309d906dc4891a58e214cb6e004da 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
 
   public function setUp() {
     parent::setUp();
-    $this->_paymentProcessorID = $this->paymentProcessorCreate();
+    $this->_paymentProcessorID = $this->paymentProcessorCreate(array('is_test' => 0));
     $this->_contactID = $this->individualCreate();
     $contributionPage = $this->callAPISuccess('contribution_page', 'create', array(
         'title' => "Test Contribution Page",
@@ -58,7 +58,10 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test IPN response updates contribution_recur & contribution for first & second contribution
+   * Test IPN response updates contribution_recur & contribution for first & second contribution.
+   *
+   * The scenario is that a pending contribution exists and the first call will update it to completed.
+   * The second will create a new contribution.
    */
   public function testIPNPaymentRecurSuccess() {
     $this->setupRecurringPaymentProcessorTransaction();
index 548c5fb957cc9ddbac26c42ddb5294091e6fe9c8..08c065e6370bd4bdd176ef89034da3b971dfe57f 100755 (executable)
@@ -3217,7 +3217,7 @@ AND    ( TABLE_NAME LIKE 'civicrm_value_%' )
         'contact_id' => $this->_contactID,
         'contribution_page_id' => $this->_contributionPageID,
         'payment_processor_id' => $this->_paymentProcessorID,
-        'is_test' => 1,
+        'is_test' => 0,
       ),
     ));
     $this->_contributionRecurID = $contributionRecur['id'];