How to use PHPUnit on Docker in PHPStorm
PHPStorm Version: 2019.3.4
Specify CLI interpreter
Go to Settings > Languages & Frameworks > PHP
Select a interpreter from Docker
The result looks like this
Add testing framework configuration
Go to Settings > Languages & Frameworks > PHP > Test Frameworks
Select Configuration Type: PHPUnit by remote interpreter
Select the interpreter configured previously
The final result looks like this
Try it
Then you can see the test, try to run it.