Skip to content

Commit

Permalink
Merge pull request #14350 from seamuslee001/test_dev_627
Browse files Browse the repository at this point in the history
dev/core#627 Extend a unit test to verify fix made by Sunil
  • Loading branch information
seamuslee001 authored May 27, 2019
2 parents d9ac64d + 51258c3 commit 4f84ba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/phpunit/CRM/Pledge/BAO/PledgePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ public function testCreatePledgePaymentForMultipleInstallments2() {
$this->assertEquals(1, $pp['status_id']);
}

$this->assertEquals(count($pledgePayments['values']), CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions($pledge->id, 2));

// Cleanup
civicrm_api3('Pledge', 'delete', array(
'id' => $pledge->id,
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/CRM/Pledge/BAO/PledgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public function testPledgePaymentStatus() {

$this->assertEquals(count($pledgePayment), 1);
$payment = array_pop($pledgePayment);
// Assert that we actually have no pledge Payments
$this->assertEquals(0, CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions($pledge->id, array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'))));
$this->assertEquals($payment['status'], 'Pending');
$this->assertEquals($payment['scheduled_date'], date('Y-m-d 00:00:00', strtotime($scheduledDate)));
}
Expand Down

0 comments on commit 4f84ba4

Please sign in to comment.