[Process] Fix failing test on php 8.
This commit is contained in:
parent
d8bb5b2df5
commit
98e5105bd3
@ -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');
|
||||
}
|
||||
|
||||
$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