fix link |
link to more detailed docs |
||
| Line 3: | Line 3: | ||
== Getting PHPUnit to work inside Docker with VSCode == | == Getting PHPUnit to work inside Docker with VSCode == | ||
The SemanticMediaWiki project uses the [https://github.com/gesinn-it-pub/docker-compose-ci Gesinn IT docker compose CI] system for testing locally (and through [[GitHub/Actions]]) | The SemanticMediaWiki project uses the [https://github.com/gesinn-it-pub/docker-compose-ci Gesinn IT docker compose CI] system (see [[Using docker-compose-ci]]) for testing locally (and through [[GitHub/Actions]]) | ||
But to get it to work with VSCode, I needed to | But to get it to work with VSCode, I needed to | ||
Latest revision as of 13:57, 26 November 2025
This project looks very interesting. I need to check it out. https://github.com/elonmallin/vscode-phpunit
Getting PHPUnit to work inside Docker with VSCode
The SemanticMediaWiki project uses the Gesinn IT docker compose CI system (see Using docker-compose-ci) for testing locally (and through GitHub/Actions)
But to get it to work with VSCode, I needed to
make installmake prepare-devmake bashexport XDEBUG_SESSION=1[1] in the terminal before hitting 'Listen for XDebug' in VSCode (which was attached to the running container).
After it is all working and you want to invoke PHPUnit, you can either do it directly, or through composer
# these are equivalent composer phpunit -- -c phpunit.xml.dist --bootstrap tests/bootstrap.php --filter testTranscludeAnnotationWithoutUniquidThrowsException php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist --bootstrap tests/bootstrap.php --filter testTranscludeAnnotationWithoutUniquidThrowsException