Reputation: 111
When I run the debugger on PhpStorm I get:
/Applications/MAMP/bin/php/php5.6.10/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 /private/var/folders/b8/xt21vdh94pbc6ht731dh5k_h0000gn/T/ide-phpunit.php --no-configuration /Users/Amit/Web/WPML.beta Testing started at 9:04 PM ...
Process finished with exit code 1 Cannot find PHPUnit in include path (.:/Applications/MAMP/bin/php/php5.6.10/lib/php)
In the Settings I do not see the PHPUnit plugin (image attached)
Any idea what's next?
Upvotes: 1
Views: 656
Reputation: 4316
The documentation from phpstorm is missleading, as they just describe how to set up phpunit for new projects. If you try to add this to an existing project, it isn't working. phpunit is part of the mamp installation and can be found under /Applications/MAMP/Library/bin/phpunit.phar
Settings in PHPStorm:
For existing Projects:
PhpStorm -> Preferences -> Languages & Frameworks -> PHP -> PHPUnit
For new Projects:
File -> Default Settings... -> Languages & Frameworks -> PHP -> PHPUnit
Select Path to phpunit.phar Radiobutton Set Path to /Applications/MAMP/Library/bin/phpunit.phar
Click Apply to save changes
Upvotes: 1
Reputation: 72
You need to set the location of PHPUnit within the IDE. So in version 9.0.2 for example got to Preferences>Languages & Frameworks>PHP>PHPUnit
I fixed the problem by selecting the "Path to phpunit.phar" and specifying the path to where I have the executable located.
You can download it if need be from the PHPUnit site, and my version of PHPStorm prompts you to do this, supplying the direct URL.
Upvotes: 0