We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69aa951 commit 31a613aCopy full SHA for 31a613a
tests/StreamSelectLoopTest.php
@@ -176,4 +176,23 @@ public function testSmallTimerInterval()
176
177
$loop->run();
178
}
179
+
180
+ /**
181
+ * https://github.com/reactphp/event-loop/issues/19
182
+ *
183
+ * Tests that timer with PHP_INT_MAX seconds interval will work.
184
+ */
185
+ public function testIntOverflowTimerInterval()
186
+ {
187
+ /** @var StreamSelectLoop|\PHPUnit_Framework_MockObject_MockObject $loop */
188
+ $loop = $this->getMock('React\EventLoop\StreamSelectLoop', ['sleep']);
189
+ $loop->expects($this->once())
190
+ ->method('sleep')
191
+ ->with(PHP_INT_MAX, 0)
192
+ ->willReturnCallback(function() use (&$loop) {
193
+ $loop->stop();
194
+ });
195
+ $loop->addTimer(PHP_INT_MAX, function(){});
196
+ $loop->run();
197
+ }
198
0 commit comments