You are here

public function AbstractProcessTest::testFlushErrorOutput in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/process/Tests/AbstractProcessTest.php \Symfony\Component\Process\Tests\AbstractProcessTest::testFlushErrorOutput()

File

vendor/symfony/process/Tests/AbstractProcessTest.php, line 330

Class

AbstractProcessTest
@author Robert Schönthal <seroscho@googlemail.com>

Namespace

Symfony\Component\Process\Tests

Code

public function testFlushErrorOutput() {
  $p = $this
    ->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));
  $p
    ->run();
  $p
    ->clearErrorOutput();
  $this
    ->assertEmpty($p
    ->getErrorOutput());
}