Difference between revisions 4087081 and 4183641 on mediawikiwiki

{{delete|Most of these instructions are outdated and don't seem relevant anymore. I believe most (all?) developers are running <code>composer update</code> and can execute <code>vendor/bin/phpunit</code>. --[[User:KHarlan (WMF)|KHarlan (WMF)]] ([[User talk:KHarlan (WMF)|talk]]) 17:51, 18 October 2020 (UTC)}}

{{Manual:PHP_unit_testing/navigation}}

You must have PHPUnit 3.7.0 (or later) installed to run the unit tests. Most developers use the very latest PHPUnit version, so there is no guarantee an older one will actually pass the tests we wrote. 

'''It seems that PHPUnit 7 does not work with MediaWiki at the moment. Use PHPUnit 6 instead.'''

== Install methods ==
Note the [[#Known issues|known issue below]]. The Debian/Ubuntu package is broken.
(contracted; show full)
 PHPUnit 3.6.7 or later required, you have 3.5.15.
...this means that you probably have more than one version of PHPUnit installed on your machine. You may need to edit your include_path in your php.ini file to point to the location of the newer installation. You may also need to add this path to the PATH variable in your .profile.

If you get the error...
 This version of PHPUnit requires PHP 5.6.
...you either need to upgrade PHP or downgrade PHPUnit. PHPUnit 4.8 is compatible with PHP 5.5 and earlier.