Commit cc661f92 authored by Jeremy Mikola's avatar Jeremy Mikola

Test ReadableStream::seek() with out-of-range offset

parent 68287e92
......@@ -177,4 +177,16 @@ class ReadableStreamFunctionalTest extends FunctionalTestCase
$stream->readBytes(-1);
}
/**
* @expectedException MongoDB\Exception\InvalidArgumentException
* @expectedExceptionMessage $offset must be >= 0 and <= 10; given: 11
*/
public function testSeekOutOfRange()
{
$fileDocument = $this->collectionWrapper->findFileById('length-10');
$stream = new ReadableStream($this->collectionWrapper, $fileDocument);
$stream->seek(11);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment