MediaWiki  1.34.4
HtmlLibraryTest.php
Go to the documentation of this file.
1 <?php
2 
4  protected static $moduleName = 'HtmlLibraryTests';
5 
6  protected function setUp() {
7  parent::setUp();
8 
9  // For strip marker test
10  $markers = [
11  'nowiki' => Parser::MARKER_PREFIX . '-test-nowiki-' . Parser::MARKER_SUFFIX,
12  ];
13  $interpreter = $this->getEngine()->getInterpreter();
14  $interpreter->callFunction(
15  $interpreter->loadString( 'mw.html.stripMarkers = ...', 'fortest' ),
16  $markers
17  );
18  }
19 
20  protected function getTestModules() {
21  return parent::getTestModules() + [
22  'HtmlLibraryTests' => __DIR__ . '/HtmlLibraryTests.lua',
23  ];
24  }
25 }
Scribunto_LuaHtmlLibraryTest
Definition: HtmlLibraryTest.php:3
Parser\MARKER_PREFIX
const MARKER_PREFIX
Definition: Parser.php:139
Scribunto_LuaHtmlLibraryTest\setUp
setUp()
Definition: HtmlLibraryTest.php:6
Scribunto_LuaHtmlLibraryTest\getTestModules
getTestModules()
Definition: HtmlLibraryTest.php:20
Scribunto_LuaEngineUnitTestBase
This is the subclass for Lua library tests.
Definition: LuaEngineUnitTestBase.php:12
getEngine
getEngine()
Definition: LuaEngineTestHelper.php:109
Scribunto_LuaHtmlLibraryTest\$moduleName
static $moduleName
Definition: HtmlLibraryTest.php:4