public function AbstractProcessTest::testGetOutput

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php, line 159

Class

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

Namespace

Symfony\Component\Process\Tests

Code

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