You are here

public function AbstractProcessTest::testProcessPipes in Zircon Profile 8

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

tests results from sub processes.

@dataProvider pipesCodeProvider

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testProcessPipes($code, $size) {
  $expected = str_repeat(str_repeat('*', 1024), $size) . '!';
  $expectedLength = 1024 * $size + 1;
  $p = $this
    ->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code)));
  $p
    ->setInput($expected);
  $p
    ->run();
  $this
    ->assertEquals($expectedLength, strlen($p
    ->getOutput()));
  $this
    ->assertEquals($expectedLength, strlen($p
    ->getErrorOutput()));
}