wiki.techinc.nl/tests/phpunit
Dreamy Jazz bcb2112850 Start on tests for install.php
Why:
* Maintenance scripts in core are mostly untested and testing them
  will help to avoid regressions.

What:
* Create CommandLineInstallerTest.

Bug: T371167
Change-Id: Ia9ef03326d7c25b7eb310c191034932fffcbff8c
2024-08-30 19:44:52 +00:00
..
data Test checkComposerLockUpToDate.php 2024-08-29 20:18:39 +00:00
docs tests: Unbreak and actually run ExportDemoTest 2023-08-08 15:30:54 +00:00
includes Merge "Revision,Storage: Widen @covers tags in tests" 2024-08-30 12:08:24 +00:00
integration/includes Test checkComposerLockUpToDate.php 2024-08-29 20:18:39 +00:00
maintenance Start on tests for install.php 2024-08-30 19:44:52 +00:00
mocks Merge "Use variable-length argument lists instead of func_get_args()" 2024-08-18 10:28:17 +00:00
structure Fix specifying messages with params as arrays in API documentation 2024-08-21 13:26:02 +00:00
suites tests: Make use of ??= and ?? operators in various tests 2024-08-15 11:44:46 +02:00
tests tests: Make use of upstream NullLogger in tests 2024-08-15 11:58:13 +02:00
unit Merge "Revision,Storage: Widen @covers tags in tests" 2024-08-30 12:08:24 +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
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 Make isTestInDatabaseGroup static and case-sensitive 2023-08-15 21:01:03 +00:00
MediaWikiIntegrationTestCase.php tests: Make use of ??= and ?? operators in various tests 2024-08-15 11:44:46 +02:00
MediaWikiLangTestCase.php Use MediaWikiIntegrationTestCase::getConfVar in tests 2024-08-06 12:52:34 +00:00
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTeardownPHPUnitExtension.php
MediaWikiTestCaseTrait.php Merge "tests: Disallow using setFakeTime() in PHPUnit data providers" 2024-08-20 22:43:19 +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 Codex: Allow a local development version to be used 2024-08-22 17:20:24 -07: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