| PEAR Announce 2005-07-24, 8:39 pm |
| The new PEAR package PHPUnit2-2.3.0beta4 (beta) has been released at http://pear.php.net/.
Release notes
-------------
+ Added PHPUnit2_Framework_Assert::assertNotEqua
ls().
+ Added PHPUnit2_Framework_TestSuite::addTestFil
e() and PHPUnit2_Framework_TestSuite::addTestFil
es () as convenience methods that wrap PHPUnit2_Framework_TestSuite::addTest() and PHPUnit2_Framework_TestSuite::addTestSui
te(). Contribution by Stefano F. Rau
sch <stefano@rausch-e.net>.
+ Added BankAccount and Money samples.
* Made the mechanism provided by PHPUnit2_Extensions_TestSetup actually work.
* The PHPUnit2_Runner_StandardTestSuiteLoader now checks the test suite sourcefile for syntax errors before loading it. Before, a syntax error in the test suite sourcefile caused a termination of the TextUI test runner, for instance, without any error inf
ormation being printed. Please note that sourcefiles included by the test suite sourcefile are not checked. This will be done at a later time utilizing the sandboxed interpreter feature of the Runkit extension.
* PHPUnit2_Framework_TestResult::run() now saves the $GLOBALS array before and restores it after each test execution for better isolation.
* Code Coverage collection has been moved from PHPUnit2_Framework_TestCase to PHPUnit2_Framework_TestResult. This allows for Code Coverage analysis of tests that are written in a class that does not inherit from PHPUnit2_Framework_TestCase.
* Code Coverage information is no longer collected by default (when the Xdebug extension is available) but only when it is requested (by using the --coverage-* parameters with the TextUI TestRunner, for instance). PHPUnit2_Framework_TestResult::collectCo
d
eCoverageInformation(TRUE) has to be called to enable the collection of Code Coverage information.
* PHPUnit2_Framework_Assert::assertSame() and PHPUnit2_Framework_AssertNotSame() now work on non-objects and assert that two variables (do not) have the same type and value.
* PHPUnit2_Framework_Assert::assertType() and PHPUnit2_Framework_AssertNotType() now consider subclasses when used on objects.
* PHPUnit2_Util_Skeleton now generates stubs for the setUp() and tearDown() methods.
* PHPUnit2_Extensions_TestDox_NamePrettifi
er now removes digits from the end of test method names and PHPUnit2_Extensions_TestDox_ResultPrinte
r treats test methods like testBalanceCannotBecomeNegative() and testBalanceCannotBecomeNegative2() as one and pr
ints "Balance cannot become negative" only once.
* PHPUnit2 now uses the Standard PHP Library (SPL)'s specialized exceptions InvalidArgumentException and RuntimeException instead of the generic Exception exception class.
* PHPUnit2 now uses the Standard PHP Library (SPL)'s class loading functionality.
* Renamed Extensions_CodeCoverage_*, Extensions_Log_*, and Extensions_TestDox_* to Util_CodeCoverage_*, Util_Log_*, and Util_TestDox_* as the Extensions_* namespace is intended for extensions of the framework.
* PHPUnit2_Util_Printer no longer uses fopen/fputs/fclose to write to STDOUT.
* Implemented RFE #4456.
* Moved tests outside of installation directory.
! PHP 5.1.0 (or greater) is now required.
! If the code you test with PHPUnit2 uses __autoload you have to add spl_autoload_register('__autoload'); after the declaration of the __autoload method.
Package Info
-------------
PHPUnit is a regression testing framework used by the developer who implements unit tests in PHP. This is the version to be used with PHP 5.
Related Links
-------------
Package home: http://pear.php.net/package/PHPUnit2
Changelog: http://pear.php.net/package/PHPUnit...load/2.3.0beta4
Download: http://pear.php.net/get/PHPUnit2-2.3.0beta4.tgz
Authors
-------------
Sebastian Bergmann <sb@sebastian-bergmann.de> (lead)
|