From d46dedfea2dba508798659f1d76d409268170f27 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 12 Jun 2026 11:25:59 +0200 Subject: [PATCH] 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) --- tests/phpunit/Unit/LuaLibraryTestBase.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/Unit/LuaLibraryTestBase.php b/tests/phpunit/Unit/LuaLibraryTestBase.php index 2fcabec..95c95ce 100644 --- a/tests/phpunit/Unit/LuaLibraryTestBase.php +++ b/tests/phpunit/Unit/LuaLibraryTestBase.php @@ -22,6 +22,10 @@ abstract class LuaLibraryTestBase extends LuaEngineTestBase */ private $luaLibrary; + protected function getEngineName(): string { + return 'LuaStandalone'; + } + /** * @throws RuntimeException */