Skip to content

Commit 7ee298e

Browse files
committed
Remove non compatible phpunit flag
1 parent f06c7af commit 7ee298e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install PHPUnit
2929
run: composer require --dev phpunit/phpunit
3030
- name: Run PHPUnit
31-
run: composer test -- --do-not-cache-result
31+
run: composer test
3232
PHP_CodeSniffer:
3333
runs-on: ubuntu-latest
3434
steps:

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@
2222
<include>
2323
<directory suffix=".php">src</directory>
2424
</include>
25+
<exclude>
26+
<file>src/autoload.php</file>
27+
</exclude>
2528
</coverage>
2629
</phpunit>

tests/tests/JsonStreamTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,13 @@ public function testGetRemainingContents()
148148
$this->assertSame('["val', $stream->read(5));
149149
$this->assertSame('ue"]', $stream->getContents());
150150
}
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+
}
151160
}

0 commit comments

Comments
 (0)