public function LanguageUnitTest::testGetName in Drupal 9
Same name and namespace in other branches
- 8 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 32
Class
- LanguageUnitTest
- @coversDefaultClass \Drupal\Core\Language\Language @group Language
Namespace
Drupal\Tests\Core\LanguageCode
public function testGetName() {
$name = $this
->randomMachineName();
$language_code = $this
->randomMachineName(2);
$language = new Language([
'id' => $language_code,
'name' => $name,
]);
$this
->assertSame($name, $language
->getName());
}