public function ConfigEntityStorageTest::testCreateWithExplicitLanguage in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::testCreateWithExplicitLanguage()
- 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::testCreateWithExplicitLanguage()
@covers ::create @covers ::doCreate
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php, line 238
Class
- ConfigEntityStorageTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testCreateWithExplicitLanguage() {
$this->languageManager
->getLanguage('en')
->willReturn(new Language([
'id' => 'en',
]));
$entity = $this->entityStorage
->create([
'id' => 'foo',
'langcode' => 'en',
]);
$this
->assertSame('en', $entity
->language()
->getId());
}