wiki.techinc.nl/tests/phpunit
Fomafix 0a0d5cb7f7 Fix typos
Bug: T201491
Change-Id: I25a27d11faabe2f5fa02950c7a4fb58b13fb3662
2018-08-14 09:52:19 +00:00
..
data Use separate insert/delete statements to work around Blazegraph bug 2018-08-13 23:24:52 +00:00
docs
documentation tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07:00
includes Fix typos 2018-08-14 09:52:19 +00:00
languages Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
maintenance Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
mocks Unify SearchEngine normalizeNamespace and parseNamespacePrefixes 2018-07-17 21:56:05 +00:00
skins
structure Introduce SpecialPageFatalTest 2018-07-31 07:11:48 +00:00
suites Fix test database prefix in ParserTestTopLevelSuite 2018-07-16 16:21:51 +02:00
tests Introduce MediaWikiTestCase::markTestSkippedIfDbType() 2018-08-01 00:19:10 -07:00
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Tests can't call resetGlobalServices() 2018-08-09 17:53:14 +03:00
phpunit.php Make maintenance scripts fail on unknown parameters 2018-08-06 14:37:49 -05:00
PHPUnit4And6Compat.php tests: Support passing null to setExpectedException() in compat layer 2018-04-15 08:10:35 +00:00
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