mirror of
https://github.com/shufflingpixels/php-io.git
synced 2026-08-15 19:58:14 +02:00
Remove BinaryReader stream and string helpers
BinaryReader does not own the stream object. so we should not have a method that creates one (string) also remove stream() as its the same as the constructor.
This commit is contained in:
parent
0fa93d691c
commit
785e48a023
3 changed files with 14 additions and 32 deletions
|
|
@ -302,7 +302,7 @@ it('integrates with BinaryReader for binary reads from a scoped section', functi
|
|||
$buffer = new Buffer($data);
|
||||
|
||||
$limited = new LimitedResource($buffer, 4, 4);
|
||||
$reader = BinaryReader::stream($limited);
|
||||
$reader = new BinaryReader($limited);
|
||||
|
||||
expect($reader->length())->toBe(4)
|
||||
->and($reader->readUInt32LE())->toBe($value);
|
||||
|
|
@ -314,7 +314,7 @@ it('BinaryReader seek works within the window', function () {
|
|||
$buffer = new Buffer($data);
|
||||
|
||||
$limited = new LimitedResource($buffer, 8, 4);
|
||||
$reader = BinaryReader::stream($limited);
|
||||
$reader = new BinaryReader($limited);
|
||||
|
||||
$first = $reader->readUInt32LE();
|
||||
$reader->seek(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue