Page 1 of 1

XAMPP PHPUnit runtime prorblems

PostPosted: 10. June 2013 22:59
by TheGreyWolf
Hi there!

I am looking for a bit of help, and hoping that some of you out there might be able to do so.
I've recently downloaded XAMPP 1.8.1-0 VC9, and while everything is running fine, I am finding myself having problems running PHPUnit.

Shortly put, I am getting errors stating that the following...

["PS C:\> phpunit
Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in F:\WebServer\xam
pp-win32-1.8.1\php\phpunit on line 38
Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.;F:\WebServer\xampp-w
in32-1.8.1\php\PEAR') in F:\WebServer\xampp-win32-1.8.1\php\phpunit on line 38
PS C:\>"]

I am running Windows 8 64bit, I've set up xampp on partition F:\. I have set up ZendFramework 1.12.3, my IDE is NetBeans 7.3 and PHPUnit isn't working in NetBeans either, so I am lead to assume that it is a general issue with PHPUnit packaged with xampp 1.8.1

Is anyone out there having any thoughts, perhaps solutions how to correct this? I am in dire need of PHPUnit for a website project that I have to engage with soon, so any help would be greatly appreciated!

Re: XAMPP PHPUnit runtime prorblems

PostPosted: 11. June 2013 01:18
by hackattack142

Yes, the packaged version appears to be incomplete/broken but I was able to fix it fairly quickly.

Open up the XAMPP Shell (from inside the XAMPP Control Panel) and run the following series of commands:
Code: Select all
pear update-channels
pear config-set auto_discover 1
pear channel-discover
pear install phpunit/PHPUnit

The phpunit.bat appeared to work after this completed.

Re: XAMPP PHPUnit runtime prorblems

PostPosted: 11. June 2013 16:49
by TheGreyWolf
My compliments to you, hackattack142,

thank you so ever much for your help; it worked! :-)