mediawiki-extensions-SpamBl.../tests
Kosta Harlan 0016a9a6f1
tests: Support temp accounts in testSpam()
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
2024-03-07 10:53:17 +01:00
..
phpunit tests: Support temp accounts in testSpam() 2024-03-07 10:53:17 +01:00