| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\Scribunto\Tests\Engines\LuaCommon; |
| 4 | |
| 5 | use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase; |
| 6 | |
| 7 | class LuaCommonTestsLibrary extends LibraryBase { |
| 8 | public function register() { |
| 9 | $lib = [ |
| 10 | 'test' => [ $this, 'test' ], |
| 11 | ]; |
| 12 | $opts = [ |
| 13 | 'test' => 'Test option', |
| 14 | ]; |
| 15 | |
| 16 | return $this->getEngine()->registerInterface( __DIR__ . '/CommonTests-lib.lua', $lib, $opts ); |
| 17 | } |
| 18 | |
| 19 | public function test() { |
| 20 | return [ 'Test function' ]; |
| 21 | } |
| 22 | } |