You are here

public function AbstractProcessTest::testGetOutput 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::testGetOutput()

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testGetOutput() {
  $p = $this
    ->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { echo \' foo \'; $n++; }')));
  $p
    ->run();
  $this
    ->assertEquals(3, preg_match_all('/foo/', $p
    ->getOutput(), $matches));
}