MediaWiki REL1_34
UstringLibraryPureLuaTest.php
Go to the documentation of this file.
1<?php
2
3require_once __DIR__ . '/UstringLibraryTest.php';
4
9 protected function setUp() {
10 parent::setUp();
11
12 // Override mw.ustring with the pure-Lua version
13 $interpreter = $this->getEngine()->getInterpreter();
14 $interpreter->callFunction(
15 $interpreter->loadString( '
16 local ustring = require( "ustring" )
17 ustring.maxStringLength = mw.ustring.maxStringLength
18 ustring.maxPatternLength = mw.ustring.maxPatternLength
19 mw.ustring = ustring
20 ', 'fortest' )
21 );
22 }
23
27 public function testPCREErrors( $ini, $args, $error ) {
28 // Not applicable
29 $this->assertTrue( true );
30 }
31
32 public static function providePCREErrors() {
33 return [
34 [ [], [], null ],
35 ];
36 }
37}
if( $line===false) $args
Definition cdb.php:64
testPCREErrors( $ini, $args, $error)
@dataProvider providePCREErrors
@covers Scribunto_LuaUstringLibrary