What is Unit Testing?
Unit Testing is a method of developing test suites to your scripts work correctly. It consists of developing large quantities of focused test cases.

PEAR provides the PHPUnit class, a framework which is extremely useful for developing test suites for your PHP applications.