Signed-off-by: Mostafa Ahangarha <ahangarha@riseup.net>
$iterator = $factory->getLanguageIterator($iUserMock);
self::assertInstanceOf(ILanguageIterator::class, $iterator);
}
+
+ public static function languagesWithRespectedDirection():array {
+ return [
+ ['en', 'ltr'],
+ ['de', 'ltr'],
+ ['fa', 'rtl'],
+ ['ar', 'rtl']
+ ];
+ }
+
+ /**
+ * @dataProvider languagesWithRespectedDirection
+ */
+ public function testDirectionOfLocales(string $locale, string $expectedDirection) {
+ $factory = $this->getFactory();
+
+ self::assertEquals($expectedDirection, $factory->getLanguageDirectionFromLocale($locale));
+ }
}