A Path Less Taken

Breaking with convention in a very conventional fashion. Powered by WordPress

"What would you attempt to do if you knew you could not fail?"
Dr. Robert Schuller

Sunday, May 24, 2009

Category: PHP Development Author: JJ 0 Comments

Yes, I wanted to do it manually. I wanted to make sure that the parts and pieces were where I wanted them to be. Really, I wanted to make sure that I could replicate the setup on my Flash Drive development environment. I took Sebastian Bergmann’s directions, with a minor modification, and got it to work. Here is what I did.

First I downloaded the PHP source files from Sebastian’s site. You can find them at http://pear.phpunit.de/get/.

Next I went to the PHPUnit Manual and followed the directions for manually installing it. You can find those at http://www.phpunit.de/manual/current/en/installation.html. I copied the PHPUnit folder under my PHP\PEAR\ folder. I copied the phpunit.php and phpunit.bat to my library folder under my apache directory. I updated my php.ini file in my c:\windows\ folder (this is Vista after all) and added c:\php\pear to my include path. Lastly, I did not follow step 3 of the directions because in the version that I was using there was no @php_bin@ in that file to modify.

After I was done I created a simple test file by copying the array test form the documentation. Then I ran the command “phpunit test\ArrayTest” and it worked! Note that I had to qualify the test directory as it was not part of my include path for PHP.

That’s all there was to it. Now comes the really hard part. I have to practice writing unit tests. Ugh! Wish me luck!

No comments found. Please enter a comment if you have a question or contribution.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">