You are here

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

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testStartIsNonBlocking() {
  $process = $this
    ->getProcess(self::$phpBin . ' -r "usleep(500000);"');
  $start = microtime(true);
  $process
    ->start();
  $end = microtime(true);
  $this
    ->assertLessThan(0.4, $end - $start);
  $process
    ->wait();
}