Auto-detection of Testing Frameworks

Running your test suite through PhpStorm is useful and saves a lot of time. Unfortunately, configuring your test runner can be repetitive and painful – until now. PhpStorm 2016.3 can autodetect your autoloader from your Composer settings, saving you the task of entering it into the test settings over and over again.

For PhpStorm to detect these settings correctly, you’ll need to make sure that the paths to your Composer settings are configured (you’ll find them under Languages & Frameworks, PHP, Composer). PhpStorm will then automatically detect which test frameworks you are using, and set them accordingly.

2016-3-detect-1

PhpStorm has detected the fact that you use Composer to install PHPUnit, and you use PHPUnit in this project, and so has automatically configured your project to use the tool. It’s the little things that make you feel happy.

This also works for Behat, and the newly supported PHPSpec. Give it a try and then let us know if you like it.

— Gary and the PhpStorm Team

About Gary Hockin

Gary Hockin has been creating code to power web applications for 15 years, the last three of them at an extraordinary level. He is handsome, talented, funny and articulate, and also extremely modest. Gary is a valued contributor to Zend Framework 2 and is a member of the community review team. He's married and has two wonderful children, and when he's not coding, writing about code, speaking about code or reading about code, he can usually be found in the pub playing pool.
This entry was posted in Cool Feature. Bookmark the permalink.