-
Notifications
You must be signed in to change notification settings - Fork 0
Release Announcement for PHPUnit 5.4.0
The PHPUnit development team announces the immediate availability of PHPUnit 5.4.0. This release adds new features and fixes bugs. A detailed list of changes is available here.
- The
PHPUnit\Framework\TestCase::createMock()method was added for creating a test double. The creation of this test double is performed using best practice defaults (it is not possible to create a mock for a class or interface that does not exist, the__construct()and__clone()methods of the original class are not executed and the arguments passed to a method of the test double will not be cloned). If these defaults are not what you need then you can use thegetMockBuilder()method to customize the test double generation using a fluent interface. - The configuration option
registerMockObjectsFromTestArgumentsRecursivelywas added. When set totrue(its default isfalse) arrays and objects graphs passed into tests using@dataProviderare recursively scanned for mock objects so that they can be retain their behavior and expectations set up in the data provider when they are used in the test method.
- The
PHPUnit\Framework\TestCase::getMock()method has been deprecated. Please usePHPUnit\Framework\TestCase::createMock()orPHPUnit\Framework\TestCase::getMockBuilder()instead. - The
PHPUnit\Framework\TestCase::getMockWithoutInvokingTheOriginalConstructor()method has been deprecated. Please usePHPUnit\Framework\TestCase::createMock()instead.
We distribute a PHP Archive (PHAR) that contains everything you need in order to use PHPUnit. Simply download it from here, make it executable, and put it into your $PATH, for instance.
Alternatively, you may use Composer to download and install PHPUnit as well as its dependencies.
PHPUnit 5.4 requires PHP 5.6; using the latest version of PHP is highly recommended. The documentation has a detailed list of the PHP extensions that are required to use PHPUnit.
The goal of our release process is to deliver new features into the hands of our users every two months. The next release with new features will be PHPUnit 5.5. It is currently in development and will become stable on August 4, 2016.
PHPUnit 6, which is scheduled for February 3, 2017, will no longer support PHP 5. As PHPUnit follows Semantic Versioning the major version number must be incremented when the minimum required version of PHP is increased.
Following our release process, PHPUnit 5 will receive bug fixes until February 2, 2018.