@@ -10,7 +10,7 @@ class StreamSelectLoopTest extends AbstractLoopTest
1010 protected function tearDown ()
1111 {
1212 parent ::tearDown ();
13- if (strncmp ($ this ->getName (false ), 'testSignal ' , 10 ) === 0 ) {
13+ if (strncmp ($ this ->getName (false ), 'testSignal ' , 10 ) === 0 && extension_loaded ( ' pcntl ' ) ) {
1414 $ this ->resetSignalHandlers ();
1515 }
1616 }
@@ -54,6 +54,10 @@ public function signalProvider()
5454 */
5555 public function testSignalInterruptNoStream ($ sigName , $ signal )
5656 {
57+ if (!extension_loaded ('pcntl ' )) {
58+ $ this ->markTestSkipped ('"pcntl" extension is required to run this test. ' );
59+ }
60+
5761 // dispatch signal handler once before signal is sent and once after
5862 $ this ->loop ->addTimer (0.01 , function () { pcntl_signal_dispatch (); });
5963 $ this ->loop ->addTimer (0.03 , function () { pcntl_signal_dispatch (); });
@@ -72,6 +76,10 @@ public function testSignalInterruptNoStream($sigName, $signal)
7276 */
7377 public function testSignalInterruptWithStream ($ sigName , $ signal )
7478 {
79+ if (!extension_loaded ('pcntl ' )) {
80+ $ this ->markTestSkipped ('"pcntl" extension is required to run this test. ' );
81+ }
82+
7583 // dispatch signal handler every 10ms
7684 $ this ->loop ->addPeriodicTimer (0.01 , function () { pcntl_signal_dispatch (); });
7785
0 commit comments