wiki.techinc.nl/tests/phpunit
2018-06-27 07:25:50 +00:00
..
data Use wikimedia/xmp-reader library 2018-05-31 19:24:39 -07:00
docs
includes Merge "resourceloader: Add @covers for FileModuleTest" 2018-06-27 07:25:50 +00:00
languages Add @coversNothing to tests that don't cover specific PHP classes 2018-06-12 13:27:40 -07:00
maintenance Add maintenance to populate change_tag_def table and ct_tag_id field 2018-06-15 17:57:27 +02:00
mocks Silently drop unknown titles in completion search 2018-06-11 13:56:19 -07:00
skins
structure Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness" 2018-06-25 12:38:07 +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 Merge "Avoid deprecated LinkCache::singleton()" 2018-06-14 23:48:54 +00:00
phpunit.php
PHPUnit4And6Compat.php
README
ResourceLoaderTestCase.php resourceloader: Apply safemode to startup module registry 2018-05-19 22:14:33 +02: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