You are here

public function AbstractProcessTest::testIsSuccessfulOnlyAfterTerminated 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::testIsSuccessfulOnlyAfterTerminated()
1 call to AbstractProcessTest::testIsSuccessfulOnlyAfterTerminated()
SigchildDisabledProcessTest::testIsSuccessfulOnlyAfterTerminated in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.
1 method overrides AbstractProcessTest::testIsSuccessfulOnlyAfterTerminated()
SigchildDisabledProcessTest::testIsSuccessfulOnlyAfterTerminated in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testIsSuccessfulOnlyAfterTerminated() {
  $process = $this
    ->getProcess(self::$phpBin . ' -r "sleep(1);"');
  $process
    ->start();
  $this
    ->assertFalse($process
    ->isSuccessful());
  while ($process
    ->isRunning()) {
    usleep(300000);
  }
  $this
    ->assertTrue($process
    ->isSuccessful());
}