You are here

public function AbstractProcessTest::testStartAfterATimeout 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::testStartAfterATimeout()
1 call to AbstractProcessTest::testStartAfterATimeout()
SigchildEnabledProcessTest::testStartAfterATimeout in vendor/symfony/process/Tests/SigchildEnabledProcessTest.php
1 method overrides AbstractProcessTest::testStartAfterATimeout()
SigchildEnabledProcessTest::testStartAfterATimeout in vendor/symfony/process/Tests/SigchildEnabledProcessTest.php

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testStartAfterATimeout() {
  $process = $this
    ->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 1000; while ($n--) {echo \'\'; usleep(1000); }')));
  $process
    ->setTimeout(0.1);
  try {
    $process
      ->run();
    $this
      ->fail('A RuntimeException should have been raised.');
  } catch (RuntimeException $e) {
  }
  $process
    ->start();
  usleep(1000);
  $process
    ->stop();
}