From f69c8f0400c8d841456c97533fd22f90026e24b9 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 21 Aug 2021 07:54:46 -0400 Subject: [PATCH] avoid error-suppression operator --- tests/phpunit/CRM/Extension/Manager/ModuleTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php index 53e12840c4..59d1de4d06 100644 --- a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php +++ b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php @@ -225,8 +225,8 @@ class CRM_Extension_Manager_ModuleTest extends CiviUnitTestCase { public function assertHookCounts($module, $counts) { global $_test_extension_manager_moduletest_counts; foreach ($counts as $key => $expected) { - $actual = @$_test_extension_manager_moduletest_counts[$module][$key]; - $this->assertEquals($expected, $actual, + $actual = $_test_extension_manager_moduletest_counts[$module][$key] ?? 0; + $this->assertSame($expected, $actual, sprintf('Expected %d call(s) to hook_civicrm_%s -- found %d', $expected, $key, $actual) ); } -- 2.25.1