From 285f592e70716380546428266cb242deac11d751 Mon Sep 17 00:00:00 2001 From: rugk Date: Tue, 24 Feb 2026 12:37:47 +0000 Subject: [PATCH] test(phpunit): fix PHPUnit different CWD with a custom command As per https://github.com/recca0120/vscode-phpunit/issues/385#issuecomment-3947799942 Also needed to set `XDEBUG_MODE`. Generally works, but now I get test failures. --- .vscode/settings.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b927bc5c..fb6ccb66 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,14 +2,17 @@ "files.associations": { "**/cfg/conf*.php": "ini" }, + "phpunit.environment": { + "XDEBUG_MODE": "coverage" + }, "phpunit.phpunit": "${userHome}/.composer/vendor/bin/phpunit", + "phpunit.command": "/bin/sh -c 'cd ${workspaceFolder}/tst && ${php} ${phpunit} ${phpunitargs}'", "phpunit.args": [ "--configuration", "${workspaceFolder}/tst/phpunit.xml", "--bootstrap", "${workspaceFolder}/tst/Bootstrap.php" ], - "mochaExplorer.mochaPath": "js/node_modules/mocha", "mochaExplorer.pkgFile": "js/package.json", "mochaExplorer.files": "js/test/*.js" }