Skip to content

Instantly share code, notes, and snippets.

@mknparreira
Last active August 12, 2021 22:25
Show Gist options
  • Save mknparreira/9115e755dce5c8dfee2eea40c6dc5613 to your computer and use it in GitHub Desktop.
Save mknparreira/9115e755dce5c8dfee2eea40c6dc5613 to your computer and use it in GitHub Desktop.
PHP | How to configurate PHPUnit to Visual Studio Code for Windows

Step I

Open the settings.json file and put it on this following configuration:

{
  "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
  "phpunit.php": "C:\\xampp\\php\\php.exe",
  "phpunit.phpunit": "C:/xampp/htdocs/talentsuite/htdocs/vendor/phpunit/phpunit/phpunit",
  "phpunit.args": [
    "--configuration", "C:\\xampp\\htdocs\\talentsuite\\htdocs\\phpunit.xml",
    "--testdox"
  ]
}

Step II

Install these following extensions:

  • PHPUnit
  • vscode-phpunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment