Phpstorm & phpunit

I created a phpunit test file, when I try to run it through phpstorm, I get a message:

Unable to attach test reporter to test framework or test framework quit unexpectedly 

The following command seems to be executing:

  /usr/local/bin/php /private/var/folders/4b/qrnw7nbd6llgmhrss5rf1_880000gt/T/ide-phpunit.php --configuration /Users/Shared/sites/pac/app/app/phpunit.xml.dist BackendControllerTest /Users/Shared/sites/pac/app/modules/Pac/Backend/Tests/Controller/BackendControllerTest.php Testing started at 23:22 ... Process finished with exit code 0 

when I execute this through the command line, I get a lot more output

 PHPUnit 3.6.11 by Sebastian Bergmann. ...etc... FAILURES! Tests: 2, Assertions: 2, Failures: 1. 

It seems phpunit is not running in phpstorm? shouldn't there be some kind of error message instead of terminating with exit code 0? The paths to php and phpunit (identical) in the phpstorms configuration should be in order (both are installed via homebrew in / usr / local / bin, the path is added to phpstorm)

osx 10.7.4 php 5.3.14 PHPUnit 3.6.11

Thanks for helping me! Matthias

+4
source share
3 answers

The environment variables of Mac OS X, available in the terminal and for ordinary applications, may be different, check the corresponding question for a solution, how to make them similar.

Please note that this solution will not work on Mountain Lion (10.8).

+4
source

Are you editing include_path in php.ini?

I have a simillar situation for you. After I added the path to turn on the pear, it works.

Look at this.

0
source

On MacOSX, I struggled with the simialair problem for quite some time.

The reason in my case turned out to be for a PHP update to a script that messed up with some permissions.

What I've done:

  • Make sure that I had the right to read and execute my own account in pear bin_dir and php_dir
  • Make sure php_dir is in include_path

To find these directories, you can release

 # pear config-show 

(Look for bin_dir and php_dir)

This meant that I would execute the commands:

 # (sudo) chmod -R 755 <bin_dir> # (sudo) chmod -R 755 <php_dir> 

More coding - less IDE-config!

0
source

All Articles