Why:
- Temp accounts require special handling in the test case, since we call
SpamBlacklist->filter() directly.
- We want to continue to test both IP editing and temp account editing
paradigms
What:
- Duplicate the testSpam() method to have one invocation run with temp
users, and a second one with the anonymous IP editing paradigm
- Have the testSpamAnonEditing use a anonymous user object returned from
user factory, to avoid ActorStore deprecation warnings where the
mocked wiki ID is null while the wiki's wiki ID is false
- Rename setUp to a "prepareGlobals" method, and invoke this after the
enable/disable temp account method. That's needed because
disableAutoCreateTempUser ends up invoking resetServices()
Bug: T355879
Change-Id: I604c521f00d5cc64b8102c93f9a013bcac557001
This requires 1.42 for some new names
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I9a7df2df9407ef10d855bc19db247983682a5fc8
There are some usages outside of SpamBlacklist that must be fixed. After
doing that, the signature should be updated to make the user
non-optional.
Note: I've changed the signature because external callers only pass the
first two parameters. Hence, it's easier to change it now, add a
User parameter to the callers and then make it non-optional, than having
to pass $preserveLog and $mode in all callers and then swapping the
order (as that would break the world).
Change-Id: I0714eb9dbc6af3c775ab7a81cb4b59e687183f77
Tests need a way to rest BaseBlacklist::instances, so they can be sure
they operate on a clean slate. This is also needed to ensure they do not
operate on real settings, targetting a real remote host.
Bug: T262443
Change-Id: Ic320f7a72da7f26e0931ce3d393fc5a61d43d4fc