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