Page MenuHomePhabricator

Flow's SpamBlacklist test breaking core commit
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Flow is hackily doing the following to override two messages:

		$msgCache = \MessageCache::singleton();
		$msgCache->enable();
		$msgCache->replace( 'Spam-blacklist', implode( "\n", $this->blacklist ) );
		$msgCache->replace( 'Spam-whitelist', implode( "\n", $this->whitelist ) );
		// That only works if the spam blacklist is really reset

Two things:

  1. Why is the core patch breaking this usage?
  2. We should refactor SpamBlacklist to allow for easier mocking/testing. We can override the 'blacklist' by messing with internal properties of the \SpamBlacklist instance, but not the whitelist.

Change 212493 had a related patch set uploaded (by Legoktm):
Create pages instead of messing with MessageCache in SpamBlacklist tests

https://gerrit.wikimedia.org/r/212493

Change 212493 merged by jenkins-bot:
Create pages instead of messing with MessageCache in SpamBlacklist tests

https://gerrit.wikimedia.org/r/212493