diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 653fa6d84abc2..46a0e5f297856 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -422,6 +422,17 @@ public function testGetErrorOutput() $this->assertEquals(3, preg_match_all('/ERROR/', $p->getErrorOutput(), $matches)); } + public function testErrorOutputRegression() + { + $p = new Process(['invalid_command']); + + $p->run(); + + var_dump($p->getErrorOutput()); + + $this->assertMatchesRegularExpression('/^.*invalid_command.*(\r\n|\r|\n)$/', $p->getErrorOutput()); + } + public function testFlushErrorOutput() { $p = $this->getProcessForCode('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }');