LanguageCodesTest.php 611 B

123456789101112131415161718192021222324252627
  1. <?php
  2. use Grav\Common\Language\LanguageCodes;
  3. /**
  4. * Class ParsedownTest
  5. */
  6. class LanguageCodesTest extends \Codeception\TestCase\Test
  7. {
  8. public function testRtl(): void
  9. {
  10. self::assertSame(
  11. 'ltr',
  12. LanguageCodes::getOrientation('en')
  13. );
  14. self::assertSame(
  15. 'rtl',
  16. LanguageCodes::getOrientation('ar')
  17. );
  18. self::assertSame(
  19. 'rtl',
  20. LanguageCodes::getOrientation('he')
  21. );
  22. self::assertTrue(LanguageCodes::isRtl('ar'));
  23. self::assertFalse(LanguageCodes::isRtl('fr'));
  24. }
  25. }