6
6
/**
7
7
* @requires extension pcntl
8
8
*/
9
- class SignalRegistryTest extends TestCase
9
+ class SignalRegistryTest extends TestCase
10
10
{
11
11
public function tearDown (): void
12
12
{
@@ -20,7 +20,7 @@ public function testOneCallbackForASignal_signalIsHandled()
20
20
$ signalRegistry = new SignalRegistry ();
21
21
22
22
$ isHandled = false ;
23
- $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled ) {
23
+ $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled ) {
24
24
$ isHandled = true ;
25
25
});
26
26
@@ -34,12 +34,12 @@ public function testTwoCallbacksForASignal_bothCallbacksAreCalled()
34
34
$ signalRegistry = new SignalRegistry ();
35
35
36
36
$ isHandled1 = false ;
37
- $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled1 ) {
37
+ $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled1 ) {
38
38
$ isHandled1 = true ;
39
39
});
40
40
41
41
$ isHandled2 = false ;
42
- $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled2 ) {
42
+ $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled2 ) {
43
43
$ isHandled2 = true ;
44
44
});
45
45
@@ -56,7 +56,7 @@ public function testTwoSignals_signalsAreHandled()
56
56
$ isHandled1 = false ;
57
57
$ isHandled2 = false ;
58
58
59
- $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled1 ) {
59
+ $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled1 ) {
60
60
$ isHandled1 = true ;
61
61
});
62
62
@@ -65,7 +65,7 @@ public function testTwoSignals_signalsAreHandled()
65
65
$ this ->assertTrue ($ isHandled1 );
66
66
$ this ->assertFalse ($ isHandled2 );
67
67
68
- $ signalRegistry ->register (SIGUSR2 , function () use (&$ isHandled2 ) {
68
+ $ signalRegistry ->register (SIGUSR2 , function () use (&$ isHandled2 ) {
69
69
$ isHandled2 = true ;
70
70
});
71
71
@@ -79,12 +79,12 @@ public function testTwoCallbacksForASignal_previousAndRegisteredCallbacksWereCal
79
79
$ signalRegistry = new SignalRegistry ();
80
80
81
81
$ isHandled1 = false ;
82
- pcntl_signal (SIGUSR1 , function () use (&$ isHandled1 ) {
82
+ pcntl_signal (SIGUSR1 , function () use (&$ isHandled1 ) {
83
83
$ isHandled1 = true ;
84
84
});
85
85
86
86
$ isHandled2 = false ;
87
- $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled2 ) {
87
+ $ signalRegistry ->register (SIGUSR1 , function () use (&$ isHandled2 ) {
88
88
$ isHandled2 = true ;
89
89
});
90
90
0 commit comments