Code Duplication    Length = 10-17 lines in 3 locations

tests/unit/Task/ComposerTest.php 1 location

@@ 25-41 (lines=17) @@
22
        ]);
23
    }
24
    // tests
25
    public function testComposerInstall()
26
    {
27
        $composer = test::double('Robo\Task\Composer\Install', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]);
28
29
        (new \Robo\Task\Composer\Install('composer'))->run();
30
        $composer->verifyInvoked('executeCommand', ['composer install --no-interaction']);
31
32
        (new \Robo\Task\Composer\Install('composer'))
33
            ->preferSource()
34
            ->run();
35
        $composer->verifyInvoked('executeCommand', ['composer install --prefer-source --no-interaction']);
36
37
        (new \Robo\Task\Composer\Install('composer'))
38
            ->optimizeAutoloader()
39
            ->run();
40
        $composer->verifyInvoked('executeCommand', ['composer install --optimize-autoloader --no-interaction']);
41
    }
42
43
    public function testComposerInstallAnsi()
44
    {

tests/unit/Task/DockerTest.php 2 locations

@@ 21-33 (lines=13) @@
18
        ]);
19
    }
20
    // tests
21
    public function testDockerBuild()
22
    {
23
        $docker = test::double('Robo\Task\Docker\Build', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]);
24
25
        (new \Robo\Task\Docker\Build())->run();
26
        $docker->verifyInvoked('executeCommand', ['docker build  .']);
27
28
        (new \Robo\Task\Docker\Build())->tag('something')->run();
29
        $docker->verifyInvoked('executeCommand', ['docker build  -t something .']);
30
31
        (new \Robo\Task\Docker\Build())->enableBuildKit()->tag('something')->run();
32
        $docker->verifyInvoked('executeCommand', ['DOCKER_BUILDKIT=1 docker build  -t something .']);
33
    }
34
35
    public function testDockerCommit()
36
    {
@@ 73-82 (lines=10) @@
70
        $docker->verifyInvoked('executeCommand', ['docker rm container  ']);
71
    }
72
73
    public function testDockerRun()
74
    {
75
        $docker = test::double('Robo\Task\Docker\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger(), 'getUniqId' => '12345']);
76
77
        (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->run();
78
        $docker->verifyInvoked('executeCommand', ['docker run  -i --cidfile /tmp/docker_12345.cid cid']);
79
80
        (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->exec('pwd')->run();
81
        $docker->verifyInvoked('executeCommand', ['docker run  -i --cidfile /tmp/docker_12345.cid cid pwd']);
82
    }
83
84
    public function testDockerStart()
85
    {