File tree Expand file tree Collapse file tree 4 files changed +29
-3
lines changed
Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 77php :
88 - 7.1
99 - 7.2
10+ - 7.3
1011
1112install :
1213 - travis_retry composer clear-cache
Original file line number Diff line number Diff line change 2121 },
2222 "autoload" : {
2323 "psr-4" : {
24- "Tale\\ " : " src" ,
24+ "Tale\\ " : " src"
25+ }
26+ },
27+ "autoload-dev" : {
28+ "psr-4" : {
2529 "Tale\\ Test\\ " : " tests"
2630 }
2731 }
Original file line number Diff line number Diff line change 33namespace Tale \Test ;
44
55use PHPUnit \Framework \TestCase ;
6- use Tale \Reader \StreamReader ;
76use Tale \Reader \StringReader ;
8- use function Tale \stream_memory ;
97
108/**
119 * @coversDefaultClass \Tale\Reader\StringReader
Original file line number Diff line number Diff line change @@ -325,4 +325,27 @@ public function testReadAlphaNumericAndNonAlphaNumeric(): void
325325 self ::assertSame ('test34563 ' , $ reader ->readAlphaNumeric ());
326326 self ::assertSame (" \t\n" , $ reader ->readNonAlphaNumeric ());
327327 }
328+
329+ /**
330+ * @covers ::__construct
331+ * @covers ::eof
332+ */
333+ public function testEof (): void
334+ {
335+ $ stream = stream_memory ("\t \t\vtest34563 \t\n" );
336+ $ reader = new TextReader (new StreamReader ($ stream ));
337+ self ::assertFalse ($ reader ->eof ());
338+ }
339+
340+ /**
341+ * @covers ::__construct
342+ * @covers ::consume
343+ */
344+ public function testConsume (): void
345+ {
346+ $ rawData = "test34563 \t\n" ;
347+ $ stream = stream_memory ($ rawData );
348+ $ reader = new TextReader (new StreamReader ($ stream ));
349+ self ::assertSame ($ rawData , $ reader ->consume (20 ));
350+ }
328351}
You can’t perform that action at this time.
0 commit comments