You are here

public function AllowedLanguagesUserFieldTest::testAllowedLanguagesGetLanguageOptions in Allowed Languages 2.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/AllowedLanguagesUserFieldTest.php \Drupal\Tests\allowed_languages\Kernel\AllowedLanguagesUserFieldTest::testAllowedLanguagesGetLanguageOptions()

Test the function to get allowed language options.

File

tests/src/Kernel/AllowedLanguagesUserFieldTest.php, line 31

Class

AllowedLanguagesUserFieldTest
Tests for the allowed languages field added fo the user entity.

Namespace

Drupal\Tests\allowed_languages\Kernel

Code

public function testAllowedLanguagesGetLanguageOptions() {
  $language_options = allowed_languages_get_language_options();
  $this
    ->assertEquals($language_options, [
    'sv' => 'Swedish',
    'en' => 'English',
  ]);
}