ApiQueryTitleBlacklistTest needs to restore globals

I guess this only ever worked before because none of the other tests
depended on these globals. Now that AuthManager is enabled by default,
one does.

Change-Id: If335fcc9b844a518b2c56bfa39153159261ae314
This commit is contained in:
Brad Jorsch 2016-05-31 10:57:14 -04:00
parent 20bfe59963
commit 49e8bf1d44

View file

@ -19,16 +19,15 @@ ini_set( 'include_path', ini_get( 'include_path' ) . ':' . __DIR__ . '/../../../
class ApiQueryTitleBlacklistTest extends ApiTestCase {
function setUp() {
global $wgTitleBlacklistSources;
parent::setUp();
$this->doLogin();
$wgTitleBlacklistSources = array(
$this->setMwGlobals( 'wgTitleBlacklistSources', array(
array(
'type' => 'file',
'src' => __DIR__ . '/testSource',
),
);
) );
}
/**
@ -57,6 +56,7 @@ class ApiQueryTitleBlacklistTest extends ApiTestCase {
global $wgGroupPermissions;
// Allow all users to override the titleblacklist
$this->stashMwGlobals( 'wgGroupPermissions' );
$wgGroupPermissions['*']['tboverride'] = true;
$unlisted = $this->doApiRequest( array(