mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-23 22:54:57 +00:00
Make SpamBlacklistTest::testSpamEdit pass when temp accounts enabled
Why: * SpamBlacklistTest::testSpamEdit fails to run when temporary accounts are enabled, because the EditPage object does not have the user set as the same as the RequestContext user (which is a named test user). * Making the test pass is necessary for running tests when temporary accounts are enabled in CI. What: * Set the EditPage context user as the same as the test user used for the article context above. Bug: T355879 Change-Id: I34e0299a9d9e3078f9067390e30dca7ce9665de4
This commit is contained in:
parent
a59c5598a1
commit
6f021e90da
|
@ -146,6 +146,7 @@ class SpamBlacklistTest extends MediaWikiIntegrationTestCase {
|
|||
$article = new Article( $title );
|
||||
$ep = new EditPage( $article );
|
||||
$ep->setContextTitle( $title );
|
||||
$ep->getContext()->setUser( $articleContext->getUser() );
|
||||
|
||||
$ep->importFormData( $req );
|
||||
|
||||
|
|
Loading…
Reference in a new issue