Skip to content

Commit

Permalink
Use PHP sleep for Windows compatibility in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Feb 8, 2024
1 parent 01500db commit 2ef1b9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Process/Tests/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ public function testFailingProcessWithMultipleCallsToProcGetStatus()
*/
public function testLongRunningProcessWithMultipleCallsToProcGetStatus()
{
$process = $this->getProcess('sleep 1; echo "done"');
$process = $this->getProcess('php -r "sleep(1); echo \'done\';"');
$process->start(static function () use ($process) {
return $process->isRunning();
});
Expand All @@ -1585,7 +1585,7 @@ public function testLongRunningProcessWithMultipleCallsToProcGetStatus()
*/
public function testLongRunningProcessWithMultipleCallsToProcGetStatusError()
{
$process = $this->getProcess('sleep 1; echo "failure"; exit 123');
$process = $this->getProcess('php -r "sleep(1); echo \'failure\'; exit(123);"');
$process->start(static function () use ($process) {
return $process->isRunning();
});
Expand Down

0 comments on commit 2ef1b9b

Please sign in to comment.