@@ -10,10 +10,24 @@ ensuring that the `Contact.create` API actually creates a contact.
PHPUnit is a command-line tool, but the command name varies depending on how it was installed. For example:
* In [buildkit](/tools/buildkit.md), this command is named `phpunit4`.
* In [buildkit](/tools/buildkit.md), this command is named `phpunit4`, `phpunit5`, or `phpunit6`, according to the desired version of PHPUnit (see below).
* In other environments, it might be `phpunit` or `phpunit.phar` or `phpunit.bat`.
For the following examples, we'll use `phpunit4`.
For the following examples, we'll use `phpunit5`.
### PHPUnit version compatibility
PHPUnit made a major breaking change in recent years: the primary base class was renamed from `PHPUnit_Framework_TestCase` to `PHPUnit\Framework\TestCase`. Changes to `civicrm-core` in 5.14 and the `civix` test templates in 19.06.1 reflect this change.
The change was implemented over the course of two versions. PHPUnit 5 allows for both the old class name and the new one, while PHPUnit 6 only allows for the new one. Meanwhile, PHPUnit 4 does not support PHP versions newer than 5.6.