Debian Codegraph @

extensions/Scribunto/tests/phpunit/Engines/LuaCommon/UstringLibraryPureLuaTest.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon;
4
5 /**
6 * @coversNothing -- Covers Lua code
7 */
8 class UstringLibraryPureLuaTest extends UstringLibraryTest {
9 protected function setUp(): void {
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
24 /**
25 * @dataProvider providePCREErrors
26 */
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 }