Code Duplication    Length = 18-19 lines in 2 locations

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

@@ 81-98 (lines=18) @@
78
        $this->assertEquals('UNKNOWN -- log not found', $log->test);
79
    }
80
81
    public function testHandleLogItemAppendsCulpableFunction()
82
    {
83
        $process = new StubbedParaunitProcess();
84
        $process->setWaitingForTestResult(true);
85
        $parser = new TestStartParser();
86
        $log = new \stdClass();
87
        $log->event = 'testStart';
88
        $log->test = 'testFunction';
89
90
        $parser->handleLogItem($process, $log);
91
92
        $log->status = LogFetcher::LOG_ENDING_STATUS;
93
94
        $return = $parser->handleLogItem($process, $log);
95
96
        $this->assertNull($return, 'Parsing should not be interrupted');
97
        $this->assertEquals('testFunction', $log->test);
98
    }
99
100
    public function testHandleLogItemAppendsCulpableFunctionToRightProcess()
101
    {
@@ 100-118 (lines=19) @@
97
        $this->assertEquals('testFunction', $log->test);
98
    }
99
100
    public function testHandleLogItemAppendsCulpableFunctionToRightProcess()
101
    {
102
        $parser = new TestStartParser();
103
        $log = new \stdClass();
104
        $log->event = 'testStart';
105
        $log->test = 'testFunction';
106
107
        $parser->handleLogItem(new StubbedParaunitProcess(), $log);
108
109
        $log = new \stdClass();
110
        $log->status = LogFetcher::LOG_ENDING_STATUS;
111
        $process = new StubbedParaunitProcess();
112
        $process->setWaitingForTestResult(true);
113
114
        $return = $parser->handleLogItem($process, $log);
115
116
        $this->assertNull($return, 'Parsing should not be interrupted');
117
        $this->assertEquals('UNKNOWN -- log not found', $log->test);
118
    }
119
}
120