You are here

public function AllowedLanguagesUserFieldTest::testAllowedLanguageGetAllowedLanguagesForUser in Allowed Languages 8

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

Test the allowed languages function to get a users languages.

File

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

Class

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

Namespace

Drupal\Tests\allowed_languages\Kernel

Code

public function testAllowedLanguageGetAllowedLanguagesForUser() {
  $allowed_languages = allowed_languages_get_allowed_languages_for_user($this->user);
  $this
    ->assertEquals($allowed_languages, [
    'sv',
    'en',
  ]);
}