function ConfigEntityStorageTest::testCreateWithCurrentLanguage
Tests create with current language.
@legacy-covers ::create @legacy-covers ::doCreate
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php, line 223
Class
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testCreateWithCurrentLanguage() : void {
$this->languageManager
->getLanguage('hu')
->willReturn(new Language([
'id' => 'hu',
]));
$entity = $this->entityStorage
->create([
'id' => 'foo',
]);
$this->assertSame('hu', $entity->language()
->getId());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.