mediawiki-extensions-Scribunto/tests/phpunit/Engines/LuaCommon/UriLibraryTest.php
Fomafix 70605bf630 Replace global configuration variables
Use overrideConfigValues instead of setMwGlobals in tests.

Change-Id: Icaf7d8d9bb3a4c1eb981ef83a12719c2619039fa
2024-03-18 04:40:44 +00:00

33 lines
776 B
PHP

<?php
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
/**
* @covers \MediaWiki\Extension\Scribunto\Engines\LuaCommon\UriLibrary
*/
class UriLibraryTest extends LuaEngineTestBase {
/** @inheritDoc */
protected static $moduleName = 'UriLibraryTests';
protected function setUp(): void {
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' ],
] );
}
protected function getTestModules() {
return parent::getTestModules() + [
'UriLibraryTests' => __DIR__ . '/UriLibraryTests.lua',
];
}
}