You are here

public function LingotekLocaleTest::testGenerateLingotek2Drupal in Lingotek Translation 8

File

src/Tests/LingotekLocaleTest.php, line 27

Class

LingotekLocaleTest
Tests LingotekLocale.

Namespace

Drupal\lingotek\Tests

Code

public function testGenerateLingotek2Drupal() {
  $language = LingotekLocale::generateLingotek2Drupal('es_ES');
  $this
    ->assertEqual('es', $language);
  $language = LingotekLocale::generateLingotek2Drupal('de-AT');
  $this
    ->assertEqual('de', $language);
  $language = LingotekLocale::generateLingotek2Drupal('ar');
  $this
    ->assertEqual('ar', $language);
}