Page MenuHomePhabricator

"Invalid top messages: key-unknown" printed while running SubsetMessageGroupTest
Open, LowPublic

Description

To reproduce:

composer phpunit -- extensions/Translate/tests/phpunit/unit/messagegroups/SubsetMessageGroupTest.php

Output:

> phpunit 'extensions/Translate/tests/phpunit/unit/messagegroups/SubsetMessageGroupTest.php'
Using PHP 8.1.20
Running without MediaWiki settings because there are no integration tests
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

.Invalid top messages: key-unknown
....                                                               5 / 5 (100%)

Time: 00:00.018, Memory: 16.00 MB

OK (5 tests, 7 assertions)

This can also be seen in all CI runs that include Translate.

The test should be updated so that this warning isn't printed. Also, error_log is not generally used in MediaWiki. It should use a PSR logger instead.