From be95f8ecee09c635acd95d50759c8d6a320f7cf5 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Mon, 13 Nov 2023 10:17:16 -0500 Subject: [PATCH] update test --- tests/phpunit/CRM/Case/BAO/CaseTest.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/phpunit/CRM/Case/BAO/CaseTest.php b/tests/phpunit/CRM/Case/BAO/CaseTest.php index 0dd3ce1ee2..c687ab90cc 100644 --- a/tests/phpunit/CRM/Case/BAO/CaseTest.php +++ b/tests/phpunit/CRM/Case/BAO/CaseTest.php @@ -111,16 +111,7 @@ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase { $caseRoles = CRM_Case_BAO_Case::getCaseRoles($loggedInUser, $caseId); $this->assertEquals($caseCount, $upcomingCases, 'Upcoming case count must be ' . $caseCount); - if ($caseCount === 0) { - // If there really are 0 cases then there won't be any subelements for - // status and count, so we get a false error if we use the assertEquals - // check since it tries to get a subelement on type int. In this case - // the summary rows are just the case type pseudoconstant list. - $this->assertSame(array_flip(CRM_Case_PseudoConstant::caseType()), $summary['rows']); - } - else { - $this->assertEquals($caseCount, $summary['rows']['Housing Support']['Ongoing']['count'], 'Housing Support Ongoing case summary must be ' . $caseCount); - } + $this->assertEquals($caseCount, (int) $summary['rows']['Housing Support']['Ongoing']['count'], 'Housing Support Ongoing case summary must be ' . $caseCount); $this->assertEquals($caseCount, count($caseRoles), 'Total case roles for logged in users must be ' . $caseCount); } -- 2.25.1