Difference between revisions 2031636 and 2032681 on mediawikiwiki{{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. {{notice| Depending on your distribution and configuration, you may have to run the following commands as root. }} == Install methods == Note the [[#Known issues|known issue below]]. The Debian/Ubuntu package is broken. The [http://phpunit.de/manual/current/en/installation.html recommended way to install PHPUnit] is by downloading a PHP Archive (PHAR file). With the resolution of [[bugzilla:58881|bug 58881]], this should work now. If you use [[Composer]] to manage your MediaWiki dependencies, it should install PHPUnit for you, although it installs PHPUnit specifically for the <tt>tests/phpunit/phpunit.php</tt> script, not for general command-line use.⏎ ⏎ == Testing your installation == <source lang="bash"> $ which phpunit /some/path/to/bin/phpunit $ phpunit --version PHPUnit A.B.C by Sebastian Bergmann. $ (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. ⏎ ⏎ == Notes == <references /> All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://mediawiki.org/w/index.php?diff=prev&oldid=2032681.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|