avoid error-supression operator
authordemeritcowboy <demeritcowboy@hotmail.com>
Sun, 22 Aug 2021 00:08:31 +0000 (20:08 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Sun, 22 Aug 2021 00:08:31 +0000 (20:08 -0400)
tests/phpunit/CRM/Extension/Manager/ModuleUpgTest.php

index 374ed3ea658dbfb7f3b5dfb447f54ec7e91fcaad..16eb9960116917d0fb76f1d1ab71b654820e1f4a 100644 (file)
@@ -230,8 +230,8 @@ class CRM_Extension_Manager_ModuleUpgTest extends CiviUnitTestCase {
   public function assertHookCounts($module, $counts) {
     global $_test_extension_manager_moduleupgtest_counts;
     foreach ($counts as $key => $expected) {
-      $actual = @$_test_extension_manager_moduleupgtest_counts[$module][$key];
-      $this->assertEquals($expected, $actual,
+      $actual = $_test_extension_manager_moduleupgtest_counts[$module][$key] ?? 0;
+      $this->assertSame($expected, $actual,
         sprintf('Expected %d call(s) to hook_civicrm_%s -- found %d', $expected, $key, $actual)
       );
     }