toBe(['include/vendor/composer/installed.json']); }); test('every legacy allowlist entry still owns a tracked file', function () use ($root) { $tracked = cacti_vendor_policy_tracked_files($root); foreach (cacti_vendor_policy_legacy_paths() as $legacy_path) { $matches = array_filter($tracked, fn (string $file) : bool => $file === $legacy_path || str_starts_with($file, $legacy_path)); expect($matches)->not->toBeEmpty($legacy_path . ' is a stale allowlist entry'); } }); test('the Composer directory keeps its release directory-listing guard', function () use ($root) { $guard = 'include/vendor/composer/index.php'; expect(cacti_vendor_policy_tracked_files($root))->toContain($guard) ->and(file_get_contents($root . '/' . $guard))->toContain('Location:../index.php'); });