mediawiki-extensions-Scribunto/tests/phpunit/Engines/LuaCommon/UstringLibraryPureLuaTest.php
Reedy 408f4d0bc6 Namespace tests
Change-Id: I4977bf534400643f83ab3400c3dfd736c53f9705
2022-09-30 00:59:00 +00:00

38 lines
855 B
PHP

<?php
namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
/**
* @coversNothing -- Covers Lua code
*/
class UstringLibraryPureLuaTest extends UstringLibraryTest {
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 ],
];
}
}