private function getMockSections($indexBy, $count)
{
$keyPrefix = $indexBy == 'id' ? '' : 'sectionHandle';
$mockSections = [];
for ($x = 0; $x <= $count; ++$x) {
$mockSection = $this->getMockBuilder(SectionModel::class)->disableOriginalConstructor()->getMock();
$mockSection->expects($this->any())->method('__get')->willReturnMap([['handle', 'sectionHandle' . $x], ['id', $x], ['name', 'sectionName' . $x]]);
$mockSections[$keyPrefix . $x] = $mockSection;
}
return $mockSections;
}