wiki.techinc.nl/tests/phpunit
2019-12-14 11:00:08 +00:00
..
data resourceloader: Add tests for module-level 'noflip' option 2019-12-03 15:58:36 +00:00
docs
documentation
includes Merge "Autofix 94 PHPUnit 8 compat issues" 2019-12-14 11:00:08 +00:00
integration/includes Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
languages Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
maintenance Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
mocks
skins tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
structure Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
suites Fixes for PHPUnit 8 compatibility 2019-12-10 17:02:06 +00:00
tests Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
unit Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
bootstrap.maintenance.php
bootstrap.php Allow specifying autoloaded classes for tests 2019-12-10 21:39:30 +00:00
HamcrestPHPUnitIntegration.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
LessFileCompilationTest.php Remove duplicate variable name from class property PHPDocs 2019-12-02 12:58:29 +00:00
Makefile
MediaWikiCliOptions.php Fix broken running tests locally in IDE 2019-11-21 16:28:12 +00:00
MediaWikiCoversValidator.php Rewrite MediaWikiCoversValidator to use @dataProvider 2019-11-27 09:16:57 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Fix MediaWikiIntegrationTestCase MWException text for using pages 2019-12-14 00:27:50 +00:00
MediaWikiLangTestCase.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
MediaWikiLoggerPHPUnitTestListener.php Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00
MediaWikiPHPUnitCommand.php Show the PHPUnit help in phpunit.php --help 2019-11-25 17:19:20 +11:00
MediaWikiPHPUnitResultPrinter.php Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
MediaWikiPHPUnitTestListener.php Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00
MediaWikiTestCaseTrait.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
MediaWikiUnitTestCase.php phpunit: Remove 6And8Compat trait from base classes 2019-11-21 17:42:39 +00:00
phpunit.php Merge "Fixes for PHPUnit 8 compatibility" 2019-12-11 17:07:21 +00:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php phpunit: Remove 6And8Compat trait from base classes 2019-11-21 17:42:39 +00:00
README
ResourceLoaderTestCase.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
run-tests.bat
suite.xml Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00

== MediaWiki PHPUnit Tests ==

The unit and integration tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the integration 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