Skip to content

Commit

Permalink
Add test of Supports Financial Type Change in Contribution Recur
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Jul 12, 2016
1 parent c2cea70 commit 748bcfb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,23 @@ public function testCancelRecur() {
CRM_Contribute_BAO_ContributionRecur::cancelRecurContribution($contributionRecur['id'], CRM_Core_DAO::$_nullObject);
}

/**
* Test checking if contribution recurr object can allow for changes to financial types.
*
*/
public function testSupportFinancialTypeChange() {
$contributionRecur = $this->callAPISuccess('contribution_recur', 'create', $this->_params);
$contribution = $this->callAPISuccess('contribution', 'create', array(
'contribution_recur_id' => $contributionRecur['id'],
'total_amount' => '3.00',
'financial_type_id' => 1,
'payment_instrument_id' => 1,
'currency' => 'USD',
'contact_id' => $this->individualCreate(),
'contribution_status_id' => 1,
'recieve_date' => 'yesterday',
));
$this->assertTrue(CRM_Contribute_BAO_ContributionRecur::supportsFinancialTypeChange($contributionRecur['id']));
}

}

0 comments on commit 748bcfb

Please sign in to comment.