Debian Codegraph @

extensions/Scribunto/tests/phpunit/Engines/LuaCommon/HtmlLibraryTest.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
4
5 use MediaWiki\Parser\Parser;
6
7 /**
8 * @covers \MediaWiki\Extension\Scribunto\Engines\LuaCommon\HtmlLibrary
9 */
10 class HtmlLibraryTest extends LuaEngineUnitTestBase {
11 /** @inheritDoc */
12 protected static $moduleName = 'HtmlLibraryTests';
13
14 protected function setUp(): void {
15 parent::setUp();
16
17 // For strip marker test
18 $markers = [
19 'nowiki' => Parser::MARKER_PREFIX . '-test-nowiki-' . Parser::MARKER_SUFFIX,
20 ];
21 $interpreter = $this->getEngine()->getInterpreter();
22 $interpreter->callFunction(
23 $interpreter->loadString( 'mw.html.stripMarkers = ...', 'fortest' ),
24 $markers
25 );
26 }
27
28 protected function getTestModules() {
29 return parent::getTestModules() + [
30 'HtmlLibraryTests' => __DIR__ . '/HtmlLibraryTests.lua',
31 ];
32 }
33 }