Skip to content

Commit

Permalink
Merge pull request #18003 from demeritcowboy/membership-fail
Browse files Browse the repository at this point in the history
[Test framework] - Update failing test
  • Loading branch information
seamuslee001 authored Jul 30, 2020
2 parents 0ae23b9 + fd68427 commit d6989c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ public function testAutoRenewalWhenOneMemberIsDeceased() {
'contact_id' => $contactId,
'membership_type_id' => $priceField['membership_type_id'],
'source' => 'Payment',
'join_date' => '2020-04-28',
'start_date' => '2020-04-28',
'join_date' => date('Y-m') . '-28',
'start_date' => date('Y-m') . '-28',
'contribution_recur_id' => $contributionRecurId,
'status_id' => 'Pending',
'is_override' => 1,
Expand Down Expand Up @@ -378,7 +378,7 @@ public function testAutoRenewalWhenOneMemberIsDeceased() {
'id' => $mId,
'return' => 'end_date',
]);
$this->assertEquals($endDate, '2020-08-27', ts('End date incorrect.'));
$this->assertEquals(date('Y-m', strtotime('+4 months')) . '-27', $endDate, ts('End date incorrect.'));
}

// At this moment Contact 2 is deceased, but we wait until payment is recorded in civi before marking the contact deceased.
Expand Down Expand Up @@ -445,7 +445,7 @@ public function testAutoRenewalWhenOneMemberIsDeceased() {
'id' => $membershipId1,
'return' => 'end_date',
]);
$this->assertEquals($endDate, '2020-10-27', ts('End date incorrect.'));
$this->assertEquals(date('Y-m', strtotime('+6 months')) . '-27', $endDate, ts('End date incorrect.'));
// check line item and membership payment count.
$this->validateAllCounts($membershipId1, 6);
$this->validateAllCounts($membershipId2, 4);
Expand Down

0 comments on commit d6989c6

Please sign in to comment.