You are here

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

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testZeroAsOutput() {
  if ('\\' === DIRECTORY_SEPARATOR) {

    // see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
    $p = $this
      ->getProcess('echo | set /p dummyName=0');
  }
  else {
    $p = $this
      ->getProcess('printf 0');
  }
  $p
    ->run();
  $this
    ->assertSame('0', $p
    ->getOutput());
}