From 0a3dfa413a5ffaa0390602f6d8621509de8fa416 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Mon, 31 Jul 2017 11:33:48 +0530 Subject: [PATCH] CRM-20987, fixed unit test ---------------------------------------- * CRM-20987: Add transaction date field to listings of transactions https://issues.civicrm.org/jira/browse/CRM-20987 fixed indexes --- CRM/Financial/Page/AJAX.php | 8 ++++---- tests/phpunit/CRM/Financial/Page/AjaxTest.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index b6b11449f7..0a5b4ae6e8 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -255,10 +255,10 @@ class CRM_Financial_Page_AJAX { 3 => 'amount', 4 => 'trxn_id', 5 => 'transaction_date', - 5 => 'receive_date', - 6 => 'payment_method', - 7 => 'status', - 8 => 'name', + 6 => 'receive_date', + 7 => 'payment_method', + 8 => 'status', + 9 => 'name', ); $sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer'); diff --git a/tests/phpunit/CRM/Financial/Page/AjaxTest.php b/tests/phpunit/CRM/Financial/Page/AjaxTest.php index 699ae536d5..8524849dc5 100644 --- a/tests/phpunit/CRM/Financial/Page/AjaxTest.php +++ b/tests/phpunit/CRM/Financial/Page/AjaxTest.php @@ -50,7 +50,7 @@ class CRM_Financial_Page_AjaxTest extends CiviUnitTestCase { $json = CRM_Financial_Page_AJAX::getFinancialTransactionsList(); $json = str_replace(rtrim(CIVICRM_UF_BASEURL, '/'), 'http://FIX ME', $json); $this->assertEquals($json, '{"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["","","Anderson, Anthony","$ 100.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",' + . ' class=\"icon crm-icon Individual-icon\">","Anderson, Anthony","$ 100.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",' . '"Credit Card","Completed","Donation","View"]] }'); } -- 2.25.1