| 147 | Object.fromEntries(Array.from({ length: count }, (_, i) => [`${dir ? `${dir}/` : ''}lib/f${i + 1}.php`, fn(`f${i + 1}`)])); |
| 148 | /** A page's includes of `/lib/f1.php` … `/lib/f<count>.php` from the web root. */ |
| 149 | const includesOf = (count: number): string => |
| 150 | Array.from({ length: count }, (_, i) => `require_once $_SERVER['DOCUMENT_ROOT'] . '/lib/f${i + 1}.php';`).join('\n'); |
| 151 | const page = (count: number, ...more: string[]) => ['<?php', includesOf(count), ...more, ''].join('\n'); |
| 152 | |
| 153 | describe("the web root the project's includes show, with no webRoot (#3298)", () => { |