Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
CDNTaxReceipts
Commits
f6defd2d
Commit
f6defd2d
authored
Nov 26, 2021
by
DaveD
Browse files
fix test fails on earlier versions
parent
c8e904c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/phpunit/CRM/Cdntaxreceipts/ReceiptsIssuedReportTest.php
View file @
f6defd2d
...
...
@@ -46,6 +46,15 @@ class CRM_Cdntaxreceipts_ReceiptsIssuedReportTest extends CRM_Cdntaxreceipts_Bas
// run report
$data
=
civicrm_api3
(
'report_template'
,
'getrows'
,
[
'report_id'
=>
'cdntaxreceipts/receiptsissued'
])[
'values'
];
// We don't care about this and it was introduced in 5.45 so causes fails
// on earlier matrices.
unset
(
$data
[
0
][
'class'
]);
// I'm still a little confused about how this passes even when using assertSame.
// The data types for the 'id' fields are strings in $data, so they
// shouldn't match when using strict comparison. But is it worth caring
// about.
$this
->
assertEquals
([
[
'civicrm_contact_sort_name'
=>
'Miller, Joe'
,
...
...
@@ -61,7 +70,6 @@ class CRM_Cdntaxreceipts_ReceiptsIssuedReportTest extends CRM_Cdntaxreceipts_Bas
'civicrm_cdntaxreceipts_log_contributions_contribution_id'
=>
1
,
'civicrm_contact_sort_name_link'
=>
'/index.php?q=civicrm/contact/view&reset=1&cid='
.
$contact_id
,
'civicrm_contact_sort_name_hover'
=>
'View Contact Summary for this Contact'
,
'class'
=>
NULL
,
]
],
$data
);
}
...
...
@@ -106,6 +114,10 @@ class CRM_Cdntaxreceipts_ReceiptsIssuedReportTest extends CRM_Cdntaxreceipts_Bas
],
])[
'values'
];
// We don't care about this and it was introduced in 5.45 so causes fails
// on earlier matrices.
unset
(
$data
[
0
][
'class'
]);
$this
->
assertEquals
([
[
'civicrm_contact_sort_name'
=>
'Miller, Joe'
,
...
...
@@ -123,7 +135,6 @@ class CRM_Cdntaxreceipts_ReceiptsIssuedReportTest extends CRM_Cdntaxreceipts_Bas
'civicrm_contribution_payment_instrument_id'
=>
'Check'
,
'civicrm_contact_sort_name_link'
=>
'/index.php?q=civicrm/contact/view&reset=1&cid='
.
$contact_id
,
'civicrm_contact_sort_name_hover'
=>
'View Contact Summary for this Contact'
,
'class'
=>
NULL
,
]
],
$data
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment