diff options
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/L10N/FactoryTest.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index 0f243c124ca..510c165eba9 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -775,4 +775,22 @@ class FactoryTest extends TestCase { $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)); + } } |