wiki.techinc.nl/tests/phpunit
C. Scott Ananian 83a22b7fcd Remove codepaths which ran parser in 'untidy' mode
Disabling tidy has been deprecated since 1.33.  This cleans up the code
paths which still used untidy output.

Bug: T198214
Change-Id: I821ef3b8f59b272d983583d407b2f0794fe1e791
2020-04-13 21:34:04 +00:00
..
data Make dump tests based on fixture files. 2020-04-06 15:21:00 -07:00
docs
documentation Update all use of $wgVersion to MW_VERSION 2020-02-25 02:16:12 +00:00
includes Remove codepaths which ran parser in 'untidy' mode 2020-04-13 21:34:04 +00:00
integration/includes Merge "Make REST tests more robust against content language" 2020-03-30 14:49:27 +00:00
languages LanguageConverterTest: Reduce direct references to $wgUser 2020-04-12 18:27:10 +00:00
maintenance Make dump tests based on fixture files. 2020-04-06 15:21:00 -07:00
mocks api: Wrap getParserOutput by PoolCounterWork in ApiParse module 2020-04-08 22:14:14 +03:00
skins Use MediaWikiServices::getMessageCache 2020-03-14 14:25:03 +01:00
structure phpunit: Add structure test for suite.xml registering all test suites 2020-04-02 01:47:48 +00:00
suites Fix skipping of parser test suites 2020-03-20 15:26:14 +01:00
tests phpunit: Mock wgDebugToolbar in MediaWikiTestCaseTest 2020-04-08 15:55:15 +01:00
unit Typo fix: 'depencency' -> 'dependency' 2020-04-09 14:02:53 -04:00
bootstrap.maintenance.php
bootstrap.php Add MW_ENTRY_POINT to bootstrap.php 2020-04-01 10:12:41 +11: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 phpunit: Add setNullLogger() and make tests default to LegacySpi 2020-04-07 22:00:13 +00:00
MediaWikiLangTestCase.php Use MediaWikiServices::getMessageCache 2020-03-14 14:25:03 +01:00
MediaWikiLoggerPHPUnitTestListener.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCaseTrait.php SearchHandler: add unit test 2020-03-02 20:52:46 +01:00
MediaWikiUnitTestCase.php
phpunit.php Use class keyword for classname resolution 2020-03-27 09:33:01 +01:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
README
ResourceLoaderTestCase.php resourceloader: Export ResourceModuleSkinStyles as extension attribute 2020-03-30 16:08:00 -07: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