You are here

public function AbstractProcessTest::testSignal 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::testSignal()
3 calls to AbstractProcessTest::testSignal()
SigchildDisabledProcessTest::testSignal in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled.
SigchildEnabledProcessTest::testSignal in vendor/symfony/process/Tests/SigchildEnabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled.
SimpleProcessTest::testSignal in vendor/symfony/process/Tests/SimpleProcessTest.php
3 methods override AbstractProcessTest::testSignal()
SigchildDisabledProcessTest::testSignal in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled.
SigchildEnabledProcessTest::testSignal in vendor/symfony/process/Tests/SigchildEnabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled.
SimpleProcessTest::testSignal in vendor/symfony/process/Tests/SimpleProcessTest.php

File

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

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testSignal() {
  $this
    ->verifyPosixIsEnabled();
  $process = $this
    ->getProcess('exec php -f ' . __DIR__ . '/SignalListener.php');
  $process
    ->start();
  usleep(500000);
  $process
    ->signal(SIGUSR1);
  while ($process
    ->isRunning() && false === strpos($process
    ->getOutput(), 'Caught SIGUSR1')) {
    usleep(10000);
  }
  $this
    ->assertEquals('Caught SIGUSR1', $process
    ->getOutput());
}