mediawiki-extensions-Scribunto/tests/engines/LuaCommon/TextLibraryTest.php
Brad Jorsch 0db3d7c6d2 Add text module
This exists for some common text-processing functions that aren't
included in string (and therefore also aren't in mw.ustring), as well as
a logical place for the "unstrip" function requested in bug 45085.

Bug: 45085
Change-Id: I47356215fcc8ddeed5f901cd933a30021394bd78
2013-03-20 10:10:15 -04:00

24 lines
562 B
PHP

<?php
class Scribunto_LuaTextLibraryTests extends Scribunto_LuaEngineTestBase {
protected static $moduleName = 'TextLibraryTests';
function setUp() {
parent::setUp();
// For unstrip test
$interpreter = $this->getEngine()->getInterpreter();
$interpreter->callFunction(
$interpreter->loadString( 'mw.text.stripTest = ...', 'fortest' ),
$this->getEngine()->getParser()->insertStripItem( 'ok' )
);
}
function getTestModules() {
return parent::getTestModules() + array(
'TextLibraryTests' => __DIR__ . '/TextLibraryTests.lua',
);
}
}