mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaCommon/UstringLibraryPureLuaTest.php
Kunal Mehta f76ba3c465 Disable Squiz.Classes.ValidClassName.NotCamelCaps globally
Instead of per-file. This happens to also fix a false positive with the
PhpunitAnnotations sniff.

Change-Id: I22621c37217ed2db9d8b3591df1a1421c25fa7f6
2018-05-24 22:26:11 -07:00

35 lines
815 B
PHP

<?php
require_once __DIR__ . '/UstringLibraryTest.php';
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 ],
];
}
}