mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Recreate test users for every test
The assumption currently made that "we only need to add these users once" is only because of a hack in MediaWikiTestCase that is being removed in If251739f. Bug: T132411 Change-Id: I4924ae941b3844b39dd3f44c6986c3bf29b0d62a
This commit is contained in:
parent
f2d8cac0d6
commit
406deaec3f
|
@ -132,12 +132,9 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
|
|||
$this->setMwGlobals( array( 'wgDiff' => false ) );
|
||||
}
|
||||
|
||||
// we only need to add these users once, we won't (can't) tear them down anyway
|
||||
static $executed = false;
|
||||
if ( $executed === true ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// users need to be added for each test, resetDB() removes them
|
||||
// TODO: Only add users needed for each test, instead of adding them
|
||||
// all for every one.
|
||||
foreach ( $this->testUsers as $username => $preferences ) {
|
||||
$user = User::createNew( $username );
|
||||
|
||||
|
@ -149,8 +146,6 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
|
|||
$user->saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
$executed = true;
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
|
|
Loading…
Reference in a new issue