From d2f72641b214268a2e9dd0d64d0e923385d20a2b Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Thu, 8 Oct 2026 16:40:16 +0200 Subject: [PATCH] Tolerate lazy-loaded thumbnails in the image modal tests MediaWiki master now defaults `$wgNativeImageLazyLoading` to true (false through REL1_46, changed for T148047), so thumbnails carry `loading="lazy"` and the image modal tests' thumbnail regexes fail on the MW master CI leg. Make the attribute optional, as the patterns already do for `alt=""` and ` /`: `loading` is MediaWiki's markup, which this extension never emits, so the tests accept either form rather than pin the setting. Co-Authored-By: Claude Opus 5.5 --- tests/phpunit/Unit/ImageModalTest.php | 4 ++-- tests/phpunit/Unit/ImageModalTriggerTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/Unit/ImageModalTest.php b/tests/phpunit/Unit/ImageModalTest.php index d1a1ce2..dd25b0f 100644 --- a/tests/phpunit/Unit/ImageModalTest.php +++ b/tests/phpunit/Unit/ImageModalTest.php @@ -346,7 +346,7 @@ public function canParseDataProvider(): array 'framed' => false, ], [], - '~
~', + '~
~', '' . "\n", ], @@ -378,7 +378,7 @@ public function canParseDataProvider(): array 'manualthumb' => 'Shuttle.png', ], [], - '~
~', + '~
~', '' . "\n", ], diff --git a/tests/phpunit/Unit/ImageModalTriggerTest.php b/tests/phpunit/Unit/ImageModalTriggerTest.php index 19121c8..2bb3b73 100644 --- a/tests/phpunit/Unit/ImageModalTriggerTest.php +++ b/tests/phpunit/Unit/ImageModalTriggerTest.php @@ -254,7 +254,7 @@ public function canParseProvider() { [ '~
~', '~
~', - '~~', + '~~', ] ], 'framed' => [ @@ -319,7 +319,7 @@ public function canParseProvider() { ], [ '~
~', - '~~', + '~~', '~