Merge "Clear test user registry between tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 14 Aug 2019 18:59:31 +0000 (18:59 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 14 Aug 2019 18:59:31 +0000 (18:59 +0000)
tests/phpunit/MediaWikiIntegrationTestCase.php
tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php

index 07d135d..93a596a 100644 (file)
@@ -635,6 +635,9 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
                        }
                }
 
+               // Clear any cached test users so they don't retain references to old services
+               TestUserRegistry::clear();
+
                // Re-enable any disabled deprecation warnings
                MWDebug::clearLog();
                // Restore mw globals
index 871ea91..59fe401 100644 (file)
@@ -17,7 +17,7 @@ class RCFeedIntegrationTest extends MediaWikiTestCase {
                        'wgServerName' => 'example.org',
                        'wgScriptPath' => '/w',
                        'wgDBname' => 'example',
-                       'wgDBprefix' => '',
+                       'wgDBprefix' => $this->dbPrefix(),
                        'wgRCFeeds' => [],
                        'wgRCEngines' => [],
                ] );
@@ -57,7 +57,7 @@ class RCFeedIntegrationTest extends MediaWikiTestCase {
                                                'server_url' => 'https://example.org',
                                                'server_name' => 'example.org',
                                                'server_script_path' => '/w',
-                                               'wiki' => 'example',
+                                               'wiki' => 'example-' . $this->dbPrefix(),
                                        ] ),
                                        $line
                                );