When creating ServiceOptions objects or fake HashConfigs use the
constant to refer the config name
Change-Id: I59a29f25b76e896c07e82156c6cc4494f98e64cc
See full rationale at I59068cfed10aabf6c6002f9e9312a6ef6e7e9441.
Using IDatabase for now instead of DBConnRef for better BC.
Change-Id: Ie75aaf46ba91779e8706b10efeefa9580857f489
MediaWikiTestCaseTrait provides a helper method,
createNoOpMock, that covers the case of wanting
to assert that no methods or no methods except
those in a list get called.
Add a helper method for the repeated logic
of creating cache and config, and creating
and running the pingback.
Merge the two test cases for when a pingback
should actually be sent (no prior pingback in the
database, or the prior pingback is from more than a
month ago) to use a data provider.
Rename variables to be sligthly clearer.
Change-Id: I25daf4d78b7bea12a6bc68ace3827985e435d21d
Discovered in another patch that while integration
tests automatically reset fake timestamps afterwards,
unit tests don't. Add a shared method to MediaWikiTestCaseTrait
to reset for both integration tests and unit tests
Do the same for TypeDefTestCase
Change-Id: I677aec4e60894053fc554f2e13b069fb599858f2
* Inject dependencies from the constructor and use those instead.
* Make getSystemInfo() static since its sole purpose is to collect
global state. This also means it can be safely called from the
Installer without needing to construct this class and its unsafe
dependencies as the Installer was doing previously.
* Remove private 'id' member. This cached the fetchOrInsertId()
return value but was never used.
* Remove selectField() fallback IGNORE-mode insert from fetchOrInsertId().
This existed to handle concurrent writes, but this isn't possible
since all this runs inside a DB_MASTER lock.
* Add missing call to $cache->makeKey().
Avoid passing unformatted strings directly to BagOStuff methods.
Bug: T270540
Change-Id: I984526020ea4d5f0fd6f72b6be527edaf6ab0917