Setup PHPUnit in PhpStorm for a Laravel Project
Setup PHPUnit in PhpStorm for a Laravel Project
March 26, 2023
1k ViewsShort Answer
- 🔍 From the Main Menu, go to:
File|Settings|PHP
- 🖱️ Click on the button with
...
the right hand side of theCLI Interpreter
input - ➕ Add a new PHP interpreter by clicking on the
+
icon - 🖱️ Choose
From Docker, Vagrant, VM, WSL, Remote...
- 🖱️ Select
Docker
with these values- Image name:
sail-8.2/app:latest
or equivalent - PHP Interpreter path:
php
- Image name:
- 🆗 Press
OK
three times to close all the dialogs. - 🔍 From the Main Menu, go to:
Run|Edit Configurations
- ➕ Add a new Configuration by clicking on the
+
icon - 🖱️ Select
PHPUnit
with these values- Test Runner:
Defined in the configuration file
- Command Line | Interpreter:
< Default project interpreter >
- Test Runner:
- 🆗 Press
OK
to close the dialog. - 🔍 From the Main Menu, to to:
Run|Run
then select the configuration to run