Extension:MediaWikiFarm/Tests
This page is about the testing infrastructure.
PHP 5.2
editIt was tested with PHP 5.2 and PHPUnit 3.4 as of March 26, 2017 and was reported as working (with some fixes then).
Here is the process to test with these old softwares:
- Compile PHP 5.2
- Clone with Git PHPUnit and select the tag 3.4
- Copy phpunit.php and the directory PHPUnit inside [MediaWikiFarm]/tests/phpunit
- In the file [MediaWikiFarm]/tests/phpunit/MediaWikiFarmTestCase.php:
- Comment " class MediaWikiTestCase extends PHPUnitFrameworkTestCase {} " (PHP 5.2 does not know namespaces)
- Replace the class inheritance of MediaWikiTestCase from PHPUnit_Framework_TestCase to PHPUnit_Extensions_OutputTestCase
- On the top of the file, add " require_once 'PHPUnit/Extensions/OutputTestCase.php'; "
- cd [MediaWikiFarm]/tests/phpunit; for file in `ls *Test.php`; do php5.2 phpunit.php $file; done;