O'Reilly logo

PHP Application Development with NetBeans Beginner's Guide by M A Hossain Tonu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing with PHPUnit

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.

Configuring PHPUnit

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required