From fd684278be7557541802abb061366b0028d56d02 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 29 Jul 2020 23:28:56 -0400 Subject: [PATCH] update failing test --- .../phpunit/CRM/Contribute/BAO/ContributionRecurTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php index 12d68ea8554a..9d33072b48e7 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php @@ -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, @@ -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. @@ -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);