gog's info

<?php echo array_rand(array('web', 'dev', 'computers')); ?>

Archive for the ‘unit testing’ tag

Hudson and PHP Howto

with one comment

After a couple of weeks of playing with phpUnderControl and reading some nice reviews of Hudson I decided to give it a try. And boy am I glad I did.

Hudson definitively won me over with its clean interface and easy to setup tasks. Even plugin installation is a breeze and you can even do it right out of the comfort of your browser.

I found a quite nice tutorial about setting up Hudson with PHP here but I had some questions marks hovering over my head during the installation so I have decided to write a more detailed installation tutorial.

If you are running a Debian flavored distribution (yes I mean Ubuntu) take a look at the tutorial, you should have Hudson working with your PHP projects in no time.

Bonus points if you integrate your Hudson installation to act as your staging server.

Written by Goran Jurić

November 6th, 2009 at 8:53 pm

Install phpUnit on Mac OSX 10.6

without comments

Here is another quick How-to so I don’t have to look it up next time.

Open up Terminal.app and enter “sudo su” and enter your password when asked (I guess you must be using an account with administrator privileges).

pear upgrade PEAR
pear channel-discover pear.phpunit.de
pear install –alldeps phpunit/PHPUnit

That’s it. phpunit binary should be in your path now.

p.s.

For some reason phpUnit that is being used by Zend Studios (6.1) does not have mbstring extension compiled and that makes it unusable for me. I guess there is a way to force PHP interpreter that is being used in the Zend Studio to run with the mbstring extension, but this is a faster approach. Hudson or phpUnderControl (whichever you like) will take care of the code coverage reports.

Written by Goran Jurić

November 2nd, 2009 at 5:08 pm

Posted in PHP

Tagged with , , ,