Code Duplication    Length = 15-16 lines in 2 locations

module/CLI/test/Command/ShortUrl/GeneratePreviewCommandTest.php 1 location

@@ 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

module/CLI/test/Command/Visit/ProcessVisitsCommandTest.php 1 location

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