PHPUnit/VSCode: Difference between revisions
Created page with "This project looks very interesting. I need to check it out. https://github.com/elonmallin/vscode-phpunit Category:Wiki Category:MediaWiki Category:Development Category:QA Category:Testing Category:Static Analysis Category:Tools Category:Continuous Integration" |
No edit summary |
||
| Line 1: | Line 1: | ||
This project looks very interesting. I need to check it out. | This project looks very interesting. I need to check it out. | ||
https://github.com/elonmallin/vscode-phpunit | https://github.com/elonmallin/vscode-phpunit | ||
== 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]]) | |||
But to get it to work with VSCode, I needed to | |||
* <code>make install</code> | |||
* <code>make prepare-dev</code> | |||
* <code>make bash</code> | |||
* <code>export XDEBUG_SESSION=1</code><ref>https://xdebug.org/docs/step_debug#troubleshoot</ref> 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]] | |||
<pre> | |||
# 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 | |||
</pre> | |||