Reputation: 57
I use PhpStorm in development. To run a test I do below 3 commands:
docker-compose exec app bash
cd app/
vendor/bin/phpunit unitTest/Sample.php
I want to be able to run the test just by clicking the "Run" button inside PhpStorm.
I tried to accomplish it using docs from IntelliJ but they overwhelmed me. I thought I just need to change the interpreter path but couldn't understand how to attach to a running docker.
Upvotes: 0
Views: 4469
Reputation: 3557
First you need to add your Docker-compose based interpreter. See this guide.
Second, add a PHPUnit configuration based on this interpreter, see "Integrate PHPUnit with a PhpStorm project".
After that you should be able to simply Run the tests using IDE UI.
Upvotes: 3