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 cbab35f commit 3b797b9Copy full SHA for 3b797b9
1 file changed
tests/Timer/TimersTest.php
@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace React\Tests\EventLoop\Timer;
4
5
+use React\Tests\EventLoop\TestCase;
6
+use React\EventLoop\Timer\Timer;
7
+use React\EventLoop\Timer\Timers;
8
9
+class TimersTest extends TestCase {
10
+ public function testBlockedTimer() {
11
+ $loop = $this->getMockBuilder('React\EventLoop\LoopInterface')
12
+ ->getMock();
13
14
+ $timers = new Timers();
15
+ $timers->tick();
16
17
+ // simulate a bunch of processing on stream events,
18
+ // part of which schedules a future timer...
19
+ sleep(1);
20
+ $timers->add(new Timer($loop, 0.5, function() {
21
+ $this->fail("Timer shouldn't be called");
22
+ }));
23
24
25
+ }
26
+}
0 commit comments