wiki.techinc.nl/tests/phpunit
Bartosz Dziewoński 1bf9db0779 Re-apply "Use Remex for DeduplicateStyles transform"
This reverts commit 7f63d5250e,
re-applying commit 82da9cf14b.
It can be re-applied safely after T354361 was fixed.

Most of the incidental changes from the original patch are
no longer needed, as they were made unnecessary by other work,
or were applied in I4cb2f29cf890af90f295624c586d9e1eb1939b95.

Change-Id: I1ff9a7c94244bffffe5574c0b99379ed1121a86d
(cherry picked from commit 09703c2c774a65dd9ee57ec83154aa1eab5a9d03)
2025-09-29 22:01:15 +00:00
..
data Forward-compat data for SelserContext w/ JSON-encoded Content 2025-09-10 14:08:31 -04:00
docs Add namespace to maintenance/includes classes 2024-10-09 11:02:09 -04:00
includes Re-apply "Use Remex for DeduplicateStyles transform" 2025-09-29 22:01:15 +00:00
integration/includes Forward-compat data for SelserContext w/ JSON-encoded Content 2025-09-10 14:08:31 -04:00
maintenance tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
mocks logger: Make log() methods return void 2025-06-18 02:21:42 +00:00
structure Skip 'ext.pageviewinfo' module in ResourcesTest to avoid CI failure 2025-09-16 15:13:58 +00:00
suites tests: add skins to PHPUnit "extensions:unit" test suite 2025-09-17 01:03:38 +00:00
tests tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
unit Use JsonCodec to serialize SelserContext 2025-09-10 14:08:31 -04:00
bootstrap.common.php Deprecate $wgCommandLineMode 2024-01-02 22:21:50 +01:00
bootstrap.integration.php phpunit: Deprecate suite.xml and composer phpunit:entrypoint 2023-12-21 08:22:35 +00:00
bootstrap.maintenance.php
bootstrap.php phpunit: Fix bootstrap script when no extensions are installed 2025-02-21 22:24:30 +00:00
DynamicPropertyTestHelper.php Drop PHP 7.4/8.0 support from master (forward-port from MW 1.42) 2025-06-18 10:53:22 +01:00
getPHPUnitExtensionsAndSkins.php phpunit: Fix bootstrap script when no extensions are installed 2025-02-21 22:24:30 +00:00
HamcrestPHPUnitIntegration.php
JsonSchemaAssertionTrait.php REST: validate JSON in tests 2024-09-20 15:42:32 +00:00
MediaWikiCoversValidator.php
MediaWikiDeprecatedConfigPHPUnitExtension.php phpunit: Deprecate suite.xml and composer phpunit:entrypoint 2023-12-21 08:22:35 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php title: Reset cached Title objects between tests 2025-05-27 12:35:10 +00:00
MediaWikiLangTestCase.php Use MediaWikiIntegrationTestCase::getConfVar in tests 2024-08-06 12:52:34 +00:00
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTeardownPHPUnitExtension.php
MediaWikiTestCaseTrait.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
MediaWikiUnitTestCase.php tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
MWTestDox.php
phpunit.php phpunit: Don't override --bootstrap if supplied 2025-01-13 15:14:27 +00:00
README.md
ResourceLoaderTestCase.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
suite.xml phpunit: Deprecate suite.xml and composer phpunit:entrypoint 2023-12-21 08:22:35 +00:00
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