mediawiki-extensions-Scribunto/tests/phpunit/Engines/LuaCommon/HtmlLibraryTest.php
Reedy 408f4d0bc6 Namespace tests
Change-Id: I4977bf534400643f83ab3400c3dfd736c53f9705
2022-09-30 00:59:00 +00:00

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',
];
}
}