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 Interpreterinput - ➕ Add a new PHP interpreter by clicking on the
+icon - 🖱️ Choose
From Docker, Vagrant, VM, WSL, Remote... - 🖱️ Select
Dockerwith these values- Image name:
sail-8.2/app:latestor equivalent - PHP Interpreter path:
php
- Image name:
- 🆗 Press
OKthree 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
PHPUnitwith these values- Test Runner:
Defined in the configuration file - Command Line | Interpreter:
< Default project interpreter >
- Test Runner:
- 🆗 Press
OKto close the dialog. - 🔍 From the Main Menu, to to:
Run|Runthen select the configuration to run

PHP Interpreter

Run Configuration
