So I want to get PHUnit up so I can run selenium server, but I’ve come to that sad realization that this will likely never happen for me. I have tried it with numerous different versions of WAMP and XAMPP (which I don’t think is my problem) but I always end up hitting a wall where either one of two things happens:
-
A package cannot be found ie: “No releases available for package “pear.phpunit.de/File_Iterator” install failed”, and I do have all of the proper channels discovered.
-
I get through the install (one way of another) and I end up with a error like “Fatal error: ‘PHPUnit_Runner_BaseTestRunner’ not found in C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php on line 60” – swap ‘PHPUnit_Runner_BaseTestRunner’ for any other file that should be included.
I’m incredibility frustrated because of the lack of consistency across the board with not only PHPUnit but pear as well. It seems like I have to run through 50 steps, wait for the planets to align and rotate in my chair a dozen times – clockwise…
Sorry for the rant – my question:
Is there a simple, straight forward tutorial for doing this, that you guys have had success with? Or perhaps is there a tut + zip somewhere that I can use to just bypass the pear install and just copy over the files? – because it seems like that is all pear is doing anyways. Any type of server (Wamp, Xampp, etc) and version is fine – I’ll perform a fresh install and I don’t need to run anything else on that machine so all i want is to get this working.
Edit:
So I’ve manually went through all of the files and added require_once()’s everywhere that it appeared that they were needed. Then I downloaded the remaining files from http://pear.phpunit.de/ and place them in there required locations. No Errors! But now when I run ‘c:\xampp\php > phpunit’, nothing happens! I just get another command line – this also happens when I try to run something like, ‘c:\xampp\php > phpunit test1’, even though I’m not sure exactly where I need to be storing the test1.php file…
Edit 2:
I’m pretty sure something is wrong with the .bat file for phpunit because when I try to run any command (ie: phpunit –help, –version, etc.) nothing happens, I just get another command line. Should i delete the .bat file and the phpunit folder and try again? I also think that there is a firewall issue because I’m able to run the same command on a different machine that isn’t apart of my company’s domain.
This can have several reasons:
You need to update the channel information
$ pear channel-update pear.phpunit.deYour network connection has problems, i.e. firewall doesn’t allow it or you need to setup the proxy.
To debug it, try a
If that works, you can install it.
Otherwise, try to force it:
if that still does not work, visit http://pear.phpunit.de and download the package manually.
install it with