wiki.techinc.nl/tests/phpunit
2024-10-10 18:14:16 +00:00
..
data Use import actor store where needed in RC categorisation 2024-10-02 00:45:22 +02:00
docs
includes Merge "SpecialBlock: Hard-deprecate deprecated functions" 2024-10-10 18:14:16 +00:00
integration/includes ParsoidParser: ensure magic variable expansion uses pageLanguageOverride 2024-10-09 12:28:23 -04:00
maintenance Merge "Expand CreateAndPromoteTest" 2024-10-10 17:19:13 +00:00
mocks Add namespace to remaining parts of Wikimedia\ObjectCache 2024-09-27 16:19:10 -04:00
structure tests: Consistently use class_alias comments like elsewhere 2024-09-25 09:48:46 -04:00
suites
tests tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
unit Introduce minimal OTEL tracing library 2024-10-09 15:55:31 +02:00
bootstrap.common.php
bootstrap.integration.php
bootstrap.maintenance.php
bootstrap.php
DynamicPropertyTestHelper.php
getPHPUnitExtensionsAndSkins.php
HamcrestPHPUnitIntegration.php
JsonSchemaAssertionTrait.php REST: validate JSON in tests 2024-09-20 15:42:32 +00:00
MediaWikiCoversValidator.php
MediaWikiDeprecatedConfigPHPUnitExtension.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php build: Use inline ignore for MediaWiki.Usage.DeprecatedGlobalVariables 2024-09-26 18:15:32 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTeardownPHPUnitExtension.php
MediaWikiTestCaseTrait.php
MediaWikiUnitTestCase.php tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
MWTestDox.php
phpunit.php
README.md
ResourceLoaderTestCase.php tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
suite.xml
TestSelectQueryBuilder.php Expand tests for rename user maintenance scripts 2024-10-08 21:51:59 +01:00

MediaWiki PHPUnit tests

WARNING: Integration tests may be destructive and alter or remove parts of your local database. We try to use temporary tables where possible, but you must never run tests on a production server or on a wiki where you don't want to lose data.

Running tests

If you haven't already, run composer update (specifically without --no-dev) in the MediaWiki core directory. This will install PHPUnit.

To read about how to run specific tests, refer to:

https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Running_the_tests

Writing tests

A guide to writing PHPUnit tests for MediaWiki can be found at:

https://www.mediawiki.org/wiki/Manual:PHP_unit_testing