mediawiki-extensions-Scribunto/tests/phpunit/Engines/LuaCommon/UriLibraryTest.php
thiemowmde 40ebea2313 Make use of MainConfigNames constants in tests
Change-Id: I55aa25268b9d2f48f90b6f79ed4309c9b2355bd9
2024-08-27 20:36:11 +00:00

35 lines
928 B
PHP

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