Code Duplication    Length = 16-18 lines in 4 locations

tests/InstallCommandTest.php 4 locations

@@ 16-31 (lines=16) @@
13
class InstallCommandTest extends TestCase
14
{
15
    /** @test */
16
    public function testInstallCommand()
17
    {
18
        $application = new Application();
19
        $application->add(new InstallCommand());
20
21
        $command = $application->find('install');
22
        $commandTester = new CommandTester($command);
23
24
        $commandTester->execute([
25
            'command' => $command->getName(),
26
        ]);
27
28
        $output = $commandTester->getDisplay();
29
        $this->assertContains('Running composer require acacha/admin-lte-template-laravel', $output);
30
        $this->assertContains('php artisan adminlte:publish', $output);
31
    }
32
33
    /** @test */
34
    public function testInstallDevCommand()
@@ 34-51 (lines=18) @@
31
    }
32
33
    /** @test */
34
    public function testInstallDevCommand()
35
    {
36
        $application = new Application();
37
        $application->add(new InstallCommand());
38
39
        $command = $application->find('install');
40
        $commandTester = new CommandTester($command);
41
42
        $commandTester->execute([
43
            'command' => $command->getName(),
44
            '--dev' => true
45
        ]);
46
47
        $output = $commandTester->getDisplay();
48
        $this->assertContains('Running composer require acacha/admin-lte-template-laravel:dev-master', $output);
49
        $this->assertContains('php artisan adminlte:publish', $output);
50
51
    }
52
53
    /** @test */
54
    public function testInstallNoAnsiCommand()
@@ 54-70 (lines=17) @@
51
    }
52
53
    /** @test */
54
    public function testInstallNoAnsiCommand()
55
    {
56
        $application = new Application();
57
        $application->add(new InstallCommand());
58
59
        $command = $application->find('install');
60
        $commandTester = new CommandTester($command);
61
62
        $commandTester->execute([
63
            'command' => $command->getName(),
64
            '--no-ansi' => true
65
        ]);
66
67
        $output = $commandTester->getDisplay();
68
        $this->assertContains('--no-ansi', $output);
69
70
    }
71
72
    /** @test */
73
    public function testInstallUseVendorPublishCommand()
@@ 73-90 (lines=18) @@
70
    }
71
72
    /** @test */
73
    public function testInstallUseVendorPublishCommand()
74
    {
75
        $application = new Application();
76
        $application->add(new InstallCommand());
77
78
        $command = $application->find('install');
79
        $commandTester = new CommandTester($command);
80
81
        $commandTester->execute([
82
            'command' => $command->getName(),
83
            '--use-vendor-publish' => true
84
        ]);
85
86
        $output = $commandTester->getDisplay();
87
        $this->assertContains('Running composer require acacha/admin-lte-template-laravel', $output);
88
        $this->assertContains('php artisan vendor:publish --tag=adminlte --force', $output);
89
90
    }
91
}
92