wiki.techinc.nl/tests/phpunit
C. Scott Ananian e9218f6afa LinksUpdateTest: override InterwikiLookup service
Use the same strategy for setting up interwiki links for the
LinksUpdateTest that is used in ParserTestRunner.  This is more
robust against service initialization order and doesn't import
unrelated interwiki prefixes from the host wiki during testing.

Change-Id: I6b2141ea8299fc8ca3db996104fbafff68276c55
2024-03-29 17:30:14 -04:00
..
data Add TranslationAliasesDirs to specify special page aliases in JSON 2024-03-06 18:13:28 +05:30
docs
includes LinksUpdateTest: override InterwikiLookup service 2024-03-29 17:30:14 -04:00
integration/includes Remove $wgHTMLFormAllowTableFormat and its uses 2024-03-26 22:49:55 +01:00
maintenance maintenance: show broken replicas in getLagTimes 2024-02-27 22:52:14 +01:00
mocks PoolCounter: Adopt PSR logger in PoolCounter objects 2024-03-02 00:41:11 +00:00
structure Merge "handler: Declare known sources in Validator" 2024-03-28 14:28:53 +00:00
suites parsertests: Misc cleanup 2024-03-15 00:34:23 +00:00
tests objectcache: Introduce ObjectCacheFactory MW service 2024-03-19 12:38:39 +03:00
unit Merge "objectcache: Restore default keyspace for LocalServerCache service" 2024-03-28 19:52:55 +00: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 Merge "Avoid mentioning tests/phpunit.php in documentation" 2023-07-24 16:32:47 +00:00
bootstrap.php phpunit: Do not crash when paratest options are passed in 2024-02-25 20:06:18 +01:00
DynamicPropertyTestHelper.php Introduce and use DynamicPropertyTestHelper 2023-11-03 13:50:53 -04:00
getPHPUnitExtensionsAndSkins.php phpunit: Make getPHPUnitExtensionsAndSkins run the UnitTestsList hook 2023-11-13 15:12:55 +01: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 Make isTestInDatabaseGroup static and case-sensitive 2023-08-15 21:01:03 +00:00
MediaWikiIntegrationTestCase.php objectcache: Introduce ObjectCacheFactory MW service 2024-03-19 12:38:39 +03:00
MediaWikiLangTestCase.php MediaWikiLangTestCase: Avoid global variable 2023-10-12 12:56:55 +00:00
MediaWikiLoggerPHPUnitExtension.php phpunit: Add PHPUNIT_LOGS flag 2023-02-08 22:15:32 -08:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiTeardownPHPUnitExtension.php phpunit: Use PHPUnit hooks to tear down the test DB after the last test 2023-07-13 01:10:11 +02:00
MediaWikiTestCaseTrait.php build: Upgrade phpunit to 9.6.16 2024-02-25 00:04:54 +00:00
MediaWikiUnitTestCase.php
MWTestDox.php phpunit: Restore default progress reporter and add MWTestDox option 2022-06-12 19:22:57 +00:00
phpunit.php Deprecate $wgCommandLineMode 2024-01-02 22:21:50 +01: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 Migrate assertSelect() to SelectQueryBuilder 2023-06-28 09:03:58 +10: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