wiki.techinc.nl/tests/phpunit
2020-07-22 18:51:16 +00:00
..
data Check for unknown slot. 2020-07-20 10:39:28 -04:00
docs
documentation MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
includes Rename 'revisions' to 'contributions' 2020-07-22 18:29:29 +02:00
integration/includes Add mw-manual-revert change tag 2020-07-16 13:29:12 +02:00
languages MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
maintenance MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
mocks Fast stale ParserCache responses 2020-06-05 16:24:22 +10:00
skins
structure MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
suites MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
tests MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
unit Merge "UserContributionsHandler: use UserFactory::newAnonymous" 2020-07-22 18:51:16 +00:00
bootstrap.maintenance.php MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
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
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Fix switch/case indentation per mediawiki coding conventions 2020-07-18 09:17:46 +00:00
MediaWikiLangTestCase.php MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +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 Annotate extensible classes. 2020-07-09 11:07:38 +02:00
phpunit.php Call ob_start() before running tests 2020-05-25 13:55:28 +10:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
README
ResourceLoaderTestCase.php MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
run-tests.bat
suite.xml Add a new type of database to the installer from extension 2020-06-26 13:37:32 +03: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