Difference between revisions 2031633 and 2031635 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. }} (contracted; show full)If you have something similar to <tt>phpunit --version</tt> output above, you should be fine and can start [[Manual:PHP unit testing/Running the unit tests|running the unit tests]]. == Known issues == === Apt package for Ubuntu 11.10, 12.04 is broken === <kbd>sudo apt-get install phpunit</kbd> results in a broken installation missing "PHP/CodeCoverage/Filter.php" ([https://bugs.launchpad.net/ubuntu/+source/phpunit/+bug/770394 Ubuntu launchpad bug 770394]). Installation by hand using the exact commands in the [[#Using PEAR]] section works. You may have to update the installation of PEAR itself on your machine: <source lang="bash"> $ pear upgrade pear </source> When running into an error such as [http://pastebin.com/iP1rgc8Z this one], [http://stackoverflow.com/questions/1528717/phpunit-require-once-error this] should help you out. <ref>https://bugzilla.redhat.com/show_bug.cgi?id=758832</ref>Try doing a manual installation instead. === Class File_Iterator not found === This might happen when trying to run PHPUnit under Ubuntu 11.04. <source lang="bash"> $ phpunit --version PHP Fatal error: Class 'File_Iterator' not found in /usr/share/php/File/Iterator/Factory.php on line 105 </source> (contracted; show full) 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=2031635.
![]() ![]() 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.
|