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
2 comments
Comment actions Permalink

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):

<?php

include './MyClass.class.php'; // assumes that these 2 files (class and test file) are in the same folder


/**
* Generated by PHPUnit_SkeletonGenerator on 2012-09-28 at 10:24:03.
*/
class MyClassTest extends PHPUnit_Framework_TestCase
{

...

0
Comment actions Permalink

Thank you for the ultra-fast reply!

Your tip to include the file worked perfectly! :)

0

Please sign in to leave a comment.