public function testLengthLessOffsetWhenNoLimitSize() { $a = Stream::factory('foo_bar'); $b = new LimitStream($a, -1, 4); $this->assertEquals(3, $b->getSize()); }
public function testGetContentsIsBasedOnSubset() { $body = new LimitStream(Stream::factory('foobazbar'), 3, 3); $this->assertEquals('baz', $body->getContents()); }