wiki.techinc.nl/tests/phpunit
2020-06-24 17:34:50 +00:00
..
data VueComponentParser: Use RemexHtml instead of PHP's HTML parser 2020-06-22 19:54:15 +00:00
docs
documentation docs: Rename main README to README.md 2020-06-23 15:50:57 +01:00
includes Merge "Add clock icon to expiring items in Special:Watchlist" 2020-06-24 17:34:50 +00:00
integration/includes Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
languages Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
maintenance Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
mocks Fast stale ParserCache responses 2020-06-05 16:24:22 +10:00
skins Use MediaWikiServices::getMessageCache 2020-03-14 14:25:03 +01:00
structure Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
suites Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
tests Fix visibility of setUp/tearDown 2020-06-16 21:02:05 +02:00
unit Merge "PageUpdater: create EditResult class" 2020-06-23 10:18:32 +00:00
bootstrap.maintenance.php
bootstrap.php Call TestSetup::applyInitialConfig() from bootstrap.php 2020-04-21 23:40:23 +00:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCliOptions.php
MediaWikiCoversValidator.php phpunit: Speed up MediaWikiCoversValidator trait 2020-03-08 18:51:38 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiLangTestCase.php Use MediaWikiServices::getMessageCache 2020-03-14 14:25:03 +01:00
MediaWikiLoggerPHPUnitTestListener.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php phpunit: Move "Logs generated by test" from middle to end of result 2020-05-22 20:48:28 +01:00
MediaWikiPHPUnitTestListener.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiTestCaseTrait.php Replace all call_user_func(_array) in all tests 2020-06-06 18:41:20 +02:00
MediaWikiUnitTestCase.php Merge "Add getMockMessage to MediaWikiTestCaseTrait" 2020-06-03 18:46:43 +00:00
phpunit.php Call ob_start() before running tests 2020-05-25 13:55:28 +10:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
README
ResourceLoaderTestCase.php Fix some PSR12.Properties.ConstantVisibility.NotFound in tests/phpunit/ 2020-05-09 23:55:09 +00:00
run-tests.bat
suite.xml phpunit: Consider "risky" tests as failed tests 2020-04-06 18:05:50 +00:00

== MediaWiki PHPUnit Tests ==

The unit and integration tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the integration 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 you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
you explicitly specified the --no-dev flag during the install. In this case just run "composer update".

Otherwise follow the installation instructions in the
PHPUnit Manual at:

  https://phpunit.de/manual/current/en/installation.html


== 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 PHP unit tests for MediaWiki can be found at:

	https://www.mediawiki.org/wiki/Manual:PHP_unit_testing