wiki.techinc.nl/tests/phpunit
Umherirrender c4d4d81ae4 Do not run wfEscapeWikiText on array in Status class
Message params could be more complex than a string
For example by use of Message::numParam()

Bug: T237559
Change-Id: I1be2ad3f73f189f69f955d1c4e1da75652e5e8ff
2019-12-02 13:51:11 +01:00
..
data ComposerInstalledTest: remove mentions of phpunit-mock-objects 2019-11-21 12:59:45 -08:00
docs
documentation
includes Do not run wfEscapeWikiText on array in Status class 2019-12-02 13:51:11 +01:00
integration/includes profiler: Remove ProfilerOutputDb and profileinfo.php entry point 2019-11-06 15:28:00 -05:00
languages Add tests to a few Language class methods 2019-11-17 12:33:24 -08:00
maintenance XmlDumpWriter: emit xml:space only if text is present. 2019-11-25 20:58:07 +00:00
mocks Add public as visibility in tests folder 2019-10-10 21:55:37 +02:00
skins tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
structure Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00
suites Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00
tests Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
unit Don't fail hard on bad titles in the database. 2019-11-25 22:15:38 +01:00
bootstrap.maintenance.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
bootstrap.php phpunit: Repair GLOBALS reset in MediaWikiUnitTestCase 2019-09-02 20:58:34 +01:00
HamcrestPHPUnitIntegration.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
LessFileCompilationTest.php Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07: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 Improve param docs 2019-11-28 19:08:59 +01: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 phpunit: Add typehints for PHPUnit 8 2019-11-17 15:15:24 +01: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 Fix broken running tests locally in IDE 2019-11-21 16:28:12 +00:00
PHPUnit4And6Compat.php PHPUnit4And6Compat tweaks 2019-10-04 19:28:38 -07:00
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