mediawiki-extensions-SpamBl.../tests/phpunit
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
..
BaseBlacklistTest.php Replace some moved Title class uses, now MediaWiki\Title\Title 2023-08-19 04:19:23 +00:00
SpamBlacklistTest.php tests: Support temp accounts in testSpam() 2024-03-07 10:53:17 +01:00