File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 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
139139 $ this ->scheduleAlarm ();
140140 }
141141
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+
142150 private function scheduleAlarm (): void
143151 {
144152 if (null !== $ this ->alarmInterval ) {
Original file line number Diff line number Diff line change @@ -2305,6 +2305,7 @@ public function testAlarmDispatchWithoutEventDispatcher()
23052305 $ application = $ this ->createSignalableApplication ($ command , null );
23062306
23072307 $ this ->assertSame (1 , $ application ->run (new ArrayInput (['alarm ' ])));
2308+ $ this ->assertSame (1 , $ application ->getAlarmInterval ());
23082309 $ this ->assertTrue ($ command ->signaled );
23092310 }
23102311
You can’t perform that action at this time.
0 commit comments