Reputation: 4583
When I run PHPUnit from IntelliJ it seems to fall back to the PHPUnit that's installed as a pear package from my XAMPP install.
I'm not using XAMPP for this project, but I am using Composer and I dev-required the phpunit package, but the generated php file from IntelliJ doesn't seem to use that.
How can I tell IntelliJ to use PHPUnit from my vendor folder? And prevent the errors that are in the old version of pear's package.
My phpunit.xml file already contains <phpunit bootstrap="./vendor/autoload.php">
Upvotes: 0
Views: 148
Reputation: 1742
In PhpStorm (which is based on IntelliJ), you can edit this in project settings. Go to menu File -> Settings -> Project Settings -> PHP -> PHPUnit
There you need to switch to "Use custom autoloader" and put full path to your PHPUnit binary into the "Path to script" input.
Upvotes: 1