8000 [Process] Make test AbstractProcessTest::testStartAfterATimeout usefu… · symfony/symfony@1be266f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1be266f

Browse files
ymc-dabefabpot
authored andcommitted
[Process] Make test AbstractProcessTest::testStartAfterATimeout useful again
1 parent b8e4b4a commit 1be266f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Process/Tests/AbstractProcessTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,12 @@ public function testCheckTimeoutOnStartedProcess()
724724

725725
public function testStartAfterATimeout()
726726
{
727-
$process = $this->getProcess('php -r "$n = 1000; while ($n--) {echo \'\'; usleep(1000); }"');
727+
$process = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 1000; while ($n--) {echo \'\'; usleep(1000); }')));
728728
$process->setTimeout(0.1);
729729
try {
730730
$process->run();
731-
$this->fail('An exception should have been raised.');
732-
} catch (\Exception $e) {
731+
$this->fail('A RuntimeException should have been raised.');
732+
} catch (RuntimeException $e) {
733733
}
734734
$process->start();
735735
usleep(10000);

0 commit comments

Comments
 (0)
0