mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 02:03:58 +00:00
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:
parent
20bfe59963
commit
49e8bf1d44
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue