Unit & integration tests in PHPStorm¶
This guideline is about how to configure PHPStorm to run unit & integration tests locally.
Requirements¶
- docker-compose (>= 1.21)
- docker (>= 18.06)
- PHPStorm (>= 2018.1)
Setup¶
- Enter settings: File → Settings → Build, Execution, Deployment → Docker

- File → Settings → Languages & Frameworks → PHP
- Configure CLI Interpreter

- Configure PHP settings

- File → Settings → Languages & Frameworks → PHP → Test Frameworks and then configure PHPUnit by adding Remote Interpreter

- Run/Debug Configuration

Now you are able to execute all tests via IDE using green Play
button or Run
menu.