wiki.techinc.nl/tests/phpunit
2018-07-17 01:09:25 +00:00
..
data Use wikimedia/xmp-reader library 2018-05-31 19:24:39 -07:00
docs
documentation tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07:00
includes Merge "objectcache: make BagOStuff::mergeViaLock() timeout more sensible" 2018-07-17 01:09:25 +00:00
languages Accept BCP 47 codes as aliases for nonstandard variants 2018-07-13 17:43:20 -04:00
maintenance Add maintenance to populate change_tag_def table and ct_tag_id field 2018-06-15 17:57:27 +02:00
mocks Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
skins
structure resourceloader: Embed 'mediawiki' directly in startup response 2018-06-27 17:06:35 +00:00
suites Add @coversNothing to tests that don't cover specific PHP classes 2018-06-12 13:27:40 -07:00
tests Skip MediaWikiTestCaseSchema1Test on Postgres 2018-06-26 15:25:43 +00:00
autoload.ide.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
phpunit.php
PHPUnit4And6Compat.php
README
ResourceLoaderTestCase.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
run-tests.bat
suite.xml tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07: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