phpStorm 5 and PHPUnit under Windows 7 not executing tests and exiting with code 255
Try as I might, I can't seem to get PHPUnit to work with phpStorm. I followed the installation instructions in the online help, and I can generate tests for my project. However, when I run them, PHPUnit exits with code 255 (whatever that means) and not much else happens. Even the "default" generated test that just should output the message that the test hasn't been implemented is not shown...
I'm attaching both the class and the test file (they are trivial).
The output from PHPUnit is:
C:\php\php.exe C:\Users\Andre\AppData\Local\Temp\ide-phpunit.php --no-configuration MyClassTest C:\Dev\waaf\MyClassTest.php
Testing started at 10:25 ...
PHPUnit 3.7.1 by Sebastian Bergmann.
Process finished with exit code 255
I'm new to PHPUnit, so I'm probably missing something really obvious about getting it to run... Any help would be much appreciated, I've googled around and tried to find more on this forum, but nothing seems to have helped.
Kind regards,
Andreas
Attachment(s):
MyClassTest.php.zip
MyClass.class.php.zip
Please sign in to leave a comment.
Hi Andreas,
1. Please check your php error.log -- it may contains clues.
2. Does it work for you if you execute the test with PHPUnit itself (command line; go to the folder where test file is (C:\Dev\waaf\) and execute "phpunit MyClassTest.php")? This, of course, assumes that phpunit command can be found by Windows (path to it should be in PATH environment variable or full path to phpunit.bat must be provided when executing the command).
3. Adding "include './MyClass.class.php';" line into the top of test file may also help (unless you are loading the class file(s) differently):
Thank you for the ultra-fast reply!
Your tip to include the file worked perfectly! :)