wiki.techinc.nl/tests/phpunit
MusikAnimal de2b3f7a59 mediawiki.special.block: make submit destructive and use old messages
SpecialBlock calls HTMLForm::setSubmitDestructive(). This patch applies
that to the new Vue version of Special:Block.

Additionally, since we're not going to enable multiblocks in the initial
launch, the submit button message is changed to as it was before. "Save
block" is questionable even for multiblocks. It will likely be a while
before we iron out the UI for multiblocks, so we might as well remove
now-unused 'block-save' message.

The "[username] is already blocked" message is now also surfaced, i.e.
browsing to [[Special:Block/someblockuser]]. Like the old Special:Block,
changes to the block target field won't re-query to see if the user is
already blocked (though that would be a fine improvement). However
*unlike* the old Special:Block, such changes do make the message
disappear.

Bug: T373572
Change-Id: Iceaedbb1e3496c52b49a2b96d65445da45261b9f
2024-09-18 20:43:22 -04:00
..
data Test checkComposerLockUpToDate.php 2024-08-29 20:18:39 +00:00
docs
includes mediawiki.special.block: make submit destructive and use old messages 2024-09-18 20:43:22 -04:00
integration/includes Re-order arguments to DataAccess::addTrackingCategory 2024-09-18 14:59:00 -04:00
maintenance Merge "Test exportSites.php and importSites.php" 2024-09-16 22:56:25 +00:00
mocks mocks: Add missing documentation to class properties 2024-09-14 09:55:06 +02: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: Use const for some static data in test files 2024-09-01 23:24:11 +02:00
unit Merge "language: Add missing documentation to class properties" 2024-09-17 22:58:47 +00:00
bootstrap.common.php
bootstrap.integration.php
bootstrap.maintenance.php
bootstrap.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
DynamicPropertyTestHelper.php
getPHPUnitExtensionsAndSkins.php Add MediaWiki\Registration namespace to registration classes 2024-08-10 10:08:22 +00:00
HamcrestPHPUnitIntegration.php
MediaWikiCoversValidator.php
MediaWikiDeprecatedConfigPHPUnitExtension.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php objectcache: Remove WinCache support 2024-09-05 17:59:26 +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 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 Resourceloader: Enable methods that stores and retrieves dependency during test 2024-09-04 20:15:03 +00: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