wiki.techinc.nl/tests/phpunit
Timo Tijhof 9bee7ab8a1 resourceloader: Remove support for 'object' in wgResourceModules
Obsolete since MediaWiki 1.17alpha, no known usage since.

Bug: T222637
Change-Id: Ie820b16022ced6767c32aee7f2497a99260b1641
2019-07-16 00:33:19 +01:00
..
data Allow skins/extensions to define custom OOUI themes 2019-07-10 22:08:14 +02:00
docs
documentation tests: Use a fancy generator provider in ReleaseNotesTest 2019-07-02 19:49:43 +01:00
includes resourceloader: Remove support for 'object' in wgResourceModules 2019-07-16 00:33:19 +01:00
integration/includes/db Define unit and integration test suites 2019-06-28 12:18:18 -04:00
languages Move LanguageCodeTest from integration to unit 2019-07-11 20:58:09 +02:00
maintenance Add support for xml dump schema 0.11 2019-06-27 21:56:01 +00:00
mocks Add missing newline between <?php and namespace/use section 2019-06-03 13:36:48 +00:00
skins
structure resourceloader: Speed up dependency checks in structure/ResourcesTest 2019-07-15 02:02:38 +00:00
suites Add missing newline between <?php and namespace/use section 2019-06-03 13:36:48 +00:00
tests Merge "rdbms: clean up $groups logic in LoadBalancer and expand comments" 2019-07-05 22:00:09 +00:00
unit/includes Merge "Load GlobalFunctions.php to tests/phpunit/bootstrap.php" 2019-07-15 01:56:45 +00:00
bootstrap.maintenance.php Define unit and integration test suites 2019-06-28 12:18:18 -04:00
bootstrap.php Load GlobalFunctions.php to tests/phpunit/bootstrap.php 2019-07-14 01:28:07 +02:00
HamcrestPHPUnitIntegration.php Use splat operator in HamcrestPHPUnitIntegration 2019-02-26 18:52:03 -08:00
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php Move trivially compatible tests to the unit tests suite 2019-06-30 15:23:53 +02:00
MediaWikiIntegrationTestCase.php Tests: Assert that integration tests are not in unit test directory 2019-07-10 13:41:44 -04:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php phpunit: Don't include PHPUnitCommand channel in MediaWikiLoggerPHPUnitTestListener 2019-04-07 00:10:16 +01: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
MediaWikiTestResult.php
MediaWikiTestRunner.php
MediaWikiUnitTestCase.php PHPUnit bootstrap: less aggressive unsetting of globals 2019-07-10 13:51:55 -04:00
phpunit.php
PHPUnit4And6Compat.php Validate the output of the dump scripts. 2019-03-20 22:25:20 +01:00
README
ResourceLoaderTestCase.php resourceloader: Remove use of object registering in test suites 2019-07-12 01:17:44 +00:00
run-tests.bat
suite.xml Define unit and integration test suites 2019-06-28 12:18:18 -04:00
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