File tree Expand file tree Collapse file tree 7 files changed +52
-10
lines changed
tests/React/Tests/EventLoop Expand file tree Collapse file tree 7 files changed +52
-10
lines changed Original file line number Diff line number Diff line change 22
33namespace React \Tests \EventLoop ;
44
5- use React \EventLoop \LoopInterface ;
65use React \EventLoop \LibEvLoop ;
76
87class LibEvLoopTest extends AbstractLoopTest
Original file line number Diff line number Diff line change 22
33namespace React \Tests \EventLoop ;
44
5- use React \EventLoop \LoopInterface ;
65use React \EventLoop \LibEventLoop ;
76
87class LibEventLoopTest extends AbstractLoopTest
Original file line number Diff line number Diff line change 22
33namespace React \Tests \EventLoop ;
44
5- use React \EventLoop \LoopInterface ;
65use React \EventLoop \StreamSelectLoop ;
76
87class StreamSelectLoopTest extends AbstractLoopTest
Original file line number Diff line number Diff line change 11<?php
22
3- namespace React \Tests \EventLoop ;
3+ namespace React \Tests \EventLoop \ Timer ;
44
55use React \Tests \Socket \TestCase ;
6- use React \EventLoop \StreamSelectLoop ;
76use React \EventLoop \Timer \Timers ;
87
9- class TimerTest extends TestCase
8+ abstract class AbstractTimerTest extends TestCase
109{
11- private function createLoop ()
12- {
13- return new StreamSelectLoop ();
14- }
10+ abstract public function createLoop ();
1511
1612 /**
1713 * @covers React\EventLoop\StreamSelectLoop::tick
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace React \Tests \EventLoop \Timer ;
4+
5+ use React \EventLoop \LibEvLoop ;
6+
7+ class LibEvTimerTest extends AbstractTimerTest
8+ {
9+ public function createLoop ()
10+ {
11+ if (!class_exists ('libev\EventLoop ' )) {
12+ $ this ->markTestSkipped ('libev tests skipped because ext-libev is not installed. ' );
13+ }
14+
15+ return new LibEvLoop ();
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace React \Tests \EventLoop \Timer ;
4+
5+ use React \EventLoop \LibEventLoop ;
6+
7+ class LibEventTimerTest extends AbstractTimerTest
8+ {
9+ public function createLoop ()
10+ {
11+ $ this ->markTestSkipped ('libevent timers are currently broken. ' );
12+
13+ if (!function_exists ('event_base_new ' )) {
14+ $ this ->markTestSkipped ('libevent tests skipped because ext-libevent is not installed. ' );
15+ }
16+
17+ return new LibEventLoop ();
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace React \Tests \EventLoop \Timer ;
4+
5+ use React \EventLoop \StreamSelectLoop ;
6+
7+ class StreamSelectTimerTest extends AbstractTimerTest
8+ {
9+ public function createLoop ()
10+ {
11+ return new StreamSelectLoop ();
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments