From 09daeb5ba277862736cefcd5f225ed2876e16ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 19 Nov 2024 23:58:21 +0100 Subject: [PATCH] DiscussionParserTest: Add some test case names PHPUnit will display them if the tests fail. Change-Id: Iff695d801819e13c238929912433e6a97e14ec54 --- tests/phpunit/DiscussionParserTest.php | 39 +++++++++----------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/tests/phpunit/DiscussionParserTest.php b/tests/phpunit/DiscussionParserTest.php index f0d36d468..028d6c0d6 100644 --- a/tests/phpunit/DiscussionParserTest.php +++ b/tests/phpunit/DiscussionParserTest.php @@ -318,8 +318,7 @@ class DiscussionParserTest extends MediaWikiIntegrationTestCase { ], ], ], - // T68512, leading colon in user page link in signature - [ + "T68512, leading colon in user page link in signature" => [ 'new' => 612485855, 'old' => 612485595, 'username' => 'Admin', @@ -340,8 +339,7 @@ class DiscussionParserTest extends MediaWikiIntegrationTestCase { ], 'precondition' => 'isParserFunctionsInstalled', ], - // T154406 unintended mentions when changing content - [ + "T154406 unintended mentions when changing content" => [ 'new' => 987667999, 'old' => 987667998, 'username' => 'Admin', @@ -1064,85 +1062,74 @@ TEXT $ts = self::EXEMPLAR_TIMESTAMP; return [ - // Basic - [ + "Basic" => [ "I like this. [[User:Werdna|Werdna]] ([[User talk:Werdna|talk]]) $ts", [ 13, 'Werdna' ], ], - // Confounding - [ + "Confounding" => [ "[[User:Jorm]] is a meanie. --[[User:Werdna2|Andrew]] $ts", [ 29, "Werdna2" ], ], - // Talk page link only - [ + "Talk page link only" => [ "[[User:Swalling|Steve]] is the best person I have ever met. --[[User talk:Werdna3|Andrew]] $ts", [ 62, 'Werdna3' ], ], - // Anonymous user - [ + "Anonymous user" => [ "I am anonymous because I like my IP address. --[[Special:Contributions/127.0.0.1|127.0.0.1]] $ts", [ 47, '127.0.0.1' ], ], - // No signature - [ + "No signature" => [ "Well, \nI do think that [[User:Newyorkbrad]] is pretty cool, but what do I know?", false ], - // Hash symbols in usernames - [ + "Hash symbols in usernames" => [ "What do you think? [[User talk:We buried our secrets in the garden#top|wbositg]] $ts", [ 19, 'We buried our secrets in the garden' ], ], - // Title that gets normalized different than it is provided in the wikitext - [ + "Title that gets normalized different than it is provided in the wikitext" => [ "Beep boop [[User:I_Heart_Spaces]] ([[User_talk:I_Heart_Spaces]]) $ts", [ strlen( "Beep boop " ), 'I Heart Spaces' ], ], - // Accepts ] in the pipe - [ + "Accepts ] in the pipe" => [ "Shake n Bake --[[User:Werdna4|wer]dna]] $ts", [ strlen( "Shake n Bake --" ), 'Werdna4', ], ], - - [ + "???" => [ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxã? [[User:Jam]] $ts", [ strlen( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxã? " ), "Jam" ], ], - // extra long signature - [ + "extra long signature" => [ "{{U|He7d3r}}, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxã? [[User:Reverta-me|Aaaaa Bbbbbbb]]'' [[User Talk:Reverta-me|Discussão]]''", [ strlen( "{{U|He7d3r}}, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxã? " ), 'Reverta-me', ], ], - // Bug: T87852 - [ + "Bug: T87852" => [ "Test --[[Benutzer:Schnark]] ([[Benutzer:Schnark/js|js]])", [ strlen( "Test --" ),