Skip to content

Commit 98e3740

Browse files
malbertsclaude
andcommitted
tests: declare the Lua engine for the LuaLibrary tests
Scribunto 1.46 requires each LuaEngineTestBase subclass to declare its engine via getEngineName(); the previous "one class exercises every engine" data-provider pattern is deprecated. Without it the LuaLibrary tests error on 1.46+ with "must implement getEngineName()". Target LuaStandalone, whose interpreter Scribunto bundles, so the tests run in CI without installing a Lua extension. Pre-1.46 MediaWiki does not call getEngineName() (it runs every configured engine through its own suite() machinery), so the method is inert there: the REL1_43 to REL1_45 rows are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 86a5b79 commit 98e3740

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/phpunit/Unit/LuaLibraryTestBase.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ abstract class LuaLibraryTestBase extends LuaEngineTestBase
2222
*/
2323
private $luaLibrary;
2424

25+
protected function getEngineName(): string {
26+
return 'LuaStandalone';
27+
}
28+
2529
/**
2630
* @throws RuntimeException
2731
*/

0 commit comments

Comments
 (0)