File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use React \EventLoop \Timer \Timer ;
77use React \EventLoop \Timer \Timers ;
88
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- }));
9+ class TimersTest extends TestCase
10+ {
11+ public function testBlockedTimer ()
12+ {
13+ $ loop = $ this
14+ ->getMockBuilder ('React\EventLoop\LoopInterface ' )
15+ ->getMock ();
16+
17+ $ timers = new Timers ();
18+ $ timers ->tick ();
19+
20+ // simulate a bunch of processing on stream events,
21+ // part of which schedules a future timer...
22+ sleep (1 );
23+ $ timers ->add (new Timer ($ loop , 0.5 , function () {
24+ $ this ->fail ("Timer shouldn't be called " );
25+ }));
2326
24- $ timers ->tick ();
25- }
27+ $ timers ->tick ();
28+ }
2629}
You can’t perform that action at this time.
0 commit comments