assertFileExists($path); $rows = json_decode(file_get_contents($path) ?: '[]', true); $this->assertIsArray($rows); foreach ($rows as $row) { $this->assertArrayHasKey('module', $row); $this->assertArrayHasKey('canonical_status', $row); $this->assertArrayHasKey('risk', $row); } } }