- Go to
File -> Settings -> PHP -> PHPUNIT.
- Select Use custom loader and then enter the autoload.php file from your projects vendor directory. This autoloader will autoload all the dependencies managed by Composer (including PHPUnit).
- Specify the default configuration file (this is usually phpunit.xml.dist from your project's app directory).
@aderuwe's answer works but that config isn't scoped per project, it's for all projects. Since PHPStorm 6 (actually even EAP version PS-126.260) you can do the following:
Go to File -> Settings -> PHP -> PHPUNIT. Select Use custom loader and then enter the autoload.php file from your projects vendor directory. This autoloader will autoload all the dependencies managed by Composer (including PHPUnit).