Source code testing is essential in the test-driven development approach. Testing depicts the way to check whether the code behaves as expected or not, with a set of runnable code fragments. Unit testing tests the correctness of parts (units) of the software, whose runnable code-fragments are called Unit Tests. NetBeans IDE supports automated unit tests using PHPUnit and the Selenium test framework.
As we run XAMPP in the Windows box, it provides a built-in PHPUnit package. Note that if your project is running in PHP 5.3, then you should use PHPUnit 3.4.0 or newer. In our case, the latest XAMPP 1.7.7 (with PHP 5.3.8) stack has PHPUnit 2.3.6 installed inside it, which is not compatible with PHP 5.3. You also need to upgrade the existing PHP Extension and Application Repository (PEAR) installation to install the latest PHPUnit and required PEAR packages as well.
To check the version of the installed PEAR, PHP, and Zend engine, browse to the PHP installation...