mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-27 09:40:12 +00:00
Make use of MainConfigNames constants in tests
Change-Id: I55aa25268b9d2f48f90b6f79ed4309c9b2355bd9
This commit is contained in:
parent
5ced07c366
commit
40ebea2313
|
@ -3,6 +3,7 @@
|
||||||
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
|
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
|
||||||
|
|
||||||
use MediaWiki\Interwiki\ClassicInterwikiLookup;
|
use MediaWiki\Interwiki\ClassicInterwikiLookup;
|
||||||
|
use MediaWiki\MainConfigNames;
|
||||||
use MediaWiki\Page\PageIdentityValue;
|
use MediaWiki\Page\PageIdentityValue;
|
||||||
use MediaWiki\Parser\ParserOutputFlags;
|
use MediaWiki\Parser\ParserOutputFlags;
|
||||||
use MediaWiki\Permissions\RestrictionStore;
|
use MediaWiki\Permissions\RestrictionStore;
|
||||||
|
@ -29,20 +30,18 @@ class TitleLibraryTest extends LuaEngineTestBase {
|
||||||
|
|
||||||
// Set up interwikis (via wgInterwikiCache) before creating any Titles
|
// Set up interwikis (via wgInterwikiCache) before creating any Titles
|
||||||
$this->overrideConfigValues( [
|
$this->overrideConfigValues( [
|
||||||
'Server' => '//wiki.local',
|
MainConfigNames::Server => '//wiki.local',
|
||||||
'CanonicalServer' => 'http://wiki.local',
|
MainConfigNames::CanonicalServer => 'http://wiki.local',
|
||||||
'UsePathInfo' => true,
|
MainConfigNames::UsePathInfo => true,
|
||||||
'ActionPaths' => [],
|
MainConfigNames::ActionPaths => [],
|
||||||
'Script' => '/w/index.php',
|
MainConfigNames::Script => '/w/index.php',
|
||||||
'ScriptPath' => '/w',
|
MainConfigNames::ScriptPath => '/w',
|
||||||
'ArticlePath' => '/wiki/$1',
|
MainConfigNames::ArticlePath => '/wiki/$1',
|
||||||
'InterwikiCache' => ClassicInterwikiLookup::buildCdbHash( [
|
MainConfigNames::InterwikiCache => ClassicInterwikiLookup::buildCdbHash( [ [
|
||||||
[
|
'iw_prefix' => 'interwikiprefix',
|
||||||
'iw_prefix' => 'interwikiprefix',
|
'iw_url' => '//test.wikipedia.org/wiki/$1',
|
||||||
'iw_url' => '//test.wikipedia.org/wiki/$1',
|
'iw_local' => 0,
|
||||||
'iw_local' => 0,
|
] ] ),
|
||||||
],
|
|
||||||
] ),
|
|
||||||
] );
|
] );
|
||||||
|
|
||||||
$editor = self::getTestSysop()->getUser();
|
$editor = self::getTestSysop()->getUser();
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
|
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
|
||||||
|
|
||||||
|
use MediaWiki\MainConfigNames;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \MediaWiki\Extension\Scribunto\Engines\LuaCommon\UriLibrary
|
* @covers \MediaWiki\Extension\Scribunto\Engines\LuaCommon\UriLibrary
|
||||||
*/
|
*/
|
||||||
|
@ -13,14 +15,14 @@ class UriLibraryTest extends LuaEngineTestBase {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->overrideConfigValues( [
|
$this->overrideConfigValues( [
|
||||||
'Server' => '//wiki.local',
|
MainConfigNames::Server => '//wiki.local',
|
||||||
'CanonicalServer' => 'http://wiki.local',
|
MainConfigNames::CanonicalServer => 'http://wiki.local',
|
||||||
'UsePathInfo' => true,
|
MainConfigNames::UsePathInfo => true,
|
||||||
'ActionPaths' => [],
|
MainConfigNames::ActionPaths => [],
|
||||||
'Script' => '/w/index.php',
|
MainConfigNames::Script => '/w/index.php',
|
||||||
'ScriptPath' => '/w',
|
MainConfigNames::ScriptPath => '/w',
|
||||||
'ArticlePath' => '/wiki/$1',
|
MainConfigNames::ArticlePath => '/wiki/$1',
|
||||||
'FragmentMode' => [ 'legacy', 'html5' ],
|
MainConfigNames::FragmentMode => [ 'legacy', 'html5' ],
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue