From: Thiemo Mättig Date: Tue, 27 May 2014 13:44:56 +0000 (+0200) Subject: Add at least one RTL language to the TestSites mock collection X-Git-Tag: 1.31.0-rc.0~14701^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8e6fd74781d141e04574e662ad0b2b18922031b9;p=lhc%2Fweb%2Fwiklou.git Add at least one RTL language to the TestSites mock collection When working on Wikibase/Wikidata we learned that it's always a good idea to test with at least one right-to-left (RTL) language. We prefer 'fa' (Farsi, the Persian language). This change affects about 30 tests. If they all succeed the change should be fine, right? Change-Id: I11ded5ff98816e604da8fb92993834eb7dc99b99 --- diff --git a/tests/phpunit/includes/site/TestSites.php b/tests/phpunit/includes/site/TestSites.php index f224b7d774..af314ba28c 100644 --- a/tests/phpunit/includes/site/TestSites.php +++ b/tests/phpunit/includes/site/TestSites.php @@ -72,7 +72,22 @@ class TestSites { $site->setLinkPath( "http://spamzz.test/testing/" ); $sites[] = $site; - foreach ( array( 'en', 'de', 'nl', 'sv', 'sr', 'no', 'nn' ) as $langCode ) { + /** + * Add at least one right-to-left language (current RTL languages in MediaWiki core are: + * aeb, ar, arc, arz, azb, bcc, bqi, ckb, dv, en_rtl, fa, glk, he, khw, kk_arab, kk_cn, + * ks_arab, ku_arab, lrc, mzn, pnb, ps, sd, ug_arab, ur, yi). + */ + $languageCodes = array( + 'de', + 'en', + 'fa', //right-to-left + 'nl', + 'nn', + 'no', + 'sr', + 'sv', + ); + foreach ( $languageCodes as $langCode ) { $site = new MediaWikiSite(); $site->setGlobalId( $langCode . 'wiki' ); $site->setGroup( 'wikipedia' );