Skip to content

Commit 6c75d9a

Browse files
committed
fix: correct misleading fallback test for PathReplacer workspaceFolder
The previous test asserted a double-nested path as expected behavior, which was actually a bug demonstration. Replace with a semantic check that verifies ${workspaceFolder} falls back to cwd when not provided.
1 parent d2ca6d3 commit 6c75d9a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

packages/phpunit/src/Configuration/PathReplacer.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,7 @@ describe('PathReplacer', () => {
335335
it(`falls back to cwd when workspaceFolder is not provided`, () => {
336336
const pathReplacer = new PathReplacer({ cwd });
337337

338-
expect(
339-
pathReplacer.toRemote(`${VAR_WORKSPACE_FOLDER}/apps/api/phpunit.xml.dist`),
340-
).toEqual('/workspace/apps/api/apps/api/phpunit.xml.dist');
338+
expect(pathReplacer.replacePathVariables(VAR_WORKSPACE_FOLDER)).toEqual(cwd);
341339
});
342340
});
343341
});

0 commit comments

Comments
 (0)