toBe(build_devices_csv_legacy($ids)); } }); test('a set of per-device host_id predicates covers the same ids as one IN list', function () { $ids = array(5, 12, 88); // The old code deleted host_id = ? once per device; the new code deletes // host_id IN (all). The targeted id set is identical. $per_device = array(); foreach ($ids as $id) { $per_device[$id] = true; } $in_list = array_map('intval', $ids); sort($in_list); $keys = array_keys($per_device); sort($keys); expect($keys)->toBe($in_list); });