Code Duplication    Length = 10-12 lines in 2 locations

tests/unit/Task/ExecTaskTest.php 2 locations

@@ 23-34 (lines=12) @@
20
        test::double('Robo\Task\Base\Exec', ['output' => new \Symfony\Component\Console\Output\NullOutput()]);
21
    }
22
23
    public function testExec()
24
    {
25
        $task = new \Robo\Task\Base\Exec('ls');
26
        $task->setLogger(new \Psr\Log\NullLogger());
27
28
        $result = $task->run();
29
        $this->process->verifyInvoked('run');
30
        $this->assertEquals(
31
            'Hello world',
32
            $result->getMessage());
33
        $this->assertEquals(0, $result->getExitCode());
34
    }
35
36
    public function testExecInBackground()
37
    {
@@ 36-45 (lines=10) @@
33
        $this->assertEquals(0, $result->getExitCode());
34
    }
35
36
    public function testExecInBackground()
37
    {
38
        $task = new \Robo\Task\Base\Exec('ls');
39
        $task->setLogger(new \Psr\Log\NullLogger());
40
41
        $result = $task->background()->run();
42
        $this->process->verifyInvoked('start');
43
        $this->process->verifyNeverInvoked('run');
44
        $this->assertNotEquals(100, $result->getExitCode());
45
    }
46
47
    public function testGetCommand()
48
    {