Skip to content

Commit

Permalink
Remove partially paid from statuses tested for RenewContribution
Browse files Browse the repository at this point in the history
We want to deprecate this as it doesn't work properly. In this case there is no need to test
it as it's not really valid & hopefully soon it would trigger a deprecation notice

Test that will work when we can deprecate civicrm#15855
  • Loading branch information
eileenmcnaughton committed Nov 16, 2019
1 parent 541a66b commit 23c6478
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/phpunit/api/v3/ContributionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2364,11 +2364,14 @@ public function testRepeatTransactionMembershipRenewCompletedContribution() {
* CRM-19945 Tests that Contribute.repeattransaction DOES NOT renew a membership when contribution status=Failed
*
* @dataProvider contributionStatusProvider
*
* @throws \CRM_Core_Exception
*/
public function testRepeatTransactionMembershipRenewContributionNotCompleted($contributionStatus) {
// Completed status should renew so we don't test that here
// In Progress status is only for recurring contributions so we don't test that here
if (in_array($contributionStatus['name'], ['Completed', 'In Progress'])) {
// In Progress status was never actually intended to be available for contributions.
// Partially paid is not valid.
if (in_array($contributionStatus['name'], ['Completed', 'In Progress', 'Partially paid'])) {
return;
}
list($originalContribution, $membership) = $this->setUpAutoRenewMembership();
Expand Down

0 comments on commit 23c6478

Please sign in to comment.