mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-19 11:21:48 +00:00
408f4d0bc6
Change-Id: I4977bf534400643f83ab3400c3dfd736c53f9705
31 lines
721 B
PHP
31 lines
721 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
|
|
|
|
use Parser;
|
|
|
|
class HtmlLibraryTest extends LuaEngineUnitTestBase {
|
|
/** @inheritDoc */
|
|
protected static $moduleName = 'HtmlLibraryTests';
|
|
|
|
protected function setUp(): void {
|
|
parent::setUp();
|
|
|
|
// For strip marker test
|
|
$markers = [
|
|
'nowiki' => Parser::MARKER_PREFIX . '-test-nowiki-' . Parser::MARKER_SUFFIX,
|
|
];
|
|
$interpreter = $this->getEngine()->getInterpreter();
|
|
$interpreter->callFunction(
|
|
$interpreter->loadString( 'mw.html.stripMarkers = ...', 'fortest' ),
|
|
$markers
|
|
);
|
|
}
|
|
|
|
protected function getTestModules() {
|
|
return parent::getTestModules() + [
|
|
'HtmlLibraryTests' => __DIR__ . '/HtmlLibraryTests.lua',
|
|
];
|
|
}
|
|
}
|