File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1616 <testsuite name =" mainMethods" >
1717 <file >tests/mainMethods.php</file >
1818 </testsuite >
19+ <testsuite name =" stream" >
20+ <file >tests/stream.php</file >
21+ </testsuite >
1922 </testsuites >
2023 <filter >
2124 <whitelist processUncoveredFilesFromWhitelist =" true" >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use JsPhpize \Stream \ExpressionStream ;
4+
5+ class StreamTest extends \PHPUnit_Framework_TestCase
6+ {
7+ /**
8+ * @group stream
9+ */
10+ public function testStreamEmulator ()
11+ {
12+ $ stream = new ExpressionStream ();
13+
14+ $ this ->assertTrue ($ stream ->stream_open ('foo;bar ' ));
15+ $ this ->assertEmpty ($ stream ->stream_stat ());
16+ $ this ->assertSame ('ba ' , $ stream ->stream_read (2 ));
17+ $ this ->assertSame (2 , $ stream ->stream_tell ());
18+ $ this ->assertFalse ($ stream ->stream_eof ());
19+ $ this ->assertTrue (is_array ($ stream ->url_stat ('foo ' , 0 )));
20+ $ this ->assertSame ('r ' , $ stream ->stream_read (2 ));
21+ $ this ->assertTrue ($ stream ->stream_eof ());
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments