wiki.techinc.nl/includes/title
DannyS712 edd9ae23be Allow using MediaWikiTitleCodec with errors in unit tests
MediaWikiTitleCodec can throw MalformedTitleException,
which cannot be created in unit tests (see T281935). Until
that changes, add a helper callback
MediaWikiTitleCodec::$createMalformedTitleException
that will by default return a MalformedTitleException, but
tests can override this to return a mock.

We add this as an option to DummyServicesTrait to throw
generic `MalformedTitleException`s without regard to the
specifics of the message or parameters provided, this
can be used if no finer control is needed, or callers
can manually change the callback.

Demonstrate using it by moving the tests for UserNameUtils
to be unit tests - the only thing blocking this was the
creation of `MalformedTitleException`s.

Change-Id: I11ae4c6292465626ad1e432f7c6e9754c8ef36c2
2021-07-27 11:27:56 +00:00
..
Hook Document hook names in hook interfaces. 2020-09-27 12:03:12 +02:00
ForeignTitle.php
ForeignTitleFactory.php
ImportTitleFactory.php
MalformedTitleException.php Add and fix various type hints in PHPDocs 2021-06-18 08:19:23 +00:00
MediaWikiTitleCodec.php Allow using MediaWikiTitleCodec with errors in unit tests 2021-07-27 11:27:56 +00:00
NaiveForeignTitleFactory.php NaiveForeignTitleFactory: inject content language 2021-03-13 09:50:44 +00:00
NaiveImportTitleFactory.php Inject dependencies into some ImportTitleFactory classes 2021-03-22 21:27:27 +00:00
NamespaceAwareForeignTitleFactory.php
NamespaceImportTitleFactory.php Inject dependencies into some ImportTitleFactory classes 2021-03-22 21:27:27 +00:00
NamespaceInfo.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
SubpageImportTitleFactory.php Inject dependencies into some ImportTitleFactory classes 2021-03-22 21:27:27 +00:00
TitleFormatter.php TitleFormatter: fix typo ("of" -> "or") 2021-06-08 05:27:18 +00:00
TitleParser.php
TitleValue.php build: Updating dependencies 2021-07-22 03:36:05 +00:00