public function getMockSectionsService() { $mock = $this->getMockBuilder(SectionsService::class)->disableOriginalConstructor()->getMock(); $mock->expects($this->exactly(1))->method('getAllSections')->willReturn([]); return $mock; }