PHPUnit Problems When Installing phpUnderControl On Windows
h开发者_运维知识库aving problems here getting phpUnderControl running on my Windows 7 machine, been searching all over the net for answers but documentation to many of the problems is just really bad...
(a.) Cruise Control is installed as a Windows service and up & running
--> location: C:\Program Files (x86)\CruiseControl
(b.) phpUnderControl is installed via Pear
--> Pear location is C:\wamp\bin\php\PEAR
(c.) Configured CruiseControl for phpUnderControl
phpuc install "C:\Program Files (x86)\CruiseControl"
(d.) now when I try to create the phpUnderControl example via: phpuc example "C:\Program Files (x86)\CruiseControl"
I get the following error message: Missing cli tool 'phpunit', check the PATH variable
Here's what I tried to solve this problem:
(1.) I included the path to the pear PHPUnit installation in the Windows SYSTEM path variable.
--> did not help
(2.) I thought maybe phpUnit was not properly installed, so I ran:
pear install -alldeps phpunit/PHPUnit
which gave me this error: Console_Getopt: unrecognized option -- d
I tried to re-install Console_Getopt but it is correctly installed and the current version
Can anybody help me with this ?
I don't see any way to specify allowed options for Console_Getopt and I don't even know which php script it is running to set -- d as an allowed argument...
Btw, when I run the phpUnderControl example with the -n flag (no PHPUnit support), it is working, so there is a problem with PHPUnit.
This is in response to your comment, but it will be too long to put into a comment. It doesn't answer your original question.
We started with phpUnderControl a year ago. The biggest problem is that it merges files into Cruise Control which makes updating either difficult. And we had to fix a lot of the stylesheets for our setup which would make updating even worse. This worked well enough for the past year, though there were still bugs we didn't take time to fix. The most annoying is that when you clicked on a test failure on the summary page, it wouldn't take you to the correct failure on the long list of all tests.
Anyway, I finally had enough and pushed to be given the time to migrate to Jenkins. Luckily, Manuel Pichler (PHPMD, phpUnderControl) and Sebastian Bergmann (PHPUnit) had created Template for Jenkins Jobs for PHP Projects. I was able to use my highly customized Ant script from phpuc with a few modifications with Jenkins.
It works very well. The coolest part is that it tracks the detailed results from build to build, so you can see when a test started failing and for how long. It's just really awesome. :)
I believe you mistyped the command. Try:
pear install --alldeps phpunit/PHPUnit
I solved my original problem:
I had to clear my pear cache and then run the install command again to re-install PHPUnit.
Also, it is important to either set a Windows environment variable called PHPBIN (--> /path/to/php) or to make sure the pear configuration PHP settings are correct...
--> pear config-show
Otherwise (some) packages will install and HARDCODE an incorrect php bin path into the .bat file, and if it doesn't find the PHPBIN variable it will use that... and therefore not work...
Another way to deal with this is to configure pear settings correctly and then force re-install the package, e.g.:
pear install -f --alldeps
- M
精彩评论