wiki.techinc.nl/tests/phpunit
2022-08-20 14:53:43 +00:00
..
data
docs
includes Merge "SqlBagOStuff: Fix modtoken comparison" 2022-08-19 22:44:58 +00:00
integration/includes tests: Migrate MediaWiki settings to overrideConfig...() 2022-08-18 17:48:03 +01:00
languages tests: Change multiple calls from overrideConfigValue to overrideConfigValues 2022-08-17 12:08:50 +00:00
maintenance rdbms: add getDomainChangeException() call to DBConnRef::tablePrefix() 2022-08-03 21:41:09 +00:00
mocks Use native array_column() in tests instead of loops 2022-08-16 15:41:14 +02:00
structure tests: Change multiple calls from overrideConfigValue to overrideConfigValues 2022-08-17 12:08:50 +00:00
suites Merge "Set skipMode to something other than legacy" 2022-08-19 21:16:01 +00:00
tests rdbms: add getDomainChangeException() call to DBConnRef::tablePrefix() 2022-08-03 21:41:09 +00:00
unit Merge "Setup: Remove internal short-cut config $wgUseEnotif" 2022-08-20 14:53:43 +00:00
bootstrap.maintenance.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Merge "tests/api: Add TestUser::getAuthority and use it" 2022-08-19 16:35:47 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php phpunit: Fix trivial dynamic property usages in tests 2022-07-29 01:59:23 +02:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiTestCaseTrait.php Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
MediaWikiUnitTestCase.php Migrate use of ${var}-style string interpolation 2022-07-29 02:45:09 +02:00
MWTestDox.php
phpunit.php
README.md
ResourceLoaderTestCase.php
suite.xml phpunit.xml.dist: Align contents with suite.xml 2022-07-12 10:32:32 +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