PHPStom & PHPUnit - Require_once failed

Hi Community

I'm searching since hours for a solution of this problem.. I've installed PHPStorm 6.0.2 and PHPUnit through PEAR installer.
In the PHPUnit configuration tab i've selected from include path... (also tried with the phar possibility, same behaviour)

But i'm still getting this error:

/usr/bin/php /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php --no-configuration MachtnixTest /Volumes/Webserver/PHPStormRepo/MachtnixTest.php
Testing started at 12:22 ...


Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php on line 39


PHP Warning:  require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php on line 39




Call Stack:PHP Stack trace:
    0.0008     868744   1. {main}() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:0
PHP   1. {main}() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:0
    0.0008     868744   2. IDE_PHPUnit_Loader::init() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:204
PHP   2. IDE_PHPUnit_Loader::init() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:204
    0.0009     868744   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:198


PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:198




PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/lib/php/pear') in /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php on line 39
Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/lib/php/pear') in /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php on line 39
PHP Stack trace:


Call Stack:
PHP   1. {main}() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:0
    0.0008     868744   1. {main}() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:0
PHP   2. IDE_PHPUnit_Loader::init() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:204
    0.0008     868744   2. IDE_PHPUnit_Loader::init() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:204
PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:198
    0.0009     868744   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/7p/16x3w_ln5gl3p_hc30bqfllm0000gn/T/ide-phpunit.php:198




Process finished with exit code 255



Does anybody has an idea why it doesn't work?

Thank you!
2 comments
What folder did you install PEAR? Mine is in an external folder and I have the PEAR folder in my php.in include path, then I use a phpunit.xml file and a bootstrap file with:require_once "PHPUnit/Autoload.php";
0

Hi there,

It looks like PHP (yes, PHP itself) is unable to find your PHPUnit files.

1) What's your PHP and PHPUnit versions?

2) Where PHPUnit is installed on your Mac?

3) What is the full path to PHPUnit/Runner/Version.php file ? Is it there?

4) Make sure that this path is listed in include_path directive in your php.ini. To check this -- just write simple php file with a single line and try to execute it.

<?php
require_once "PHPUnit/Runner/Version.php";
echo PHPUnit_Runner_Version::VERSION;

If it works, then it's all set good. If not -- make sure that PHP is able to find your PHPUnit files

5) Make sure you are editing correct php.ini -- you may have more than one on your system. To see which one is loaded -- examine out put of phpinfo(); (or php --ini when executing from command line, e.g. from "Tools | Run Command" if you have "Command Line Tool Support" plugins installed)

6) Make sure that access permissions are fine for those files (when running from PhpStorm)

(also tried with the phar possibility, same behaviour)

Please show the output when using this option. AFAIK it should be different to what you see when using PEAR installation (the command; and maybe error messages format).

0

Please sign in to leave a comment.