public function AbstractProcessTest::testProcessWithTermSignal

3 calls to AbstractProcessTest::testProcessWithTermSignal()
SigchildDisabledProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SigchildEnabledProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php
3 methods override AbstractProcessTest::testProcessWithTermSignal()
SigchildDisabledProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SigchildEnabledProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testProcessWithTermSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php, line 327

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testProcessWithTermSignal() {
  if (defined('PHP_WINDOWS_VERSION_BUILD')) {
    $this
      ->markTestSkipped('Windows does not support POSIX signals');
  }

  // SIGTERM is only defined if pcntl extension is present
  $termSignal = defined('SIGTERM') ? SIGTERM : 15;
  $process = $this
    ->getProcess('php -r "while (true) {}"');
  $process
    ->start();
  $process
    ->stop();
  $this
    ->assertEquals($termSignal, $process
    ->getTermSignal());
}