public function AbstractProcessTest::testProcessThrowsExceptionWhenExternallySignaled in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/AbstractProcessTest.php \Symfony\Component\Process\Tests\AbstractProcessTest::testProcessThrowsExceptionWhenExternallySignaled()
1 call to AbstractProcessTest::testProcessThrowsExceptionWhenExternallySignaled()
- SimpleProcessTest::testProcessThrowsExceptionWhenExternallySignaled in vendor/
symfony/ process/ Tests/ SimpleProcessTest.php
3 methods override AbstractProcessTest::testProcessThrowsExceptionWhenExternallySignaled()
- SigchildDisabledProcessTest::testProcessThrowsExceptionWhenExternallySignaled in vendor/
symfony/ process/ Tests/ SigchildDisabledProcessTest.php - SigchildEnabledProcessTest::testProcessThrowsExceptionWhenExternallySignaled in vendor/
symfony/ process/ Tests/ SigchildEnabledProcessTest.php - SimpleProcessTest::testProcessThrowsExceptionWhenExternallySignaled in vendor/
symfony/ process/ Tests/ SimpleProcessTest.php
File
- vendor/
symfony/ process/ Tests/ AbstractProcessTest.php, line 723
Class
- AbstractProcessTest
- @author Robert Schönthal <seroscho@googlemail.com>
Namespace
Symfony\Component\Process\TestsCode
public function testProcessThrowsExceptionWhenExternallySignaled() {
if ('\\' === DIRECTORY_SEPARATOR) {
$this
->markTestSkipped('Windows does not support POSIX signals');
}
if (!function_exists('posix_kill')) {
$this
->markTestSkipped('posix_kill is required for this test');
}
$termSignal = defined('SIGKILL') ? SIGKILL : 9;
$process = $this
->getProcess('exec php -r "while (true) {}"');
$process
->start();
posix_kill($process
->getPid(), $termSignal);
$this
->setExpectedException('Symfony\\Component\\Process\\Exception\\RuntimeException', 'The process has been signaled with signal "9".');
$process
->wait();
}