mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-18 10:53:37 +00:00
0db3d7c6d2
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
24 lines
562 B
PHP
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',
|
|
);
|
|
}
|
|
}
|