minor #11539 [Process] Fix tests when pcntl is not available. (jakzal)

This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix tests when pcntl is not available.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

It's solved the same way in the [AbstractProcessTest](3b837dc5c1/src/Symfony/Component/Process/Tests/AbstractProcessTest.php (L602-L603)).

Commits
-------

e40f24f [Process] Fix tests when pcntl is not available.
This commit is contained in:
Fabien Potencier 2014-08-01 14:08:29 +02:00
commit 497c875304
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ class SimpleProcessTest extends AbstractProcessTest
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
$process->run(function () use ($process) {
if ($process->isRunning()) {
$process->signal(SIGKILL);
$process->signal(defined('SIGKILL') ? SIGKILL : 9);
}
});
} catch (RuntimeException $e) {
@ -183,7 +183,7 @@ class SimpleProcessTest extends AbstractProcessTest
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
$process->run(function () use ($process) {
if ($process->isRunning()) {
$process->signal(SIGTERM);
$process->signal(defined('SIGTERM') ? SIGTERM : 15);
}
});
} catch (RuntimeException $e) {