This is the list of changes for the PHPUnit 3.5 release series.
- Fixed GH-30:
--repeatoption does not work.
- Implemented TRAC-834: Refactor collection, processing, and rendering of code coverage information using the PHP_CodeCoverage component.
- Implemented TRAC-948: Add D-BUS test listener.
- Implemented TRAC-967: Only populate whitelist when code coverage is used.
- Implemented TRAC-985: Sort arrays before diff.
- Implemented TRAC-1033: Supplement commandline option
--stop-on-errorand friends. - Implemented TRAC-1038: Add
assertInstanceOf(),assertAttributeInstanceOf(),assertNotInstanceOf(), andassertAttributeNotInstanceOf()as well asassertInternalType(),assertAttributeInternalType(),assertNotInternalType(), andassertAttributeNotInternalType(). - Implemented TRAC-1039: Added support for
regexpi:matcher to Selenium RC driver. - Implemented TRAC-1078: Added support for setting superglobals via the XML configuration file.
- Added support for mocking/stubbing of static methods. This requires PHP 5.3 and late static binding.
- Added
assertStringMatchesFormat()andassertStringNotMatchesFormat()as well asassertStringMatchesFormatFile()andassertStringNotMatchesFormatFile()forEXPECTF-like (run-tests.php) format string matching. - Added
assertEmpty()andassertNotEmpty()as well asassertAttributeEmpty()andassertAttributeNotEmpty(). - Added the
@expectedExceptionCodeand@expectedExceptionMessageannotations. - Added support for the XML format of mysqldump to the database extension.
- Added the
<includePath>element to the<php>section of the XML configuration file. - Added the
verboseattribute to the<phpunit>element of the XML configuration file. - Added a ticket listener that interacts with the GitHub issue API.
- Added a ticket listener that interacts with the GoogleCode issue API.
- Added a test listener that uses XHProf to profile the tested code.
- Added the
--strictswitch to mark tests that perform no assertions as incomplete. - The paths in the XML configuration file can now be relative to the directory that contains the XML configuration file.
- The
@authorannotation is now an alias for@groupallowing to filter tests based on their authors. - The
PHPUnit_Extensions_SeleniumTestCase::$autoStopflag has been removed, please start Selenium RC with-browserSessionReuseinstead. - The
--log-metricsand--log-pmdswitches have been removed. Their functionality has been or will be merged into PHP_Depend and PHPMD. Details can be found here. - The
--ansiswitch has been removed, please use--colorsinstead. - The
--coverage-sourceswitch has been removed. - The
--coverage-xmlswitch has been removed, please use--coverage-cloverinstead. - The
--log-graphvizswitch has been removed. - The
--log-xmlswitch has been removed, please use--log-junitinstead. - The
--reportswitch has been removed, please use--coverage-htmlinstead. - The
--skeletonswitch has been removed, please use--skeleton-testinstead. - The
TestListenerimplementation that logs to PEAR::Log sinks has been removed. - The test database functionality has been removed.
- The shared fixture functionality has been removed.
PHPUnit_Extensions_PerformanceTestCasehas been removed.PHPUnit_Extensions_TicketListener_Trachas been removed.- The
PHPUnit_Extensions_Story_TestCasefunctionality has been deprecated. - Replaced
PHPUnit_Framework_MockObjectwith the PHPUnit_MockObject component. - Replaced
PHPUnit_Extensions_Database_TestCasewith the DbUnit component. - Replaced
PHPUnit_Extensions_SeleniumTestCasewith the PHPUnit_Selenium component. - Replaced
PHPUnit_Util_FilterIteratorwith the PHP_FileIterator component. - Replaced
PHPUnit_Util_Templatewith the Text_Template component. - Replaced
PHPUnit_Util_Timerwith the PHP_Timer component. - Fixed TRAC-1068:
assertSame()on two floats does not print the error message. - Fixed GH-7: Code paths that create a
PHPUnit_Framework_Warningend up serializing/unserializing globals unconditionally. - PHPUnit now requires PHP 5.2.7 (or later) but PHP 5.3.3 (or later) is highly recommended.
- PHPUnit now uses an autoloader to load its classes. If the tested code requires an autoloader, use
spl_autoload_register()to register it. PHPUnit/Framework.phpshould no longer be included by test code. If needed, includePHPUnit/Autoload.phpto make PHPUnit's autoloader available.