Code Duplication    Length = 20-21 lines in 2 locations

tests/Functional/Command/ParallelCommandTest.php 2 locations

@@ 23-42 (lines=20) @@
20
 */
21
class ParallelCommandTest extends BaseTestCase
22
{
23
    public function testExecutionAllGreen()
24
    {
25
        $configurationPath = $this->getConfigForStubs();
26
        $application = new Application();
27
        $application->add(new ParallelCommand(new ParallelConfiguration()));
28
29
        $command = $application->find('run');
30
        $commandTester = new CommandTester($command);
31
        $exitCode = $commandTester->execute([
32
            'command' => $command->getName(),
33
            '--configuration' => $configurationPath,
34
            'stringFilter' => 'green',
35
        ]);
36
37
        $output = $commandTester->getDisplay();
38
        $this->assertNotContains('NO TESTS EXECUTED', $output);
39
        $this->assertNotContains('Executed: 0 test classes', $output);
40
        $this->assertNotContains('ABNORMAL TERMINATIONS', $output);
41
        $this->assertEquals(0, $exitCode);
42
    }
43
44
    public function testExecutionAllGreenWithRepeatOption()
45
    {
@@ 44-64 (lines=21) @@
41
        $this->assertEquals(0, $exitCode);
42
    }
43
44
    public function testExecutionAllGreenWithRepeatOption()
45
    {
46
        $configurationPath = $this->getConfigForStubs();
47
        $application = new Application();
48
        $application->add(new ParallelCommand(new ParallelConfiguration()));
49
50
        $command = $application->find('run');
51
        $commandTester = new CommandTester($command);
52
        $exitCode = $commandTester->execute([
53
            'command' => $command->getName(),
54
            '--configuration' => $configurationPath,
55
            '--repeat' => '1',
56
            'stringFilter' => 'green',
57
        ]);
58
59
        $output = $commandTester->getDisplay();
60
        $this->assertNotContains('NO TESTS EXECUTED', $output);
61
        $this->assertNotContains('Executed: 0 test classes', $output);
62
        $this->assertNotContains('ABNORMAL TERMINATIONS', $output);
63
        $this->assertEquals(0, $exitCode);
64
    }
65
66
    public function testExecution()
67
    {