mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaCommon/LuaCommonTestsLibrary.php
Lucas Werkmeister (WMDE) 18d122b60d Revert "Namespace LuaCommon"
This reverts commit 62e1fb0b5f.

Reason for revert: caused several errors:
* unnamespaced HooksTest collides with core’s class of the same name
* Scribunto_LuaError renamed without class alias despite being used in Wikibase

Bug: T314464
Change-Id: I8b151327236bf86945e59823fba155497e4b3fc6
2022-08-03 10:03:12 +00:00

19 lines
366 B
PHP

<?php
class Scribunto_LuaCommonTestsLibrary extends Scribunto_LuaLibraryBase {
public function register() {
$lib = [
'test' => [ $this, 'test' ],
];
$opts = [
'test' => 'Test option',
];
return $this->getEngine()->registerInterface( __DIR__ . '/CommonTests-lib.lua', $lib, $opts );
}
public function test() {
return [ 'Test function' ];
}
}