mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaCommon/UriLibraryTest.php
Brad Jorsch 8a8e51d8c7 Set $wgFragmentMode for UriLibraryTest
It affects the behavior of mw.uri.anchorEncode()

Change-Id: I3a704507cda79a2a48ec58ce9b7500667ea0dda3
2020-01-02 14:51:11 -05:00

27 lines
643 B
PHP

<?php
class Scribunto_LuaUriLibraryTest extends Scribunto_LuaEngineTestBase {
protected static $moduleName = 'UriLibraryTests';
protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgServer' => '//wiki.local',
'wgCanonicalServer' => 'http://wiki.local',
'wgUsePathInfo' => true,
'wgActionPaths' => [],
'wgScript' => '/w/index.php',
'wgScriptPath' => '/w',
'wgArticlePath' => '/wiki/$1',
'wgFragmentMode' => [ 'legacy', 'html5' ],
] );
}
protected function getTestModules() {
return parent::getTestModules() + [
'UriLibraryTests' => __DIR__ . '/UriLibraryTests.lua',
];
}
}