minor #36933 [Process] Fix failing test on php 8 (derrabus)
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Fix failing test on php 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
Commits
-------
98e5105bd3
[Process] Fix failing test on php 8.
This commit is contained in:
commit
3588a53270
@ -992,24 +992,16 @@ class ProcessTest extends TestCase
|
||||
$this->markTestSkipped('POSIX signals do not work on Windows');
|
||||
}
|
||||
|
||||
if (\PHP_VERSION_ID < 80000 || \is_int($signal)) {
|
||||
$this->expectException(RuntimeException::class);
|
||||
} else {
|
||||
$this->expectException('TypeError');
|
||||
}
|
||||
$this->expectException(RuntimeException::class);
|
||||
|
||||
$process = $this->getProcessForCode('sleep(38);');
|
||||
$process->start();
|
||||
try {
|
||||
$process->signal(-4);
|
||||
$this->fail('A RuntimeException must have been thrown');
|
||||
} catch (\TypeError $e) {
|
||||
$process->stop(0);
|
||||
} catch (RuntimeException $e) {
|
||||
} finally {
|
||||
$process->stop(0);
|
||||
}
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
public function testDisableOutputDisablesTheOutput()
|
||||
|
Reference in New Issue
Block a user