0

I'm trying to set up my project with PHPUnit. I tried to configure PHPUnit with my project on PhpStorm following steps explained on this article.

http://blog.jetbrains.com/webide/2013/03/phpunit-installation-via-composer-in-phpstorm/

But when I try to run tests I continuously getting following error.

Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in C:\Users\win 8\AppData\Local\Temp\ide-phpunit.php on line 49

Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.;C:\wamp\bin\php\php5.6.19\pear') in C:\Users\win 8\AppData\Local\Temp\ide-phpunit.php on line 49

Process finished with exit code 255

I tried setting up number of new projects and in all the cases I get this stupid error. I don't know how to fix this. Please, your help is highly appreciated.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Ajith
  • 639
  • 6
  • 21
  • 1
    1) Post screenshots of how you did configure it 2) PHPUnit version used? 3) PhpStorm version? 4) https://confluence.jetbrains.com/display/PhpStorm/Testing+PHP+Applications (just in case) – LazyOne May 16 '16 at 14:50

2 Answers2

0

It seems that you are using PHPUnit through your IDE, and that the IDE has not provided PHPUnit with the correct include path items.

To understand about include path, and what is happening in your problem, see this post, part on inclusions by relative or absolute path and the include path.

To solve your problem, you will need to change a setting in your IDE, either to include the PHPUnit library in the general include path of running PHP, or in the include path of running PHPUnit.

Community
  • 1
  • 1
Vic Seedoubleyew
  • 9,888
  • 6
  • 55
  • 76
0

It was version mis-match. I tried to integrate PHPUnit 5.3+ with PHPstorm 8.+ version. When I try PHPUnit 5.3+ with PHPStorm 2016.1 it worked as a charm.

Ajith
  • 639
  • 6
  • 21