We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be949d9 commit 010751cCopy full SHA for 010751c
tests/GridFS/ReadableStreamFunctionalTest.php
@@ -190,6 +190,15 @@ public function testReadBytesWithNegativeLength()
190
$stream->readBytes(-1);
191
}
192
193
+ public function testSeekBeforeReading()
194
+ {
195
+ $fileDocument = $this->collectionWrapper->findFileById('length-10');
196
+ $stream = new ReadableStream($this->collectionWrapper, $fileDocument);
197
+
198
+ $stream->seek(8);
199
+ $this->assertSame('ij', $stream->readBytes(2));
200
+ }
201
202
/**
203
* @expectedException MongoDB\Exception\InvalidArgumentException
204
* @expectedExceptionMessage $offset must be >= 0 and <= 10; given: 11
0 commit comments