public function ConfigEntityStorageTest::testCreateWithExplicitLanguage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 264 - Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest.
Class
- ConfigEntityStorageTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testCreateWithExplicitLanguage() {
$this->languageManager
->expects($this
->any())
->method('getLanguage')
->with('en')
->willReturn(new Language(array(
'id' => 'en',
)));
$entity = $this->entityStorage
->create(array(
'id' => 'foo',
'langcode' => 'en',
));
$this
->assertSame('en', $entity
->language()
->getId());
}