File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,14 @@ public function setAlarmInterval(?int $seconds): void
139
139
$ this ->scheduleAlarm ();
140
140
}
141
141
142
+ /**
143
+ * Gets the interval in seconds on which a SIGALRM signal is dispatched.
144
+ */
145
+ public function getAlarmInterval (): ?int
146
+ {
147
+ return $ this ->alarmInterval ;
148
+ }
149
+
142
150
private function scheduleAlarm (): void
143
151
{
144
152
if (null !== $ this ->alarmInterval ) {
Original file line number Diff line number Diff line change @@ -2305,6 +2305,7 @@ public function testAlarmDispatchWithoutEventDispatcher()
2305
2305
$ application = $ this ->createSignalableApplication ($ command , null );
2306
2306
2307
2307
$ this ->assertSame (1 , $ application ->run (new ArrayInput (['alarm ' ])));
2308
+ $ this ->assertSame (1 , $ application ->getAlarmInterval ());
2308
2309
$ this ->assertTrue ($ command ->signaled );
2309
2310
}
2310
2311
You can’t perform that action at this time.
0 commit comments