* Block.php: Set mExpiry to the value we store in the database, so that Block::equals() returns true. Fixes BlockTest::testInitializerFunctionsReturnCorrectBlock. * In Title::checkUserBlock(): Convert message parameters to plain strings to make strict comparisons work. Fixes TitlePermissionTest::testUserBlock(). * ApiBlock.php: Follow-Up r85166, add 'Confirm' parameter to data array. Fixes ApiBlockTest::testMakeNormalBlock(). * ApiQueryTest.php: Use $wgMetaNamespace instead of $wgSitename to account for customizations. * RandomImageGenerator.php: Use default value for constructor param to prevent fatals. * ApiTestCaseUpload.php: ** Fix undefined variable $fileName. ** Remove stray ini_set statements, they don't belong there. Especially ini_set( 'error_reporting', 1 ) will effectively disable all reporting, which makes errors hard to track. * ArticleTablesTest.php: Put testbug14404() in group Broken, as the fix for the bug has been reverted in r83868. |
||
|---|---|---|
| .. | ||
| data/zip | ||
| includes | ||
| languages | ||
| suites | ||
| bootstrap.php | ||
| install-phpunit.sh | ||
| Makefile | ||
| MediaWikiPHPUnitCommand.php | ||
| MediaWikiTestCase.php | ||
| phpunit.php | ||
| README | ||
| run-tests.bat | ||
| suite.xml | ||
| TODO | ||
== MediaWiki PHPUnit Tests == The unit tests for MediaWiki are implemented using the PHPUnit testing framework and require PHPUnit to run. === WARNING === Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS. DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED TO RETAIN YOUR DATA. == Installation == If PHPUnit is not installed, follow the installation instructions in the PHPUnit Manual at: http://www.phpunit.de/manual/current/en/installation.html - or - On Unix-like operating systems, run: make install == Running tests == The tests are run from your operating system's command line. Ensure that you are in the tests/phpunit directory of your MediaWiki installation. On Unix-like operating systems, the tests runs are controlled with a makefile. Run command: make help for a full list of options for running tests. On Windows-family operating systems, run the 'run-tests.bat' batch file. === Writing tests === A guide to writing unit tests for MediaWiki can be found at: http://mediawiki.org/wiki/Unit_Testing