Features Releases

PHPUnit 6 and PhpStorm 2017.1

PhpStorm 2017.1 comes with support for the latest version of the market-leading unit testing framework – PHPUnit 6. There have been a few significant changes that needed us to tweak PhpStorm’s support for PHPUnit, and these will be available in 2017.1.

PHPUnit’s code is now namespaced, and PhpStorm understands that and provides the completion you would expect. We’ve also included a new file template for PHPUnit 6 unit tests which you can find in the settings under Editor | File and Code Templates | PHPUnit 6 Test.

phpunit-settings

To make it even easier, we’ve also added a new checkbox “Create Test in PHPUnit 6+ format”. So you can specify the test format directly during a test creation in the Create New PHPUnit Test window.

Phpunit6

It’s also worth noting that PHPUnit 6 dropped support for any of the PHP 5 branches, so if you’re not using PHP 7 yet, there really is no better time to upgrade.

– Gary and The PhpStorm Team

image description