visitsHelper = $this->prophesize(VisitsStatsHelperInterface::class); $this->commandTester = $this->testerForCommand(new GetOrphanVisitsCommand($this->visitsHelper->reveal())); } /** @test */ public function outputIsProperlyGenerated(): void { $visit = Visit::forBasePath(new Visitor('bar', 'foo', '', ''))->locate( VisitLocation::fromGeolocation(new Location('', 'Spain', '', 'Madrid', 0, 0, '')), ); $getVisits = $this->visitsHelper->orphanVisits(Argument::any())->willReturn( new Paginator(new ArrayAdapter([$visit])), ); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); self::assertEquals( <<getDate()->toAtomString()} | bar | Spain | Madrid | base_url | +---------+---------------------------+------------+---------+--------+----------+ OUTPUT, $output, ); $getVisits->shouldHaveBeenCalledOnce(); } }