forked from sebastianbergmann/phpunit
-
Notifications
You must be signed in to change notification settings - Fork 0
ChangeLog for PHPUnit 3.7
Sebastian Bergmann edited this page Jan 8, 2014
·
4 revisions
- Implemented #200: When using process-isolation don't die silently when unserializing the test result fails.
- Implemented #206: Added a
callbackconstraint that is useful for making complex assertions. - Implemented #207: Restore current working directory if is changed by a test case.
- Implemented #208: Added
--test-suffixthat allows specifying which filename suffixes are recognised by PHPUnit. - Implemented #295:
assertArrayHasKey()andassertArrayNotHasKey()now work with objects that implement ArrayAccess. - Implemented #333: Improved reporting when there are unused CLI arguments to avoid misconceptions.
- Implemented #377: Show messages and stracktraces in JSON output for skipped and incomplete tests.
- Implemented #424: Added
assertJson*functions that work like the existingassertXml*functions. - Implemented #492: PHPUnit now provides a
configuration.xsdschema file at http://schema.phpunit.de/configuration.xsd that can be used to validate yourphpunit.xmlandphpunit.xml.distconfiguration files. - Implemented #495: Added
--testsuiteargument, allowing to filter files/directory by parent testsuite name attribute. - Implemented #504: Expanded the
@requiresannotation to allow for checking the existence of functions and extensions using multiple@requires function namestatements. - Implemented #508 #86:
@expectedExceptionCodeand@expectedExceptionMessagecan now use constants likeClassname::CONSTas their parameters. They will get evaluated if the class constant exists and used for comparison so test authors can avoid duplication. - Implemented #512: Test listeners now trigger one autoload call instead of being silently ignored when the class was not loaded.
- Implemented #514: Failed
assertStringMatchesFormat()calls now produce a better readable diff by only marking lines as different that don't match the format specifiers. - Implemented #515: Added
assertContainsOnlyInstancesOf()to help checking Collection objects and arrays with a descriptive assertion. - Implemented #561: When an
@expectedExceptionfails it now shows the message of the thrown exception to ease debugging. - Implemented #586: Improved reporting of exceptions by printing out the previous exception names, messages and traces.
- The
@requiresannotation can now be used on the class DocBlock. Required versions can be overridden in the methods annotation, required functions and extensions will be merged. - Added
processUncoveredFilesFromWhitelistconfiguration setting. When enabled, uncovered whitelisted files are processed to properly calculate the number of executable lines. - Fixed #322 #320 thanks to #607: Commandline option now override group/exclude settings in
phpunit.xml - Fixed #440: Possible crash when using
--process-isolationwith PHP 5.3 anddetect_unicode=on. - Fixed #523:
assertAttributeEquals()now works with classes extending internal classes likeArrayIterator. - Fixed #581: Generating a diffs could add extra newlines in Windows.
- Fixed #636, #631: Using Selenium in combination with autoloaders that
die()or produce errors when a class cannot be found caused broken tests. - If no tests where executed, for example because of a
--filter, PHPUnit now prints a "No tests executed" warning instead of "OK (0 tests...)". - It is possible again to expect the generic
Exceptionclass. - Removed
addUncoveredFilesFromWhitelistconfiguration setting. - Removed deprecated
--skeleton-classand--skeleton-testswitches. The functionality is now provided by thephpunit-skelgencommand of thePHPUnit_SkeletonGeneratorpackage. - Removed deprecated
PHPUnit_Extensions_OutputTestCaseclass. - PHPUnit 3.7 is only supported on PHP 5.3.3 (or later) and PHP 5.4.7 (or later) is highly recommended.
- Implemented #47: Make cloning of arguments passed to mocked methods optional.
- Implemented #84:
getMockFromWsdl()now works with namespaces. - Fixed #90: Mocks with a fixed class name could only be created once.
- The HTML report has been redesigned.
- The new
@coversDefaultClassannotation enables short@coversannotations when working with long class names or namespaces. - The new
@coversNothingannotation can be used so tests do not record any code coverage. Useful for integration testing. - When
processUncoveredFilesFromWhitelist=FALSEis set then files that are whitelisted but not covered by a single test are now included in the code coverage but with all lines, including those that are not executable, counted as not executed. - PHP_CodeCoverage 1.2 is only supported on PHP 5.3.3 (or later) and PHP 5.4.7 (or later) is highly recommended.