mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-27 07:12:57 +00:00
b39d3589ba
Override the target language in the parser options, so that it isn’t looked up from the database; this lets UriLibraryTest avoid database access. And since the Database group is no longer strictly required, remove the statement to that effect from the phpdoc again. Bug: T345372 Change-Id: I79f35257b123eb939d9ab67b16aa56d34586bb67
33 lines
784 B
PHP
33 lines
784 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->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',
|
|
];
|
|
}
|
|
}
|