Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / maintenance / language / AllTransTest.php
blob3bb84191e62b286e2a498e2774cf5f03fed3d7c1
1 <?php
3 namespace MediaWiki\Tests\Maintenance;
5 use AllTrans;
6 use MediaWiki\Json\FormatJson;
7 use MediaWiki\Tests\Language\MockLocalisationCacheTrait;
9 /**
10 * @covers \AllTrans
11 * @author Dreamy Jazz
13 class AllTransTest extends MaintenanceBaseTestCase {
14 use MockLocalisationCacheTrait;
16 protected function getMaintenanceClass() {
17 return AllTrans::class;
20 /** @dataProvider provideExecute */
21 public function testExecute( $enMessageJsonFile ) {
22 $this->setService( 'LocalisationCache', $this->getMockLocalisationCache() );
23 $expectedMessages = FormatJson::decode( file_get_contents( $enMessageJsonFile ), true );
24 $this->expectOutputString( implode( "\n", array_keys( $expectedMessages ) ) . "\n" );
25 $this->maintenance->execute();
28 public static function provideExecute() {
29 return [
30 'Using mock en.json' => [ MW_INSTALL_PATH . "/tests/phpunit/data/localisationcache/en.json" ],