1

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)

screenshot

Any idea what's next?

1
  • 1
    1) PHPUnit support is part of the PHP support itself -- there is no separate plugin 2) PHPUnit is not found on your computer -- it has NOTHING to do with IDE -- PhpStorm does not come with it's own PHP or PHPUnit. Have you installed it or downloaded in any way (e.g. via Composer or as PHAR file)? Commented Aug 23, 2015 at 18:44

2 Answers 2

1

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

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.