summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php')
-rw-r--r--www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php b/www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php
new file mode 100644
index 00000000..9743e0d5
--- /dev/null
+++ b/www/wiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php
@@ -0,0 +1,35 @@
+<?php
+
+require_once __DIR__ . '/UstringLibraryTest.php';
+
+// @codingStandardsIgnoreLine Squiz.Classes.ValidClassName.NotCamelCaps
+class Scribunto_LuaUstringLibraryPureLuaTest extends Scribunto_LuaUstringLibraryTest {
+ 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 ],
+ ];
+ }
+}