From 8e6fd74781d141e04574e662ad0b2b18922031b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Tue, 27 May 2014 15:44:56 +0200 Subject: [PATCH] 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 --- tests/phpunit/includes/site/TestSites.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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' ); -- 2.20.1