wiki.techinc.nl/tests/phpunit
Bartosz Dziewoński e4c7272976 Change uses of getDBLoadBalancerFactory() to getConnectionProvider()
Update cases where one of the IConnectionProvider methods is called
immediately.

This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.

Follow-up to 8604c384f6.

Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
2024-01-22 22:27:45 +01:00
..
data CodexModule: Throw exception for non-entry points 2024-01-17 12:29:47 -05:00
docs
includes Change uses of getDBLoadBalancerFactory() to getConnectionProvider() 2024-01-22 22:27:45 +01:00
integration/includes Merge "Add wfDeprecated call to RealTempUserConfig::getMatchPattern" 2024-01-22 20:53:06 +00:00
maintenance tests: Remove explicit clean up for database tests 2024-01-20 19:55:27 +01:00
mocks DummyServicesTrait: add an ITextFormatter 2024-01-09 13:16:59 +00:00
structure Change uses of getDBLoadBalancerFactory() to getConnectionProvider() 2024-01-22 22:27:45 +01:00
suites
tests Change uses of getDBLoadBalancerFactory() to getConnectionProvider() 2024-01-22 22:27:45 +01:00
unit Merge "Add wfDeprecated call to RealTempUserConfig::getMatchPattern" 2024-01-22 20:53:06 +00:00
bootstrap.common.php
bootstrap.integration.php
bootstrap.maintenance.php
bootstrap.php
DynamicPropertyTestHelper.php
getPHPUnitExtensionsAndSkins.php
HamcrestPHPUnitIntegration.php
MediaWikiCoversValidator.php
MediaWikiDeprecatedConfigPHPUnitExtension.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Change uses of getDBLoadBalancerFactory() to getConnectionProvider() 2024-01-22 22:27:45 +01:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTeardownPHPUnitExtension.php
MediaWikiTestCaseTrait.php
MediaWikiUnitTestCase.php
MWTestDox.php
phpunit.php
README.md
ResourceLoaderTestCase.php ResourceLoader: Drop targets system, deprecated in 1.41 2024-01-12 16:42:38 -05:00
suite.xml
TestSelectQueryBuilder.php

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