From a7c78cbbf1050243c0fb223e74b9dbb061325ae6 Mon Sep 17 00:00:00 2001 From: Edsel Date: Tue, 6 Sep 2016 15:18:39 +0530 Subject: [PATCH] CRM-19153 Fixed unit test ---------------------------------------- * CRM-19153: Future pledge start date causes improper future pledge payment dates https://issues.civicrm.org/jira/browse/CRM-19153 --- tests/phpunit/CRM/Pledge/BAO/PledgeTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Pledge/BAO/PledgeTest.php b/tests/phpunit/CRM/Pledge/BAO/PledgeTest.php index 1b46347283..2e07bb2fdb 100644 --- a/tests/phpunit/CRM/Pledge/BAO/PledgeTest.php +++ b/tests/phpunit/CRM/Pledge/BAO/PledgeTest.php @@ -148,13 +148,14 @@ class CRM_Pledge_BAO_PledgeTest extends CiviUnitTestCase { $this->assertEquals(date('m/d/Y', strtotime($date)), $paymentDate, "The two dates do not match"); // Try with fixed date + $date = NULL; $params = array( - 'pledge_start_date' => json_encode(array('contribution_date' => '2016-06-10')), + 'pledge_start_date' => json_encode(array('calendar_date' => '06/10/2016')), 'is_pledge_start_date_visible' => FALSE, ); $date = CRM_Pledge_BAO_Pledge::getPledgeStartDate($date, $params); - $this->assertEquals($date, '20160610', "The two dates do not match"); + $this->assertEquals(date('m/d/Y', strtotime($date)), '06/10/2016', "The two dates do not match"); } } -- 2.25.1