You are here

public function AbstractProcessTest::testExitCodeIsAvailableAfterSignal 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::testExitCodeIsAvailableAfterSignal()
1 call to AbstractProcessTest::testExitCodeIsAvailableAfterSignal()
SimpleProcessTest::testExitCodeIsAvailableAfterSignal in vendor/symfony/process/Tests/SimpleProcessTest.php
3 methods override AbstractProcessTest::testExitCodeIsAvailableAfterSignal()
SigchildDisabledProcessTest::testExitCodeIsAvailableAfterSignal in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
SigchildEnabledProcessTest::testExitCodeIsAvailableAfterSignal in vendor/symfony/process/Tests/SigchildEnabledProcessTest.php
SimpleProcessTest::testExitCodeIsAvailableAfterSignal in vendor/symfony/process/Tests/SimpleProcessTest.php

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testExitCodeIsAvailableAfterSignal() {
  $this
    ->verifyPosixIsEnabled();
  $process = $this
    ->getProcess('sleep 4');
  $process
    ->start();
  $process
    ->signal(SIGKILL);
  while ($process
    ->isRunning()) {
    usleep(10000);
  }
  $this
    ->assertFalse($process
    ->isRunning());
  $this
    ->assertTrue($process
    ->hasBeenSignaled());
  $this
    ->assertFalse($process
    ->isSuccessful());
  $this
    ->assertEquals(137, $process
    ->getExitCode());
}