Skip to content

Commit

Permalink
Fix PaypalIPNTest frequency unit and rename mispelled file for test c…
Browse files Browse the repository at this point in the history
…lass
  • Loading branch information
mattwire committed Mar 16, 2018
1 parent 2084ec3 commit 8574a06
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ public function testIPNPaymentRecurSuccess() {
* Test IPN response updates contribution_recur & contribution for first & second contribution.
*/
public function testIPNPaymentMembershipRecurSuccess() {
$this->setupMembershipRecurringPaymentProcessorTransaction();
$durationUnit = 'year';
$this->setupMembershipRecurringPaymentProcessorTransaction(array('duration_unit' => $durationUnit, 'frequency_unit' => $durationUnit));
$this->callAPISuccessGetSingle('membership_payment', array());
$paypalIPN = new CRM_Core_Payment_PayPalIPN($this->getPaypalRecurTransaction());
$paypalIPN->main();
Expand All @@ -159,7 +160,8 @@ public function testIPNPaymentMembershipRecurSuccess() {
$this->assertEquals(5, $contributionRecur['contribution_status_id']);
$paypalIPN = new CRM_Core_Payment_PaypalIPN($this->getPaypalRecurSubsequentTransaction());
$paypalIPN->main();
$this->assertEquals(strtotime('+ 1 year', strtotime($membershipEndDate)), strtotime($this->callAPISuccessGetValue('membership', array('return' => 'end_date'))));
$renewedMembershipEndDate = $this->membershipRenewalDate($durationUnit, $membershipEndDate);
$this->assertEquals($renewedMembershipEndDate, $this->callAPISuccessGetValue('membership', array('return' => 'end_date')));
$contribution = $this->callAPISuccess('contribution', 'get', array(
'contribution_recur_id' => $this->_contributionRecurID,
'sequential' => 1,
Expand Down

0 comments on commit 8574a06

Please sign in to comment.