diff --git a/tests/StreamSelectLoopTest.php b/tests/StreamSelectLoopTest.php index 61b059c1..76560a43 100644 --- a/tests/StreamSelectLoopTest.php +++ b/tests/StreamSelectLoopTest.php @@ -40,9 +40,9 @@ public function testStreamSelectTimeoutEmulation() public function signalProvider() { return [ - ['SIGUSR1', SIGUSR1], - ['SIGHUP', SIGHUP], - ['SIGTERM', SIGTERM], + ['SIGUSR1'], + ['SIGHUP'], + ['SIGTERM'], ]; } @@ -52,7 +52,7 @@ public function signalProvider() * Test signal interrupt when no stream is attached to the loop * @dataProvider signalProvider */ - public function testSignalInterruptNoStream($sigName, $signal) + public function testSignalInterruptNoStream($signal) { if (!extension_loaded('pcntl')) { $this->markTestSkipped('"pcntl" extension is required to run this test.'); @@ -78,7 +78,7 @@ public function testSignalInterruptNoStream($sigName, $signal) * Test signal interrupt when a stream is attached to the loop * @dataProvider signalProvider */ - public function testSignalInterruptWithStream($sigName, $signal) + public function testSignalInterruptWithStream($signal) { if (!extension_loaded('pcntl')) { $this->markTestSkipped('"pcntl" extension is required to run this test.'); @@ -116,7 +116,7 @@ public function testSignalInterruptWithStream($sigName, $signal) protected function setUpSignalHandler($signal) { $this->_signalHandled = false; - $this->assertTrue(pcntl_signal($signal, function() { $this->_signalHandled = true; })); + $this->assertTrue(pcntl_signal(constant($signal), function() { $this->_signalHandled = true; })); } /** @@ -125,7 +125,7 @@ protected function setUpSignalHandler($signal) protected function resetSignalHandlers() { foreach($this->signalProvider() as $signal) { - pcntl_signal($signal[1], SIG_DFL); + pcntl_signal(constant($signal[0]), SIG_DFL); } } @@ -141,7 +141,7 @@ protected function forkSendSignal($signal) } else if ($childPid === 0) { // this is executed in the child process usleep(20000); - posix_kill($currentPid, $signal); + posix_kill($currentPid, constant($signal)); die(); } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: