PHP Unit Testing Framework

Component ID

1820622

Component name

PHP Unit Testing Framework

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

The SimpleTest framework no longer has the same level of maintenance than the PHP Unit framework. PHPUnit has become the standard; most frameworks use it (ZF1 & 2, Cake, Symfony2, ...) and is actively maintained, stable and works great for every codebase, scenario.

Replacing the testing framework with PHPUnit will allow better consistency in the drupal 8 codebase, by aligning ourselves with Symfony2 testing tools. Moreover, it integrates better with IDE (NetBeans, Eclipse, IntelliJ IDEA), Continuous Integration servers such as Jenkins/Hudson, and with Sonar for static code analysis as well. It has also code coverage which is a huge +.

This module intend to bring Drupal 8 PHP Unit powered tests. It may remains as a separate module or being included into core.

The D8 version can be found in sun's Platform sandox and you can have more information here: #1801176: Deploy a PHPUnit system with a bottom-up approach.

The D7 version is work in progress only and depend strongly on #1693398: Allow PSR-0 test classes to be used in D7 (followups) or http://drupal.org/project/classloader.

Version Compatibility Matrix

Branch PHP Unit PHP Version
7.x-1.x 3.6 5.2.7
7.x-2.x 3.7 5.3.3
8.x-1.x 3.7 5.3.3
8.x-2.x 3.8 5.4.7