wiki.techinc.nl/tests/phpunit/data/messages/Messages_en.php
Tim Starling 0b12f8b698 Improve LocalisationCache post-merge validation check
When I deleted MessagesEn.php, neither the exception on line 498 nor
the exception modified here was thrown. Extensions register namespaces,
hiding the lack of default namespaces. If namespaceNames was missing,
RHS line 1004 would raise a warning but would create the key.

Also, phan was complaining that the key might be absent.

So, use 'rtl' instead of 'namespaceNames' as our test for data validity,
since it's less likely to be overridden by extensions. Move the check up
above the normalization of individual keys. Use isset() to satisfy phan.

Bug: T322278
Change-Id: I44c7506205fbe9ba6ffbd1155a6cdcf3ff0960eb
2022-11-09 12:57:23 +11:00

12 lines
331 B
PHP

<?php
/**
* This the test fixture for a message file in the English language (en).
*/
// Minimum required variables that must exist in at least the
// fallback language (en), as they are unconditionally accessed
// and assumed to be arrays.
$namespaceNames = [];
$specialPageAliases = [];
$preloadedMessages = [];
$rtl = false;