Can't run a single phpunit test any more
Until a week or so ago, I used to be able to run a specific individual test within a test class, by right-clicking on the test in PhpStorm. Now it runs the whole test class.
This may coincide with upgrading to v10.0.3, though it could also be a configuration issue - I lost most of my PhpStorm settings after a crash, and had to reconfigure some of them.
It creates a configuration referring to the single test and I can see from the command line that it is passing in the test name.
Any suggestions?
Please sign in to leave a comment.
Hi,
When you right click on test and select Run `TestClass.TestMethod`, it automatically creates new Run configuration for testing this particular method. Please check if there are any already existing run configurations for test methods - maybe they were changed?
Thanks for your reply. I think the problem was that in my settings crash I lost the setting I had in Languages & Frameworks => PHP -> PHPUnit to use a custom autoloader. This was causing exceptions in some scripts, which resulted in me not getting code coverage reliably. Once I fixed this, it also seemed to fix the problem with running a single script.