CRM-20987, fixed unit test
authorPradeep Nayak <pradpnayak@gmail.com>
Mon, 31 Jul 2017 06:03:48 +0000 (11:33 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Mon, 31 Jul 2017 06:53:40 +0000 (12:23 +0530)
----------------------------------------
* 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
tests/phpunit/CRM/Financial/Page/AjaxTest.php

index b6b11449f7af55689a03c5682e3013fe7795882d..0a5b4ae6e813066fd0c7ee0bcfdc8ee82b762574 100644 (file)
@@ -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');
index 699ae536d5e374a185c896fdbefdd2fcc7a12fc5..8524849dc54a53afe26be3deeedb36a74e8c9fc7 100644 (file)
@@ -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": [ ["","<a href=\"/index.php?q=civicrm/profile/view&amp;reset=1&amp;gid=7&amp;id=3&amp;snippet=4\" class=\"crm-summary-link\"><div'
-    . ' class=\"icon crm-icon Individual-icon\"></div></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony</a>","$ 100.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",'
+    . ' class=\"icon crm-icon Individual-icon\"></div></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony</a>","$ 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","<span><a href=\"/index.php?q=civicrm/contact/view/contribution&amp;reset=1&amp;id=1&amp;cid=3&amp;action=view&amp;context=contribution&amp;'
     . 'selectedChild=contribute\" class=\"action-item crm-hover-button\" title=\'View Contribution\' >View</a></span>"]] }');
   }