function LanguageUnitTest::testGetName
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php \Drupal\Tests\Core\Language\LanguageUnitTest::testGetName()
- 8.9.x core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php \Drupal\Tests\Core\Language\LanguageUnitTest::testGetName()
- 10 core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php \Drupal\Tests\Core\Language\LanguageUnitTest::testGetName()
@covers ::getName
File
-
core/
tests/ Drupal/ Tests/ Core/ Language/ LanguageUnitTest.php, line 34
Class
- LanguageUnitTest
- @coversDefaultClass \Drupal\Core\Language\Language @group Language
Namespace
Drupal\Tests\Core\LanguageCode
public function testGetName() : void {
$name = $this->randomMachineName();
$language_code = $this->randomMachineName(2);
$language = new Language([
'id' => $language_code,
'name' => $name,
]);
$this->assertSame($name, $language->getName());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.