tests: Use LanguageFactory to create qqx language

Bug: T343771
Change-Id: Ib7ec113a21fd36a82c0345ffb98ed8692d82155d
This commit is contained in:
Umherirrender 2024-07-20 21:40:18 +02:00
parent f1bd3175fd
commit f58114be65

View file

@ -3,7 +3,6 @@
namespace Cite\Tests; namespace Cite\Tests;
use Cite\ReferenceMessageLocalizer; use Cite\ReferenceMessageLocalizer;
use LanguageQqx;
/** /**
* @covers \Cite\ReferenceMessageLocalizer * @covers \Cite\ReferenceMessageLocalizer
@ -12,7 +11,8 @@ use LanguageQqx;
class ReferenceMessageLocalizerTest extends \MediaWikiIntegrationTestCase { class ReferenceMessageLocalizerTest extends \MediaWikiIntegrationTestCase {
public function testMsg() { public function testMsg() {
$localizer = new ReferenceMessageLocalizer( new LanguageQqx() ); $lang = $this->getServiceContainer()->getLanguageFactory()->getLanguage( 'qqx' );
$localizer = new ReferenceMessageLocalizer( $lang );
$this->assertSame( $this->assertSame(
'(cite-desc)', '(cite-desc)',
$localizer->msg( 'cite-desc' )->plain() ); $localizer->msg( 'cite-desc' )->plain() );