diff --git a/src/Symfony/Component/Process/PhpProcess.php b/src/Symfony/Component/Process/PhpProcess.php index 2bd5600451..5db6e134e2 100644 --- a/src/Symfony/Component/Process/PhpProcess.php +++ b/src/Symfony/Component/Process/PhpProcess.php @@ -55,16 +55,9 @@ class PhpProcess extends Process } /** - * Runs the process. - * - * @param Closure|string|array $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return integer The exit status code - * - * @api + * {@inheritdoc} */ - public function run($callback = null) + public function start($callback = null) { if (null === $this->getCommandLine()) { if (false === $php = $this->executableFinder->find()) { @@ -73,6 +66,6 @@ class PhpProcess extends Process $this->setCommandLine($php); } - return parent::run($callback); + return parent::start($callback); } } diff --git a/src/Symfony/Component/Process/Tests/PhpProcessTest.php b/src/Symfony/Component/Process/Tests/PhpProcessTest.php new file mode 100644 index 0000000000..7bcdd2f05d --- /dev/null +++ b/src/Symfony/Component/Process/Tests/PhpProcessTest.php @@ -0,0 +1,21 @@ +start(); + $process->wait(); + $this->assertEquals($expected, $process->getOutput()); + } +}