| @@ 32-47 (lines=16) @@ | ||
| 29 | */ |
|
| 30 | protected $ipResolver; |
|
| 31 | ||
| 32 | public function setUp() |
|
| 33 | { |
|
| 34 | $this->visitService = $this->prophesize(VisitService::class); |
|
| 35 | $this->ipResolver = $this->prophesize(IpApiLocationResolver::class); |
|
| 36 | $this->ipResolver->getApiLimit()->willReturn(10000000000); |
|
| 37 | ||
| 38 | $command = new ProcessVisitsCommand( |
|
| 39 | $this->visitService->reveal(), |
|
| 40 | $this->ipResolver->reveal(), |
|
| 41 | Translator::factory([]) |
|
| 42 | ); |
|
| 43 | $app = new Application(); |
|
| 44 | $app->add($command); |
|
| 45 | ||
| 46 | $this->commandTester = new CommandTester($command); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * @test |
|
| @@ 35-49 (lines=15) @@ | ||
| 32 | */ |
|
| 33 | private $shortUrlService; |
|
| 34 | ||
| 35 | public function setUp() |
|
| 36 | { |
|
| 37 | $this->previewGenerator = $this->prophesize(PreviewGenerator::class); |
|
| 38 | $this->shortUrlService = $this->prophesize(ShortUrlService::class); |
|
| 39 | ||
| 40 | $command = new GeneratePreviewCommand( |
|
| 41 | $this->shortUrlService->reveal(), |
|
| 42 | $this->previewGenerator->reveal(), |
|
| 43 | Translator::factory([]) |
|
| 44 | ); |
|
| 45 | $app = new Application(); |
|
| 46 | $app->add($command); |
|
| 47 | ||
| 48 | $this->commandTester = new CommandTester($command); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @test |
|