From 382c5680bb7bd74b2033dda1a6e53da8d8affd9e Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Wed, 29 Mar 2017 16:33:35 -0400 Subject: [PATCH] CRM-20336: Failed contributions should be set as failed, not left as pending (more test fixes). --- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 2 +- tests/phpunit/api/v3/ContributionPageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 66ad977196..62cc9ec37b 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -378,7 +378,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { catch (\Civi\Payment\Exception\PaymentProcessorException $e) { $this->callAPISuccessGetCount('Contribution', array( 'contact_id' => $this->_individualId, - 'contribution_status_id' => 'Pending', + 'contribution_status_id' => 'Failed', ), 1); $lineItem = $this->callAPISuccessGetSingle('line_item', array()); $this->assertEquals('50.00', $lineItem['unit_price']); diff --git a/tests/phpunit/api/v3/ContributionPageTest.php b/tests/phpunit/api/v3/ContributionPageTest.php index e9a6c3d7b8..eef7495dc7 100644 --- a/tests/phpunit/api/v3/ContributionPageTest.php +++ b/tests/phpunit/api/v3/ContributionPageTest.php @@ -646,7 +646,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $this->callAPISuccess('contribution_page', 'submit', $submitParams); $contribution = $this->callAPISuccessGetSingle('contribution', array( 'contribution_page_id' => $this->_ids['contribution_page'], - 'contribution_status_id' => 2, + 'contribution_status_id' => 'Failed', )); $this->callAPISuccessGetSingle('activity', array( -- 2.25.1