wiki.techinc.nl/tests/phpunit
Bartosz Dziewoński 3abcd09bb4 Use variable-length argument lists instead of func_get_args()
(plus some other tweaks to code using array unpacking weirdly)

Change-Id: I76a280548952ee5144ca7e75e00d530ad55c22d7
2024-08-16 18:42:01 +00:00
..
data CodexModule: use list of i18n message keys from Codex package 2024-08-12 15:30:11 -07:00
docs
includes Use variable-length argument lists instead of func_get_args() 2024-08-16 18:42:01 +00:00
integration/includes Use variable-length argument lists instead of func_get_args() 2024-08-16 18:42:01 +00:00
maintenance Merge "Test getConfiguration.php" 2024-08-13 13:31:37 +00:00
mocks Use variable-length argument lists instead of func_get_args() 2024-08-16 18:42:01 +00:00
structure Merge "Deprecate ApiBase::makeMessage" 2024-08-16 18:17:01 +00:00
suites Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
tests Use MediaWikiIntegrationTestCase::getConfVar in tests 2024-08-06 12:52:34 +00:00
unit Move Language and friends into Language namespace 2024-08-10 13:36:30 +02: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 Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
DynamicPropertyTestHelper.php tests: Update @since tags for backports 2024-04-08 16:09:42 +01:00
getPHPUnitExtensionsAndSkins.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
HamcrestPHPUnitIntegration.php
MediaWikiCoversValidator.php
MediaWikiDeprecatedConfigPHPUnitExtension.php phpunit: Deprecate suite.xml and composer phpunit:entrypoint 2023-12-21 08:22:35 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +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 tests: Let FakeQqxMessageLocalizer handle numParam() 2024-06-25 17:23:24 +00:00
MediaWikiUnitTestCase.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
MWTestDox.php
phpunit.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
README.md
ResourceLoaderTestCase.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
suite.xml phpunit: Deprecate suite.xml and composer phpunit:entrypoint 2023-12-21 08:22:35 +00:00
TestSelectQueryBuilder.php tests: Add TestSelectQueryBuilder::assertRowValue 2024-05-08 23:13:19 +02: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