| @@ 33-47 (lines=15) @@ | ||
| 30 | */ |
|
| 31 | private $shortUrlService; |
|
| 32 | ||
| 33 | public function setUp() |
|
| 34 | { |
|
| 35 | $this->previewGenerator = $this->prophesize(PreviewGenerator::class); |
|
| 36 | $this->shortUrlService = $this->prophesize(ShortUrlService::class); |
|
| 37 | ||
| 38 | $command = new GeneratePreviewCommand( |
|
| 39 | $this->shortUrlService->reveal(), |
|
| 40 | $this->previewGenerator->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 |
|
| @@ 30-43 (lines=14) @@ | ||
| 27 | */ |
|
| 28 | protected $ipResolver; |
|
| 29 | ||
| 30 | public function setUp() |
|
| 31 | { |
|
| 32 | $this->visitService = $this->prophesize(VisitService::class); |
|
| 33 | $this->ipResolver = $this->prophesize(IpLocationResolver::class); |
|
| 34 | $command = new ProcessVisitsCommand( |
|
| 35 | $this->visitService->reveal(), |
|
| 36 | $this->ipResolver->reveal(), |
|
| 37 | Translator::factory([]) |
|
| 38 | ); |
|
| 39 | $app = new Application(); |
|
| 40 | $app->add($command); |
|
| 41 | ||
| 42 | $this->commandTester = new CommandTester($command); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @test |
|