This is the list of changes for the PHPUnit 3.5 release series.
- Fixed GH-71:
PHPUnit_Framework_TestSuite::addTestFile()has problems identifying the correct test suite. - Fixed GH-120: Printer class does not handle "file does not exist" problems correctly.
- Fixed GH-125: Work around PHP bug #47987.
- Fixed GH-17: Process Isolation breaks for global objects that implement the
Serializableinterface. - Fixed GH-64:
./added to path to test when using PHPUnit on Windows terminal. - Fixed GH-104: Bootstrap must be relative to the current directory.
- Fixed GH-84: If no assertions are made the code should not be marked as covered.
- Fixed GH-115: Make most of the attributes in
PHPUnit_Framework_TestCaseprivate.
- Implemented GH-103: Improved handling of deprecated PHPUnit features.
- Fixed GH-100:
assertSame()does not give useful output on misordered arrays. - Fixed GH-105: Backup of static attributes causes memory exhaustion.
- The TextUI test runner now prints the normal progress output in verbose mode.
- Fixed GH-87: Fatal error when calling
isPublic()on dynamically created variable. - Properly marked
assertType()andassertNotType()as well asassertAttributeType()andassertAttributeNotType()as deprecated. These assertions will removed in PHPUnit 3.6 and should no longer be used.assertInternalType()should be used for asserting internal types such asintegerorstringwhereasassertInstanceOf()should be used for asserting that an object is an instance of a specified class or interface.
- Added support for
getMockForAbstractClass()to the mock builder API.
- Added a ticket listener that interacts with the Trac issue API.
- Added support for
E_USER_NOTICEandE_USER_WARNINGtoPHPUnit_Framework_Error_NoticeandPHPUnit_Framework_Error_Warning, respectively. - Refactored test dependency handling (required for a bugfix in
PHPUnit_Selenium). - Fixed
--stop-on-failure.
- Fixed GH-13: Result XML inconsistent when data provider returns empty array or does not exist.
- Fixed the skeleton generator for tested classes.
- Strict mode is now compatible with process isolation.
- Worked around http://bugs.php.net/bug.php?id=52911 to make process isolation work on Windows.
- Tests that are incomplete or skipped no longer yield code coverage in strict mode.
- Fixed GH-34: Bogus bootstrap file raises cryptic error.
- Fixed GH-30:
--repeatoption does not work. - Fixed GH-47: Failure message ignored in
assertSelectCount(). - Fixed GH-48: Remove strict incomplete duplication.
- 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.