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());
}