Code Duplication    Length = 14-14 lines in 2 locations

tests/Unit/Parser/JSON/LogParserTest.php 2 locations

@@ 68-81 (lines=14) @@
65
        $parser->onProcessTerminated(new ProcessEvent($process));
66
    }
67
68
    public function testParseHandlesNoTestExecuted()
69
    {
70
        $process = new StubbedParaunitProcess();
71
        $process->setOutput('No tests executed!');
72
        $process->setExitCode(0);
73
        $parser1 = $this->prophesize(ParserChainElementInterface::class);
74
        $parser1->handleLogItem($process, Argument::cetera())
75
            ->shouldNotBeCalled();
76
77
        $parser = $this->createParser(false, false, true);
78
        $parser->addParser($parser1->reveal());
79
80
        $parser->onProcessTerminated(new ProcessEvent($process));
81
    }
82
83
    public function testParseHandlesTestToBeRetried()
84
    {
@@ 83-96 (lines=14) @@
80
        $parser->onProcessTerminated(new ProcessEvent($process));
81
    }
82
83
    public function testParseHandlesTestToBeRetried()
84
    {
85
        $process = new StubbedParaunitProcess();
86
        $process->setOutput('No tests executed!');
87
        $process->setExitCode(0);
88
        $parser1 = $this->prophesize(ParserChainElementInterface::class);
89
        $parser1->handleLogItem($process, Argument::cetera())
90
            ->shouldNotBeCalled();
91
92
        $parser = $this->createParser(true, false, false, true);
93
        $parser->addParser($parser1->reveal());
94
95
        $parser->onProcessTerminated(new ProcessEvent($process));
96
    }
97
98
    private function createParser(bool $logFound = true, bool $abnormal = true, bool $noTestExecuted = false, bool $willBeRetried = false): LogParser
99
    {