Skip to content

Commit

Permalink
[3.4] CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 8, 2020
1 parent ce180b8 commit c537472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Store/SemaphoreStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ public function testResourceRemoval()
private function getOpenedSemaphores()
{
if ('Darwin' === PHP_OS) {
$lines = explode(PHP_EOL, trim(`ipcs -s`));
$lines = explode(PHP_EOL, trim(shell_exec('ipcs -s')));
if (-1 === $start = array_search('Semaphores:', $lines)) {
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore list, got '.implode(PHP_EOL, $lines));
}

return \count(\array_slice($lines, ++$start));
}

$lines = explode(PHP_EOL, trim(`LC_ALL=C ipcs -su`));
$lines = explode(PHP_EOL, trim(shell_exec('LC_ALL=C ipcs -su')));
if ('------ Semaphore Status --------' !== $lines[0]) {
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore status, got '.implode(PHP_EOL, $lines));
}
Expand Down

0 comments on commit c537472

Please sign in to comment.