Fixed SkinModuleTest::provideGetFeatureFilePathsOrder as nesting of
arrays for parameters is wrong
Change-Id: I9875008adf62d284c48662ebfbd245d72e5be064
We're already constructing service options with the list of options the
service needs. Let's stick to the light-weight version and avoid injecting
the entire MainConfig object just to get 2 settings when we can just list
it them in CONSTRUCTOR_OPTIONS.
Change-Id: I0612ca1c129c55664f29e178959c017d849eb218
There are a couple of user options related classes already,
and the T321527 work on dynamic defaults is going to add
even more. Let's move them into a separate namespace
to make core a bit more organized.
Old name is kept as an alias for compatibility purposes.
Bug: T321527
Bug: T352284
Change-Id: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Mock the needed dependencies to avoid database access when possible, and
add the test to the Database group otherwise.
Bug: T155147
Change-Id: Ic5c39ab35ab4d993721713285180f072497a5a40
TestUser creates the user and therefore needs the database. Avoid using
it in non-database tests.
Add ApiQueryBlockInfoTraitTest to the Database group because it needs
the database.
Add DeleteUserEmailTest to the Database group because since 3bedffa8
the default user is not created any more in non-database tests
Change-Id: Iff438964dde47a47a2fa4a314d55010bd8c7fee5
DefaultPreferencesFactory uses ServiceOptions which does not use
live config values so using mock config is not actually working here
Use ::overrideConfigValue() to truly force the test config value
Change-Id: I4c8f57732ce54021fedb00c0d11835855a851b97
Same as I7a82951.
overrideConfigValue() and overrideConfigValues() both call
setMwGlobals(), which calls resetServices(). This is surprisingly
expensive. It's much better to call it once with an array.
Change-Id: I4ff2f6b902b1a1e0b554ce6fc76f3b612f703fae
This reduces the acceptable forms for hook handlers to three things:
* a callable (in the form of a string, an array, or a closure)
* an object, which is expected to have a public "on" method that
matches the hook name.
* an array containing an object spec in the "handler" key, for use
with ExtensionRegistry.
All other forms will trigger a deprecation warning.
Bug: T339167
Depends-On: I980f2d45e6bb8c6a04058e68c758f71bbcf709de
Depends-On: Ieae405f70caa01d84602583cc214b0ee3fadc796
Depends-On: If15df4b598c02ed9bda5eea0ae89a16ebbf4f2e2
Depends-On: Id70276fa1e1821bd400dc0ae5cea722a21d524d5
Change-Id: I83bc81d1b3033c38b9313884a9c70a187fdde227
Having pig-latin enabled per default in dev environments is convenient
for manual testing. More importantly, it will allow us to write
end-to-end tests for variant conversion.
Depends-On: I9dc2f743ac487b0f7cfb667150c0f6950d5e7fce
Depends-On: I85b66c85be3959d48a048733af17197bc4cf70af
Change-Id: Ia80ad33cbf5e311fa8b84bd765a8df8d156f4c38
createMock() does the same, but is much easier to read.
A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.
Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
Parser is using the service container to get a SignatureValidator
because, as noted in Gerrit comments on the relevant commit, there is a
circular dependency Parser -> SignatureValidatorFactory -> Parser.
So, have SignatureValidatorFactory::__construct() take a closure which
returns a Parser, instead of an actual Parser or ParserFactory.
Change-Id: I7bf4660f84ec8c8fb1d5b3b8581fe5d82bc3156e
The real option manager would do such fallback, this behavior should
be kept in tests.
(Depends-On I814050cfa86ec1e86291d380843eb319fddc924a)
Bug: T297082
Change-Id: I55f7d1e17bde904f2245b31df2df853cf0ca803f
Inject a UserOptionsManager instead of UserOptionsLookup, and
update deprecated calls to user options methods
Bug: T277600
Bug: T277818
Change-Id: Ifdf491c3fd6b5b16246f33012f1db21f2cbc1f3e
Inject LanguageConverterFactory, Parser, and SkinFactory,
plus remove use of UserOptionsLookup from MediaWikiServices
in favor of the existing injected one
Change-Id: Id8635a7a982f84828f3c0ba71f8446dd3d666a25
Has a fallback in case one is not provided, so as to not
break the GlobalPreferences extension
Includes fixing the expectations in the tests
for the underlying code in testUserGroupMemberships
Change-Id: Ia539e48c305787f7e2a9a3a0b42891b7a8e2912b
Use authority methods instead of the injected PermissionManager;
not removing the PermissionManager yet since it would break
the GlobalPreferencesFactory which extends the class
Change-Id: Ia804fa7e536d0746f49f51792a48af9f4834183c
The HTMLInfoField allows the default part to be a closure.
This delays the message parse until the messages are needed on a gui.
This avoids the message parse on save or api calls and hopefully makes
that faster.
The message prefs-memberingroups is now parsed as all the other label
messages. This is another fix as done for T142882 / 116063f
Bug: T58633
Change-Id: I860501fe3df1ee330460f04ffe8493dd16421c8d