function LanguageUnitTest::testGetLangcode
Tests get langcode.
@legacy-covers ::getId
File
-
core/
tests/ Drupal/ Tests/ Core/ Language/ LanguageUnitTest.php, line 54
Class
Namespace
Drupal\Tests\Core\LanguageCode
public function testGetLangcode() : void {
$language_code = $this->randomMachineName(2);
$language = new Language([
'id' => $language_code,
]);
$this->assertSame($language_code, $language->getId());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.