Code Duplication    Length = 19-19 lines in 2 locations

tests/CVECheckTaskTest.php 2 locations

@@ 52-70 (lines=19) @@
49
        $this->assertCount(1, $postCheck, 'CVE has been stored');
50
    }
51
52
    public function testNoDuplicates()
53
    {
54
        $securityCheckerMock = $this->getSecurityCheckerMock();
55
        $checkTask = new CVECheckTask;
56
        $checkTask->setSecurityChecker($securityCheckerMock);
57
58
        $preCheck = CVE::get();
59
        $this->assertCount(0, $preCheck, 'database is empty to begin with');
60
61
        $checkTask->run(null);
62
63
        $postCheck = CVE::get();
64
        $this->assertCount(1, $postCheck, 'CVE has been stored');
65
        
66
        $checkTask->run(null);
67
68
        $postCheck = CVE::get();
69
        $this->assertCount(1, $postCheck, 'The CVE isn\'t stored twice.');
70
    }
71
72
    public function testCVERemovals()
73
    {
@@ 72-90 (lines=19) @@
69
        $this->assertCount(1, $postCheck, 'The CVE isn\'t stored twice.');
70
    }
71
72
    public function testCVERemovals()
73
    {
74
        $securityCheckerMock = $this->getSecurityCheckerMock();
75
        $checkTask = new CVECheckTask;
76
        $checkTask->setSecurityChecker($securityCheckerMock);
77
78
        $checkTask->run(null);
79
80
        $preCheck = CVE::get();
81
        $this->assertCount(1, $preCheck, 'database has stored CVEs');
82
83
        $securityCheckerMock = $this->getSecurityCheckerMock(true);
84
        $checkTask->setSecurityChecker($securityCheckerMock);
85
86
        $checkTask->run(null);
87
88
        $postCheck = CVE::get();
89
        $this->assertCount(0, $postCheck, 'database is empty to finish with');
90
    }
91
}
92