Skip to content

Commit 47c5548

Browse files
Merge branch '3.4' into 4.4
* 3.4: Make PHP 8 green on Travis
2 parents 4b6a9a4 + 8a895f0 commit 47c5548

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/ProcessTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,16 +988,23 @@ public function provideMethodsThatNeedATerminatedProcess()
988988

989989
public function testWrongSignal()
990990
{
991-
$this->expectException('Symfony\Component\Process\Exception\RuntimeException');
992991
if ('\\' === \DIRECTORY_SEPARATOR) {
993992
$this->markTestSkipped('POSIX signals do not work on Windows');
994993
}
995994

995+
if (\PHP_VERSION_ID < 80000 || \is_int($signal)) {
996+
$this->expectException(RuntimeException::class);
997+
} else {
998+
$this->expectException('TypeError');
999+
}
1000+
9961001
$process = $this->getProcessForCode('sleep(38);');
9971002
$process->start();
9981003
try {
9991004
$process->signal(-4);
10001005
$this->fail('A RuntimeException must have been thrown');
1006+
} catch (\TypeError $e) {
1007+
$process->stop(0);
10011008
} catch (RuntimeException $e) {
10021009
$process->stop(0);
10031010
}

0 commit comments

Comments
 (0)