File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <phpunit backupGlobals =" false"
4+ backupStaticAttributes =" false"
5+ colors =" true"
6+ convertErrorsToExceptions =" true"
7+ convertNoticesToExceptions =" true"
8+ convertWarningsToExceptions =" true"
9+ processIsolation =" false"
10+ stopOnFailure =" false"
11+ syntaxCheck =" false"
12+ bootstrap =" tests/bootstrap.php"
13+ >
14+ <testsuites >
15+ <testsuite name =" React Test Suite" >
16+ <directory >./tests/</directory >
17+ </testsuite >
18+ </testsuites >
19+
20+ <filter >
21+ <whitelist >
22+ <directory >./src/</directory >
23+ </whitelist >
24+ </filter >
25+ </phpunit >
Original file line number Diff line number Diff line change 33namespace React \Tests \Stream ;
44
55use React \Stream \Buffer ;
6- use React \Tests \Socket \TestCase ;
76
87class BufferTest extends TestCase
98{
Original file line number Diff line number Diff line change 44
55use React \Stream \BufferedSink ;
66use React \Stream \ReadableStream ;
7- use React \Tests \Socket \TestCase ;
87
98/**
109 * @covers React\Stream\BufferedSink
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace React \Tests \Stream ;
4+
5+ class CallableStub
6+ {
7+ public function __invoke ()
8+ {
9+ }
10+ }
Original file line number Diff line number Diff line change 55use React \Stream \CompositeStream ;
66use React \Stream \ReadableStream ;
77use React \Stream \WritableStream ;
8- use React \Tests \Socket \TestCase ;
98
109/**
1110 * @covers React\Stream\CompositeStream
Original file line number Diff line number Diff line change 33namespace React \Tests \Stream ;
44
55use React \Stream \ReadableStream ;
6- use React \Tests \Socket \TestCase ;
76
87class ReadableStreamTest extends TestCase
98{
Original file line number Diff line number Diff line change 33namespace React \Tests \Stream ;
44
55use React \Stream \Stream ;
6- use React \Tests \Socket \TestCase ;
76
87class StreamTest extends TestCase
98{
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace React \Tests \Stream ;
4+
5+ class TestCase extends \PHPUnit_Framework_TestCase
6+ {
7+ protected function expectCallableExactly ($ amount )
8+ {
9+ $ mock = $ this ->createCallableMock ();
10+ $ mock
11+ ->expects ($ this ->exactly ($ amount ))
12+ ->method ('__invoke ' );
13+
14+ return $ mock ;
15+ }
16+
17+ protected function expectCallableOnce ()
18+ {
19+ $ mock = $ this ->createCallableMock ();
20+ $ mock
21+ ->expects ($ this ->once ())
22+ ->method ('__invoke ' );
23+
24+ return $ mock ;
25+ }
26+
27+ protected function expectCallableNever ()
28+ {
29+ $ mock = $ this ->createCallableMock ();
30+ $ mock
31+ ->expects ($ this ->never ())
32+ ->method ('__invoke ' );
33+
34+ return $ mock ;
35+ }
36+
37+ protected function createCallableMock ()
38+ {
39+ return $ this ->getMock ('React\Tests\Stream\CallableStub ' );
40+ }
41+ }
Original file line number Diff line number Diff line change 44
55use React \Stream \ReadableStream ;
66use React \Stream \ThroughStream ;
7- use React \Tests \Socket \TestCase ;
87
98/**
109 * @covers React\Stream\ThroughStream
Original file line number Diff line number Diff line change 55use React \Stream \Buffer ;
66use React \Stream \ReadableStream ;
77use React \Stream \Util ;
8- use React \Tests \Socket \TestCase ;
98
109/**
1110 * @covers React\Stream\Util
You can’t perform that action at this time.
0 commit comments