query = $this->createMock(CrawlableShortCodesQueryInterface::class); $this->helper = new CrawlingHelper($this->query); } #[Test] public function listCrawlableShortCodesDelegatesIntoRepository(): void { $this->query->expects($this->once())->method('__invoke')->willReturn([]); [...$this->helper->listCrawlableShortCodes()]; } }