Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] CRM_Extension_Manager_ModuleUpgTest - use ?? instead of error-suppression operator #21214

Merged
merged 1 commit into from
Aug 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
avoid error-supression operator
  • Loading branch information
demeritcowboy committed Aug 22, 2021
commit 2ab8aba971e2c19277c70e91b85b523adba69b81
4 changes: 2 additions & 2 deletions tests/phpunit/CRM/Extension/Manager/ModuleUpgTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ public function testInstall_DirtyRemove_Disable_Restore() {
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)
);
}
Expand Down