[Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()

This commit is contained in:
Bernhard Schussek 2013-10-30 13:27:00 +01:00
parent 23f12faa53
commit 18113672c1
2 changed files with 4 additions and 4 deletions

View File

@ -408,7 +408,7 @@ class Process
*
* @return Process
*/
public function flushOutput()
public function clearOutput()
{
$this->stdout = '';
$this->incrementalOutputOffset = 0;
@ -454,7 +454,7 @@ class Process
*
* @return Process
*/
public function flushErrorOutput()
public function clearErrorOutput()
{
$this->stderr = '';
$this->incrementalErrorOutputOffset = 0;

View File

@ -174,7 +174,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$p = new Process(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));
$p->run();
$p->flushErrorOutput();
$p->clearErrorOutput();
$this->assertEmpty($p->getErrorOutput());
}
@ -202,7 +202,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while ($n<3) {echo \' foo \';$n++;}')));
$p->run();
$p->flushOutput();
$p->clearOutput();
$this->assertEmpty($p->getOutput());
}