wiki.techinc.nl/tests/phpunit
Timo Tijhof 5c90f8d137 resourceloader: Move registering of custom sources to ServiceWiring
Remove the now-redundant mocking of this configuration from various
test classes.

Bug: T32956
Change-Id: If90a10a76b8289c4ba707382ac915441c17d831f
2019-03-29 01:46:34 +00:00
..
data
docs
documentation Fix off by 1 error when displaying the number of a line with an error 2019-03-24 20:57:31 +00:00
includes resourceloader: Move registering of custom sources to ServiceWiring 2019-03-29 01:46:34 +00:00
languages
maintenance Make the XML dump schema version configurable. 2019-03-21 12:43:32 +01:00
mocks media: Mark public MediaHandler/ImageHandler methods as such 2019-02-25 10:16:30 +01:00
skins
structure Merge "Do not suppress php notices in SpecialPageFatalTest" 2019-03-23 21:20:04 +00:00
suites
tests Make copyTestData work on postgres 2019-03-13 22:06:44 +01:00
bootstrap.php
HamcrestPHPUnitIntegration.php Use splat operator in HamcrestPHPUnitIntegration 2019-02-26 18:52:03 -08:00
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php Report logs for each individual test failure 2019-03-06 15:13:53 -08:00
MediaWikiPHPUnitCommand.php Report logs for each individual test failure 2019-03-06 15:13:53 -08:00
MediaWikiPHPUnitResultPrinter.php Report logs for each individual test failure 2019-03-06 15:13:53 -08:00
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Recalculate user default options for each test 2019-03-28 11:12:17 -07:00
MediaWikiTestResult.php
MediaWikiTestRunner.php
phpunit.php
PHPUnit4And6Compat.php Validate the output of the dump scripts. 2019-03-20 22:25:20 +01:00
README
ResourceLoaderTestCase.php resourceloader: Move registering of custom sources to ServiceWiring 2019-03-29 01:46:34 +00:00
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 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