8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2982e6e commit 3bfb976Copy full SHA for 3bfb976
src/Symfony/Component/Process/Tests/ProcessTest.php
@@ -89,6 +89,19 @@ public function testCallbackIsExecutedForOutput()
89
$this->assertTrue($called, 'The callback should be executed with the output');
90
}
91
92
+ public function testExitCodeCommandFailed()
93
+ {
94
+ if (strpos(PHP_OS, "WIN") === 0) {
95
+ $this->markTestSkipped('Windows does not support POSIX exit code');
96
+ }
97
+
98
+ // such command run in bash return an exitcode 127
99
+ $process = new Process('nonexistingcommandIhopeneversomeonewouldnameacommandlikethis');
100
+ $process->run();
101
102
+ $this->assertGreaterThan(0, $process->getExitCode());
103
104
105
public function testExitCodeText()
106
{
107
$process = new Process('');
0 commit comments