From 6b1b1558576e996d18310ca37d20e0b63662159a Mon Sep 17 00:00:00 2001 From: eileenmcnaughton Date: Mon, 13 Jul 2015 08:54:06 +0000 Subject: [PATCH] test-fixes, make use of is_test more consistent --- tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php | 7 +++++-- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php index 18f029a97f..f5225d7e5c 100644 --- a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php @@ -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(); diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 548c5fb957..08c065e637 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -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']; -- 2.25.1