Skip to content

Commit 3bc410c

Browse files
committed
[Process] Fix failing test on php 8.
1 parent 47c5548 commit 3bc410c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Tests/ProcessTest.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -992,24 +992,16 @@ public function testWrongSignal()
992992
$this->markTestSkipped('POSIX signals do not work on Windows');
993993
}
994994

995-
if (\PHP_VERSION_ID < 80000 || \is_int($signal)) {
996-
$this->expectException(RuntimeException::class);
997-
} else {
998-
$this->expectException('TypeError');
999-
}
995+
$this->expectException(RuntimeException::class);
1000996

1001997
$process = $this->getProcessForCode('sleep(38);');
1002998
$process->start();
1003999
try {
10041000
$process->signal(-4);
10051001
$this->fail('A RuntimeException must have been thrown');
1006-
} catch (\TypeError $e) {
1007-
$process->stop(0);
1008-
} catch (RuntimeException $e) {
1002+
} finally {
10091003
$process->stop(0);
10101004
}
1011-
1012-
throw $e;
10131005
}
10141006

10151007
public function testDisableOutputDisablesTheOutput()

0 commit comments

Comments
 (0)