Skip to content

Explicitly specify report field types to match changes in core

DaveD requested to merge DaveD/cdntaxreceipts:report-field-type into master

Recent change in core makes the data type string if you don't explicitly specify. So in tests 1 wasn't matching '1', e.g.

CRM_Cdntaxreceipts_ReceiptsIssuedReportTest::testReport
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => Array (
         'civicrm_contact_sort_name' => 'Miller, Joe'
-        'civicrm_contact_id' => 3
+        'civicrm_contact_id' => '3'
         'civicrm_cdntaxreceipts_log_issued_on' => '2021-11-25'
         'civicrm_cdntaxreceipts_log_receipt_amount' => '10.00'
         'civicrm_cdntaxreceipts_log_receipt_no' => 'C-00000001'
         'civicrm_cdntaxreceipts_log_issue_type' => 'Single'
         'civicrm_cdntaxreceipts_log_issue_method' => 'Print'
-        'civicrm_cdntaxreceipts_log_uid' => 1
+        'civicrm_cdntaxreceipts_log_uid' => '1'
         'civicrm_cdntaxreceipts_log_receipt_status' => 'Issued'
         'civicrm_cdntaxreceipts_log_email_opened' => null
-        'civicrm_cdntaxreceipts_log_contributions_contribution_id' => 1
+        'civicrm_cdntaxreceipts_log_contributions_contribution_id' => '1'
         'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/...;cid=3'
         'civicrm_contact_sort_name_hover' => 'View Contact Summary for this Contact'
+        'class' => null
     )
 )

Merge request reports

Loading