[Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
This commit is contained in:
parent
23f12faa53
commit
18113672c1
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user