mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-11 16:06:02 +00:00
9c6f6f905a
Move autoload entries for test to TestAutoloadClasses key Change-Id: Ie705db0e7225600b7b498cfa134733a65f1ae1c9
38 lines
870 B
PHP
38 lines
870 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/LuaUstringLibraryTest.php';
|
|
|
|
/**
|
|
* @coversNothing -- Covers Lua code
|
|
*/
|
|
class Scribunto_LuaUstringLibraryPureLuaTest extends Scribunto_LuaUstringLibraryTest {
|
|
protected function setUp() : void {
|
|
parent::setUp();
|
|
|
|
// Override mw.ustring with the pure-Lua version
|
|
$interpreter = $this->getEngine()->getInterpreter();
|
|
$interpreter->callFunction(
|
|
$interpreter->loadString( '
|
|
local ustring = require( "ustring" )
|
|
ustring.maxStringLength = mw.ustring.maxStringLength
|
|
ustring.maxPatternLength = mw.ustring.maxPatternLength
|
|
mw.ustring = ustring
|
|
', 'fortest' )
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider providePCREErrors
|
|
*/
|
|
public function testPCREErrors( $ini, $args, $error ) {
|
|
// Not applicable
|
|
$this->assertTrue( true );
|
|
}
|
|
|
|
public static function providePCREErrors() {
|
|
return [
|
|
[ [], [], null ],
|
|
];
|
|
}
|
|
}
|