I can\'t make PHPUnit 4.2.6 to work with PHPStorm 8.
PHPUnit is loaded as phar inside PHPStorm 8 settings.
Whenever i try t
Here is how to "unhack" the IDE to run with phpnunit.phar (4x+) nicely on windows and linux!
:\Program Files (x86)\JetBrains\PhpStorm 8.0.3\plugins\php\lib
.scripts/phpunit.php
.PHPUnit/…
require statements, so autoloader can do its job instead of using hardcoded values.public static function init()
method.Hope this helps some of you out there. I will post the information to their forums as well.
I got the exact same error, and fixed it like this:
Installed phpunit using: composer global require phpunit/phpunit
Goto phpstorm settings: PHPUnit
Select "Use custom autoloader"
C:\Users\[username]\AppData\Roaming\Composer\vendor\autoload.php
/home/[username]/.composer/vendor/autoload.php
PhpStorm generates special temporary "wrapping" to execute the tests and get the output in the form it understands better. In your case it's /private/var/folders/qh/xjz1kr297v34pl6zy70_2rl00000gn/T/ide-phpunit.php
. Since the error says there is a syntax error, the first thing you should try is deleting it, on the next run the IDE will create the new one, hopefully without that problem.
If that doesn't help, as suggested in the comments, try downgrading the PHPUnit a few versions back, see if that helps. Alternatively try reinstalling the PhpStorm. If that doesn't work, you have better chances of finding an answer by reporting an issue to the dev team.