| 4276 | describe('PHP Include Resolution', () => { |
| 4277 | it('isPhpIncludePathRef distinguishes include paths from namespace use (#660)', () => { |
| 4278 | const mk = (name: string, over: Partial<UnresolvedRef> = {}): UnresolvedRef => ({ |
| 4279 | fromNodeId: 'f', referenceName: name, referenceKind: 'imports', |
| 4280 | line: 1, column: 0, filePath: 'x.php', language: 'php', ...over, |
| 4281 | }); |
| 4282 | // include paths: contain a slash or a file extension |
| 4283 | expect(isPhpIncludePathRef(mk('lib.php'))).toBe(true); |
| 4284 | expect(isPhpIncludePathRef(mk('inc/db.php'))).toBe(true); |