File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 28
28
- name : Install PHPUnit
29
29
run : composer require --dev phpunit/phpunit
30
30
- name : Run PHPUnit
31
- run : composer test -- --do-not-cache-result
31
+ run : composer test
32
32
PHP_CodeSniffer :
33
33
runs-on : ubuntu-latest
34
34
steps :
Original file line number Diff line number Diff line change 22
22
<include >
23
23
<directory suffix =" .php" >src</directory >
24
24
</include >
25
+ <exclude >
26
+ <file >src/autoload.php</file >
27
+ </exclude >
25
28
</coverage >
26
29
</phpunit >
Original file line number Diff line number Diff line change @@ -148,4 +148,13 @@ public function testGetRemainingContents()
148
148
$ this ->assertSame ('["val ' , $ stream ->read (5 ));
149
149
$ this ->assertSame ('ue"] ' , $ stream ->getContents ());
150
150
}
151
+
152
+ public function testGetContentOnEof ()
153
+ {
154
+ $ encoder = (new BufferJsonEncoder (['value ' ]));
155
+ $ stream = new JsonStream ($ encoder );
156
+
157
+ $ this ->assertSame ('["value"] ' , $ stream ->getContents ());
158
+ $ this ->assertSame ('' , $ stream ->getContents ());
159
+ }
151
160
}
You can’t perform that action at this time.
0 commit comments