File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments