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