mediawiki-extensions-Cite/tests/phpunit
thiemowmde d885a0c6b5 Allow disabling the alternative backlink labels message
The message cite_references_link_many_format_backlink_labels contains
e.g. "a b c …" and so on, to be used as alternative backlink labels
when a single reference is re-used multiple times. The default numeric
rendering is "1.1 1.2 …" and so on.

The two labels end in the message cite_references_link_many_format as
parameters $2 and $3. But only one of the two parameters is ever used.
By default the alternative label in $3 is unused.

This implies that everything about these alternative backlink labels
including the error message is effectively dead code most of the time,
never to be seen on the majority of wikis.

This change makes it possible to disable the message without breaking
anything. Instead the code will silently fallback to the default
behavior of showing the numeric label. This is much more efficient
than rendering possibly hundreds of error messages that never show
up anyhere. The same optimization is already done for the extremely
similar cite_link_label_group-… messages, see
FootnoteMarkFormatter::fetchCustomizedLinkLabel.

This is also partly motivated by T335129 as well as T321217.

Change-Id: Iab818d7db7eddaf7091234f6a22a18cdff70f8e8
2024-08-12 13:36:20 +02:00
..
integration Simplify ErrorReporter mocks in tests 2024-08-07 18:22:59 +00:00
unit Allow disabling the alternative backlink labels message 2024-08-12 13:36:20 +02:00
CiteCSSFileModuleTest.php Drop redundant fallbacks from parsoid-styles directory 2024-07-19 15:00:01 +02:00
CiteDbTest.php Stop writing to tablesUsed in tests 2024-01-20 12:23:34 +01:00
CiteHooksTest.php Don't load ReferencePreviews when not enabled in the config 2024-04-30 11:10:22 +02:00
CiteIntegrationTest.php Fix incomplete test setup now that ref items are objects 2024-07-21 14:28:59 +02:00
ReferenceMessageLocalizerTest.php tests: Use LanguageFactory to create qqx language 2024-07-20 21:40:18 +02:00
TestUtils.php Encapsulate ref object: limited to ReferenceStack 2024-01-09 09:59:16 +01:00