From 43c01bc543fc4d8f9314845514746373cbf868f0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 23 Mar 2012 13:02:23 +0100 Subject: [PATCH] [Process] renamed waitForTermination() to wait() --- src/Symfony/Component/Process/Process.php | 10 +++++----- tests/Symfony/Tests/Component/Process/ProcessTest.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 8b45d64f76..ac79bbb6ae 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -154,7 +154,7 @@ class Process { $this->start($callback); - return $this->waitForTermination($callback); + return $this->wait($callback); } /** @@ -163,12 +163,12 @@ class Process * This method blocks until all STDIN data is sent to the process then it * returns while the process runs in the background. * - * The termination of the process can be awaited with waitForTermination(). + * The termination of the process can be awaited with wait(). * * The callback receives the type of output (out or err) and some bytes from * the output in real-time while writing the standard input to the process. * It allows to have feedback from the independent process during execution. - * If there is no callback passed, the waitForTermination() method can be called + * If there is no callback passed, the wait() method can be called * with true as a second parameter then the callback will get all data occured * in (and since) the start call. * @@ -275,7 +275,7 @@ class Process * * @throws \RuntimeException */ - public function waitForTermination($callback = null) + public function wait($callback = null) { $this->processInformation = proc_get_status($this->process); $callback = $this->buildCallback($callback); @@ -593,7 +593,7 @@ class Process } /** - * Builds up the callback used by waitForTermination(). + * Builds up the callback used by wait(). * * The callbacks adds all occured output to the specific buffer and calls * the usercallback (if present) with the received output. diff --git a/tests/Symfony/Tests/Component/Process/ProcessTest.php b/tests/Symfony/Tests/Component/Process/ProcessTest.php index 7d0970034a..98b9c0439e 100644 --- a/tests/Symfony/Tests/Component/Process/ProcessTest.php +++ b/tests/Symfony/Tests/Component/Process/ProcessTest.php @@ -103,7 +103,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase $this->assertFalse($process->isRunning()); $process->start(); $this->assertTrue($process->isRunning()); - $process->waitForTermination(); + $process->wait(); $this->assertFalse($process->isRunning()); }