PHPUnit 3.0
Sebastian Bergmann and his contributors are proud to announce the immediate availability of PHPUnit 3. This release is a major improvement to the popular open source testing solution for PHP applications. It includes new features and bug fixes. Further details about this release can be found in the ChangeLog.
New Features
PHPUnit 3 introduces a number of new features that make it easier to use and more versatile than previous versions.
The PEAR channel (
Upgrading from PHPUnit 2.3
PHPUnit 3 is backwards compatible with PHPUnit 2.3.
Please note that in PHPUnit versions 2.0-2.3 the class names were prefixed with
Documentation
The PHPUnit Pocket Guide has been updated for PHPUnit 3 (English, Japanese).
Please note that documenting PHPUnit is an ongoing effort. You can expect additions and improvements to the PHPUnit Pocket Guide in the future.
New Features
PHPUnit 3 introduces a number of new features that make it easier to use and more versatile than previous versions.
- Mock Objects
How can you test that a method works correctly when it is called from another method? How can you isolate your tests from external influences? Mock Objects and Stubs provide the answer to these and other questions. - Selenium Integration
PHPUnit 3 integrates with Selenium RC to support both acceptance testing (by performing higher-level tests on the integrated system instead of just testing each unit of the system independently) and browser compatibility testing (by testing the web application on different operating systems and browsers). - Code-Coverage
How do you test your tests? How do you find code that is not yet tested -- or, in other words, not yet covered by a test? How do you measure testing completeness? All these questions are answered by a practice called Code-Coverage Analysis. PHPUnit 3 features an improved report generator that provides detailed code-coverage information for tests run.
The PEAR channel (
pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment:pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
pear.php.net channel have to be uninstalled since PHPUnit is no longer hosted on PEAR.Upgrading from PHPUnit 2.3
PHPUnit 3 is backwards compatible with PHPUnit 2.3.
Please note that in PHPUnit versions 2.0-2.3 the class names were prefixed with
PHPUnit2_ instead of PHPUnit_. Existing test cases will still work with PHPUnit version 3.0, but it is highly recommended to update them to use the new class names.Documentation
The PHPUnit Pocket Guide has been updated for PHPUnit 3 (English, Japanese).
Please note that documenting PHPUnit is an ongoing effort. You can expect additions and improvements to the PHPUnit Pocket Guide in the future.
21/11/2006 at 20:34 Permalink
Reply
21/11/2006 at 20:53 Permalink
Reply
31/07/2007 at 20:10 Permalink
Simple Test has the ability to test from the browser, but I don't like that testing framework.
Good work by the way; Lets see some more ;)
Reply
23/05/2007 at 14:47 Permalink
http://www.devshed.com/c/a/PHP/Unit-Testing-in-Detail/
The gist of it is:
Make a test suite object and pass it to:
PHPUnit_TextUI_TestRunner::run($suite);
Enclose the output in 'pre' tags and it will look just like the command line.
http://www.blooberry.com/indexdot/html/tagpages/p/pre.htm
Nothing fancy here.
Reply
12/01/2007 at 15:11 Permalink
Thanks,
Reply
26/03/2007 at 19:12 Permalink
Reply