PHPUnit 3.0 new Features
PHPUnit 3.0 introduces a series of new features to make it easier for users to debug and makes the 3 version richer than any previous version.
Pseudo Object debugging
How can you test that the method inside an object is run correctly when it is invoked by another method? How can you ignore external resources and debug alone? Pseudo objects and local tests can solve these problems for you. Part provides answers to these and other questions.
Integration of Selenium components
The PHPUnit 3 is a selenium RC component to provide better debugging (a higher level of platform testing to replace the independent testing of system single modules) and browser compatibility testing (testing Web applications in different operating systems and browsers).
Code Coverage Analysis
How to evaluate your test? How do you find code that hasn't been tested, or in other words, code that hasn't been involved? How do you measure the integrity of code testing? All of these issues can be addressed by functional components called Code Coverage Analysis. A new feature of PHPUnit 3 is to provide more detailed code coverage details for the test.
PHPUnit installation should be implemented with Pear's installer
PHPUnit is usually published through the pear station and needs to be registered with the local pear, pear Station to view the address: pear.phpunit.de. In the previous case, the current Peae installer can be installed directly through the PHPUnit station: Pear installation Phpunit/phpunit
The PHPUnit and PHPUnit2 packages that were downloaded earlier from pear.php.net need to be uninstalled first because PHPUnit is no longer included in pear now.
How to upgrade from PHPUnit 2.3 to 3.0
PHPUNIT3 forward compatible with PHPUnit2.3. Note that the prefix of the names of the 2.0 to 2.3 versions of PHPUnit is phpunit2_ rather than phpunit_. The current test system is still available in the PHPUnit3.0 version, but it is recommended to use the name of the new class.
About PHPUnit
Over the past decade, PHP has evolved into a dynamic scripting language that is capable of a small web site to a large web operating platform. Current important business logic can also be implemented in PHP. But how do you make sure the code is running stable? Of course, you need a good tool at this time, which is why PHPUnit appears. It is a member of the Xunit family that is used to test the code framework and make the tests easier and functional analysis easier.
About Sebastian Bergmann
Sebastian Bergmann has long been committed to the development of numerous PHP application projects, including the PHP project itself. He is currently in Skien's EZ Systems as work, and is responsible for the EZ Platform System's management components. As a PHPUnit developer, he also helped test many of the EZ system's components. In his spare time, he likes to study open source software and photography, and likes to travel.