Problem
I ran into a few things while trying to install PHPUnit.I read this article and then I also did some research on YouTube and SO, but didn't find anyone who resolved my issue.
https://phpunit.de/manual/current/en/installation.html
I am running PHP via my Bitnami application.
Solution
Here's how I resolved my issue.First, I needed to add the PHP executable into my Windows PATH.
To be clear, I added a new PATH variable pointing to my PHP.exe file and then added this variable into my PATH:
PHP_HOME: C:\Bitnami\wampstack-5.5.29-1\php
Path: ...;%PHP_HOME%
Next, I added the PHPUnit executable into my Windows PATH. However, I did create the command script as instructed in the PHPUnit webpage (mentioned above). Notice, I created the "bin" folder as "phpunit" and placed within my Bitnami application folder.
PHPUNIT_HOME: C:\Bitnami\wampstack-5.5.29-1\phpunit\bin
Path: ...;%PHP_HOME%;%PHPUNIT_HOME%
Then, I was able to continue with the instructions per the PHPUnit Installation webpage. I ran into this error, but that's ok since I only need to update the latest PHAR file from PHPUnit.
*Note: Be sure to open a new CLI each time you update the PATH.
I'm not going to update my PHP version because I'm not sure what the effects will be on my application which I'm going to use unit tests for. I'd rather get a working PHAR first and then I'll update my PHP version and begin fixing any upgrade issues. So, I'm using PHPUnit 4.8.23 instead of current stable release version of 5.2.10.
Excellent, this message reflects the one on the PHPUnit webpage! Now I can move forward with the tutorials and creating unit tests - hip hop hoorayyyy!
No comments:
Post a Comment