Skip to content

Commit

Permalink
Ignore intentional use of die() and exit() in test
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Mar 27, 2023
1 parent b581b8b commit 936a652
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Test/Integration/ProcessKillRequestsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private function createProcessToKillForSchedule(Schedule $schedule): int
// Now we fork again so that we can be attached init instead of the test (so we get reaped as expected).
$cpid = pcntl_fork();
if ($cpid === -1) {
// phpcs:ignore Magento2.Security.LanguageConstruct.ExitUsage
die('Could not fork again in child process');
}

Expand All @@ -168,6 +169,7 @@ private function createProcessToKillForSchedule(Schedule $schedule): int
// Reap grandchild process. We probably won't get this far.
\pcntl_wait($status);

// phpcs:ignore Magento2.Security.LanguageConstruct.ExitUsage
exit(0);
}
}
Expand Down

0 comments on commit 936a652

Please sign in to comment.