PHPUnit support enhancements
PhpStorm 2017.3 brings you several minor enhancements, allowing for more effective work with unit tests.
The new Undefined PHPUnit data provider inspection detects a method that you’ve specified via the @dataProvider annotation but have not declared in unit tests yet. You can quickly create the missing method by applying the suggested Create data provider quick-fix:
With the data provider method in place, you can fill it with the test data and run the test as usual:
If some of your tests fail, which does happen from time to time, your only option in earlier PhpStorm versions was to re-run all of them together again. It indeed wasn’t very effective. With PhpStorm 2017.3 this process has been made easier, as you can run a test on a single data set.
Just select a test in the list, and re-run it:
Stay tuned for more updates and be sure to check out our series of videos on testing with PhpStorm!
Your JetBrains PhpStorm Team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!