Make it extend SpecialPageTestBase and simplify it accordingly, removing
a lot of things that are no longer needed. I'm not even sure if this
test still serves a purpose, but at least it should be easier to
maintain now. This also fixes a test failure when
UniversalLanguageSelector is enabled due to a ULS hook error.
This approach still needs a hack for overriding UserOptionsManager,
because it's used in a lot of places with lots of expectations and
global state, and the mock would need to be much more complex for that.
Also:
- Remove unchecked exceptions from doc comments.
- Fix indentation of a conditional where the second line of the
condition was indented the same as the body, which made it hard to
read.
- Add some return typehints to various methods. These make it easier to
write tests because if a method is return-typehinted, PHPUnit will
mock the return value automatically, instead of returning null and
leaving it up to the developer to provide a mock explicitly.
- Add string typehint to Skin::normalizeKey. The value is already
assumed to be a string, and passing null to strtolower emits a
deprecation notice in PHP 8.1.
Change-Id: I80723b886b2b5a5d75cbb73571e1b19ea4a09af5