Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 965 Bytes

README_VSCode.md

File metadata and controls

25 lines (21 loc) · 965 Bytes

VSCOde configuration in MDC (Moodle Docker Containers) for OrbStack

NOTE: the page is not maintained, please submit patches if you know how to make this work

  1. Install Docker extension from Microsoft
  2. Add mdc.env to your Moodle project
  3. Create containers with mdc-rebuild

Use Better PHPUnit to run tests in VSCode

  1. Initialise phpunit with phpunit-init
  2. Install Better PHPUnit extension
  3. Update VSCode configuration (note you need to edit project path):
{
    "better-phpunit.docker.command": "docker compose -f compose.yaml exec webserver",
    "better-phpunit.docker.enable": true,
    "better-phpunit.phpunitBinary": "vendor/bin/phpunit",
    "better-phpunit.docker.paths": {
        "/path/to/your/moodle": "/var/www/html"
    },
    "better-phpunit.xmlConfigFilepath": "/var/www/html/phpunit.xml"
}
  1. Open a test file, go to method and press Cmd+shif+p and select one of Better PHPUnit options to run tests.