protected function ContentLanguageSettingsUnitTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 63
Class
- ContentLanguageSettingsUnitTest
- @coversDefaultClass \Drupal\language\Entity\ContentLanguageSettings @group language
Namespace
Drupal\Tests\language\UnitCode
protected function setUp() : void {
$this->entityTypeId = $this
->randomMachineName();
$this->entityType = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityTypeManager = $this
->createMock(EntityTypeManagerInterface::class);
$this->uuid = $this
->createMock('\\Drupal\\Component\\Uuid\\UuidInterface');
$this->typedConfigManager = $this
->createMock('Drupal\\Core\\Config\\TypedConfigManagerInterface');
$this->configEntityStorageInterface = $this
->createMock('Drupal\\Core\\Entity\\EntityStorageInterface');
$container = new ContainerBuilder();
$container
->set('entity_type.manager', $this->entityTypeManager);
$container
->set('uuid', $this->uuid);
$container
->set('config.typed', $this->typedConfigManager);
$container
->set('config.storage', $this->configEntityStorageInterface);
\Drupal::setContainer($container);
}