Setting Up and Using PHPUnit

PhPUnit

In the last decade, PHP has developed from a niche language for adding dynamic functionality to small websites to a powerful tool making strong inroads into large-scale, business-critical Web systems. Financial institutions such as banks and insurance companies use PHP, for instance, to develop and maintain solutions for Basel II Credit Rating. Critical business logic like this needs to work correctly. To make code testing viable, good tool support is needed. This is where PHPUnit comes into play. It provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results. But how do you ensure that it does? You test it, of course. For further information about [PhPUnit].

Installing PhPUnit

In order to have PhPUnit fully operating on your computer system Pear, Pear is the backbone of running PhPunit since first being intergrated into PHP.

Instructions to installing PhPUnit can be easily found at Installing PhPUnit:



Hack if your dont have pear installed: Download pear if not installed on your computer Then you can download the lastest tgz file of PhPUnit: