public function testStructureOfEachEntry()
{
foreach ($this->checks['checks'] as $check) {
$this->assertArrayHasKey('cveid', $check, 'Entry found with no CVE ID');
$id = $check['cveid'];
$this->assertArrayHasKey('threat', $check, 'Missing "threat" for ' . $id);
$this->assertArrayHasKey('summary', $check, 'Missing "summary" for ' . $id);
$this->assertArrayHasKey('fixVersions', $check, 'Missing "fixVersions" for ' . $id);
$this->assertArrayHasKey('base', $check['fixVersions'], 'Missing "fixVersions[base]" for ' . $id);
// Make sure the versions are in order
$versions = $check['fixVersions']['base'];
$sortedVersions = $versions;
natsort($sortedVersions);
$this->assertSame($sortedVersions, $versions, 'Versions should be sorted in ascending order (' . $id . ')');
}
}