mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-13 08:48:39 +00:00
31820c673a
This takes advantage of extension.json's unit tests autodiscovery mechanism. Bug: T142120 Change-Id: Id526f3368fc73ba7e6ef1d793ea70ab05fbd9517
36 lines
889 B
PHP
36 lines
889 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/UstringLibraryTest.php';
|
|
|
|
// @codingStandardsIgnoreLine Squiz.Classes.ValidClassName.NotCamelCaps
|
|
class Scribunto_LuaUstringLibraryPureLuaTests extends Scribunto_LuaUstringLibraryTests {
|
|
protected function setUp() {
|
|
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 ],
|
|
];
|
|
}
|
|
}
|