From 1be66cb00dbce083e900c7636826ef07225c66f7 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Thu, 11 Jun 2026 23:28:14 +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. Target LuaStandalone, whose interpreter Scribunto bundles, so the tests run in CI without installing a Lua extension. Earlier MediaWiki versions don't call getEngineName() and keep using the data-provider pattern, so the method is harmless there and this stays compatible across the supported range. 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 */