wiki.techinc.nl/tests/phpunit/unit/includes
DannyS712 91ac8a717d Add UserNameUtils to DummyServicesTrait, and use it
Allows us to reduce direct mocking in individual tests, or relying
on MediaWikiServices, by having a reusable service instead that
can be used in unit tests.

Make use of it in a few places.

This dummy service is also less coupled to individual tests;
in the rest handler tests, replacing mocks that report that
only a specific string is an ip address with the actual implementation
that accepts other ip address, and in BlockUtilsTest use
an actually invalid user name instead of making the mock
UserNameUtils complain about a perfectly valid name.

Change-Id: Iaa3195002ac4ae7e0c9c58ed57c80c02762d4070
2021-07-27 12:17:06 +00:00
..
actions
api Move ApiWatchlistTraitTest back to unit tests 2021-07-06 20:37:45 +00:00
auth Hard deprecate the setters of AbstractAuthenticationProvider class 2021-05-31 13:02:39 +00:00
block Add UserNameUtils to DummyServicesTrait, and use it 2021-07-27 12:17:06 +00:00
cache LinkBatch: replace Title with PageReference in method signatures 2021-04-26 19:54:24 +02:00
changes build: Updating dependencies 2021-07-22 03:36:05 +00:00
composer
config Introduce includes/Storage/PageUpdaterFactory 2021-07-19 12:15:26 +02:00
content build: Updating dependencies 2021-07-22 03:36:05 +00:00
context Use CsrfTokenSet as CSRF token source 2021-07-12 14:19:15 -07:00
dao Give WikiAwareEntityTrait it's own unit tests. 2021-04-27 20:31:14 -07:00
db
debug build: Updating dependencies 2021-07-22 03:36:05 +00:00
deferred
diff Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
editpage Replace easy usages of User for UserIdentity/Authority 2021-06-09 07:53:52 -07:00
exception build: Updating dependencies 2021-07-22 03:36:05 +00:00
filebackend build: Updating dependencies 2021-07-22 03:36:05 +00:00
filerepo/file
GlobalFunctions
historyblob build: Updating dependencies 2021-07-22 03:36:05 +00:00
HookContainer build: Updating dependencies 2021-07-22 03:36:05 +00:00
htmlform
http Move HttpRequestFactoryTest to a unit test 2021-06-02 13:20:02 +00:00
import WikiImporter: inject services 2021-05-24 23:10:07 +02:00
installer
interwiki build: Updating dependencies 2021-07-22 03:36:05 +00:00
jobqueue build: Updating dependencies 2021-07-22 03:36:05 +00:00
json Merge FormatJsonTest and FormatJsonUnitTest 2021-05-05 20:52:30 +00:00
language build: Updating dependencies 2021-07-22 03:36:05 +00:00
libs build: Updating dependencies 2021-07-22 03:36:05 +00:00
linker build: Updating dependencies 2021-07-22 03:36:05 +00:00
mail
media build: Updating dependencies 2021-07-22 03:36:05 +00:00
Message
objectcache build: Updating dependencies 2021-07-22 03:36:05 +00:00
page Clean up MergeHistory 2021-07-13 12:01:04 -07:00
ParamValidator/TypeDef NamespaceDefTest: stop calling getNamespaces() statically 2021-05-20 23:52:47 +00:00
parser Parser: remove Title from method signatures 2021-04-29 18:11:46 +02:00
password build: Updating dependencies 2021-07-22 03:36:05 +00:00
Permissions build: Updating dependencies 2021-07-22 03:36:05 +00:00
poolcounter
preferences build: Updating dependencies 2021-07-22 03:36:05 +00:00
registration Update Legoktm's email address 2021-05-02 05:39:37 +00:00
resourceloader build: Updating dependencies 2021-07-22 03:36:05 +00:00
Rest Add UserNameUtils to DummyServicesTrait, and use it 2021-07-27 12:17:06 +00:00
Revision Merge "RevisionStoreFactoryTest: Clean up and convert to unit test" 2021-04-24 03:32:57 +00:00
revisionlist
search
session Move CRSF token generation to CsrfTokenSet 2021-06-18 12:24:19 -07:00
shell Add support for multiple shellbox URLs through a mapping configuration 2021-06-21 14:14:44 +02:00
site
skins build: Updating dependencies 2021-07-22 03:36:05 +00:00
Storage build: Updating dependencies 2021-07-22 03:36:05 +00:00
tidy
title build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
user Add UserNameUtils to DummyServicesTrait, and use it 2021-07-27 12:17:06 +00:00
utils build: Updating dependencies 2021-07-22 03:36:05 +00:00
watcheditem Reduce duplication in NoWriteWatchedItemStoreUnitTest 2021-07-23 08:07:46 +00:00
watchlist Add DummyServicesTrait::getDummyReadOnlyMode() 2021-07-05 07:16:13 +00:00
BadFileLookupTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
DeprecatedGlobalTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
DerivativeRequestTest.php
FactoryArgTestTrait.php Remove some more comments that literally repeat the code 2021-06-18 21:23:56 +00:00
FauxResponseTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
FeedUtilsTest.php
FormOptionsInitializationTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
FormOptionsTest.php
HeaderCallbackTest.php
LicensesTest.php
ListToggleTest.php Remove meaningless ->expects( $this->any() ) from all tests 2021-04-23 11:58:58 +02:00
MovePageTest.php build: Upgrade mediawiki-codesniffer from v35.0.0 to v36.0.0 2021-04-29 13:00:15 -07:00
PathRouterTest.php Remove PathRouterTest::$basicRouter, unused 2021-05-05 20:33:54 +00:00
PingbackTest.php Merge "Simplify and reduce duplication in PingbackTest" 2021-07-23 04:16:56 +00:00
ProxyLookupTest.php
SiteConfigurationTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
TitleArrayFromResultTest.php
TitleTest.php Move some Title tests to unit tests 2021-07-09 23:18:57 +00:00
WikiReferenceTest.php Move WikiReferenceTest to a unit test 2021-05-02 10:00:52 +00:00
XmlJsTest.php
XmlSelectTest.php
XmlTest.php