wiki.techinc.nl/tests/phpunit/unit
DannyS712 41287e87d8 Add MediaWikiTitleCodec and NamespaceInfo to DummyServicesTrait
Move MockTitleTrait::makeMockTitleCodec to DummyServicesTrait, and
replace the two existing uses, which are in core. Add some new
uses instead of mocking each time.

Unfortunately, we cannot use an actual MediaWikiTitleCodec
for the tests in BadFileLookup, because those tests are unit tests
and a MalformedTitleException cannot be created in the context
of a unit test. BadFileLookupTest gets around this by using
a mock that throws a mock exception - add a comment inline
explaining why we cannot use a real MediaWikiTitleCodec.

Paired with adding of NamespaceInfo to make mocking the language
methods related to namespaces easier by matching the real
logic in the Language class to the extend possible. Update a few
tests to use the DummyServicesTrait for their NamespaceInfo services.

Change-Id: Ibd691ccf0e632e1bf0bc1f7e9ddc0c660d5cad32
2021-05-04 19:10:23 +00:00
..
documentation Make ReleaseNotesTest a pure unit test 2021-01-21 02:45:09 +00:00
includes Add MediaWikiTitleCodec and NamespaceInfo to DummyServicesTrait 2021-05-04 19:10:23 +00:00
languages Add missing @param and @return to documentation in tests 2021-01-22 19:57:25 +01:00
maintenance Move MWDoxygenFilterTest to unit tests 2021-03-28 18:33:51 +00:00