public function shouldChunkElementsWhenLengthDivisibleByChunk()
{
//given
$array = array(1, 2, 3, 4);
$batchIterator = new BatchingIterator(new ArrayIterator($array), 2);
$result = array();
//when
foreach ($batchIterator as $key => $value) {
$result[$key] = $value;
}
//then
$this->assertEquals(array(array(1, 2), array(3, 4)), $result);
}