wiki.techinc.nl/tests/phpunit
C. Scott Ananian a8f3eb96ce Hard deprecate Parser::setFunctionTagHook()
This is not used in production code.

Code search:
https://codesearch.wmflabs.org/search/?q=setFunctionTagHook%7CmFunctionTagHooks&i=nope&files=&repos=

Change-Id: Ie03b1687d1c65be23213035d7cb4011ef763b69a
2020-01-28 16:20:40 -08:00
..
data Merge "Improve tests in DoctrineSchemaBuilder" 2020-01-06 11:00:54 +00:00
docs
documentation
includes Hard deprecate Parser::setFunctionTagHook() 2020-01-28 16:20:40 -08:00
integration/includes Merge "Coding style: Auto-fix MediaWiki.Usage.PHPUnit*" 2020-01-10 16:59:11 +00:00
languages Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
maintenance Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
mocks Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
skins
structure Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
suites Remove Preprocessor_DOM, deprecated in 1.34 2020-01-25 11:22:45 -05:00
tests
unit Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
bootstrap.maintenance.php
bootstrap.php Allow specifying autoloaded classes for tests 2019-12-10 21:39:30 +00:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
Makefile
MediaWikiCliOptions.php
MediaWikiCoversValidator.php Rewrite MediaWikiCoversValidator to use @dataProvider 2019-11-27 09:16:57 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php MediaWikiIntegrationTestCase: Hard-deprecate assertType() 2020-01-20 12:39:15 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
MediaWikiPHPUnitCommand.php Show the PHPUnit help in phpunit.php --help 2019-11-25 17:19:20 +11:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCaseTrait.php Share assertArrayEquals with MediaWikiUnitTestCase 2020-01-07 16:05:40 -08:00
MediaWikiUnitTestCase.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
phpunit.php phpunit: fix parameter mangling 2020-01-23 18:02:53 +01:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
README
ResourceLoaderTestCase.php
run-tests.bat
suite.xml phpunit: Drop unused enforceTimeLimit command and related settings 2020-01-22 14:12:45 -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