public function visitRange(Segments\Range $query) { $this->traversable = $this->traversable->slice($this->resolvedParameters[$query->getStartId()], $this->resolvedParameters[$query->getAmountId()]); }
/** * @dataProvider assocMixedValues */ public function testThatSlicingReturnsTheCorrectSegmentOfDataAndPreservesKeys(\Pinq\ITraversable $traversable, array $data) { $values = $traversable->slice(3, 2); $this->assertMatches($values, array_slice($data, 3, 2, true)); }