You are here

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

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testTTYCommand() {
  if ('\\' === DIRECTORY_SEPARATOR) {
    $this
      ->markTestSkipped('Windows does have /dev/tty support');
  }
  $process = $this
    ->getProcess('echo "foo" >> /dev/null && php -r "usleep(100000);"');
  $process
    ->setTty(true);
  $process
    ->start();
  $this
    ->assertTrue($process
    ->isRunning());
  $process
    ->wait();
  $this
    ->assertSame(Process::STATUS_TERMINATED, $process
    ->getStatus());
}