protected function ContentLanguageSettingsUnitTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php \Drupal\Tests\language\Unit\ContentLanguageSettingsUnitTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ language/ tests/ src/ Unit/ ContentLanguageSettingsUnitTest.php, line 66 - Contains \Drupal\Tests\language\Unit\ContentLanguageSettingsUnitTest.
Class
- ContentLanguageSettingsUnitTest
- @coversDefaultClass \Drupal\language\Entity\ContentLanguageSettings @group language
Namespace
Drupal\Tests\language\UnitCode
protected function setUp() {
$this->entityTypeId = $this
->randomMachineName();
$this->entityType = $this
->getMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityManager = $this
->getMock('\\Drupal\\Core\\Entity\\EntityManagerInterface');
$this->uuid = $this
->getMock('\\Drupal\\Component\\Uuid\\UuidInterface');
$this->typedConfigManager = $this
->getMock('Drupal\\Core\\Config\\TypedConfigManagerInterface');
$this->configEntityStorageInterface = $this
->getMock('Drupal\\Core\\Entity\\EntityStorageInterface');
$container = new ContainerBuilder();
$container
->set('entity.manager', $this->entityManager);
$container
->set('uuid', $this->uuid);
$container
->set('config.typed', $this->typedConfigManager);
$container
->set('config.storage', $this->configEntityStorageInterface);
\Drupal::setContainer($container);
}