Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3cc194

Browse files
committed
properly skip signal test if the pcntl extension is not installed
1 parent 233f975 commit b3cc194

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/Symfony/Component/Console/Tests/SignalRegistry/SignalMapTest.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,13 @@ class SignalMapTest extends TestCase
1818
{
1919
/**
2020
* @requires extension pcntl
21-
* @dataProvider provideSignals
2221
*/
23-
public function testSignalExists(int $signal, string $expected)
22+
public function testSignalExists()
2423
{
25-
$this->assertSame($expected, SignalMap::getSignalName($signal));
26-
}
27-
28-
public function provideSignals()
29-
{
30-
yield [\SIGINT, 'SIGINT'];
31-
yield [\SIGKILL, 'SIGKILL'];
32-
yield [\SIGTERM, 'SIGTERM'];
33-
yield [\SIGSYS, 'SIGSYS'];
24+
$this->assertSame('SIGINT', SignalMap::getSignalName(\SIGINT));
25+
$this->assertSame('SIGKILL', SignalMap::getSignalName(\SIGKILL));
26+
$this->assertSame('SIGTERM', SignalMap::getSignalName(\SIGTERM));
27+
$this->assertSame('SIGSYS', SignalMap::getSignalName(\SIGSYS));
3428
}
3529

3630
public function testSignalDoesNotExist()

0 commit comments

Comments
 (0)