Code Duplication    Length = 20-20 lines in 2 locations

tests/unit/Task/GitTest.php 2 locations

@@ 32-51 (lines=20) @@
29
        $this->git->verifyInvoked('executeCommand', ['git add -A && git pull']);
30
    }
31
32
    public function testGitStackCommands()
33
    {
34
        $linuxCmd = "git clone http://github.com/consolidation-org/Robo && git pull && git add -A && git commit -m 'changed' && git push && git tag 0.6.0 && git push origin 0.6.0";
35
36
        $winCmd = 'git clone http://github.com/consolidation-org/Robo && git pull && git add -A && git commit -m "changed" && git push && git tag 0.6.0 && git push origin 0.6.0';
37
38
        $cmd = stripos(PHP_OS, 'WIN') === 0 ? $winCmd : $linuxCmd;
39
40
        verify(
41
            (new \Robo\Task\Vcs\GitStack())
42
                ->cloneRepo('http://github.com/consolidation-org/Robo')
43
                ->pull()
44
                ->add('-A')
45
                ->commit('changed')
46
                ->push()
47
                ->tag('0.6.0')
48
                ->push('origin', '0.6.0')
49
                ->getCommand()
50
        )->equals($cmd);
51
    }
52
53
    public function testGitStackCommandsWithTagMessage()
54
    {
@@ 53-72 (lines=20) @@
50
        )->equals($cmd);
51
    }
52
53
    public function testGitStackCommandsWithTagMessage()
54
    {
55
        $linuxCmd = "git clone http://github.com/consolidation-org/Robo && git pull && git add -A && git commit -m 'changed' && git push && git tag -m 'message' 0.6.0 && git push origin 0.6.0";
56
57
        $winCmd = 'git clone http://github.com/consolidation-org/Robo && git pull && git add -A && git commit -m "changed" && git push && git tag -m \'message\' 0.6.0 && git push origin 0.6.0';
58
59
        $cmd = stripos(PHP_OS, 'WIN') === 0 ? $winCmd : $linuxCmd;
60
61
        verify(
62
            (new \Robo\Task\Vcs\GitStack())
63
                ->cloneRepo('http://github.com/consolidation-org/Robo')
64
                ->pull()
65
                ->add('-A')
66
                ->commit('changed')
67
                ->push()
68
                ->tag('0.6.0', 'message')
69
                ->push('origin', '0.6.0')
70
                ->getCommand()
71
        )->equals($cmd);
72
    }
73
74
    public function testGitStackShallowCloneCommand()
75
    {