function ConfigEntityMapperTest::setUp
Same name and namespace in other branches
- 11.x core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::setUp()
- 10 core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::setUp()
- 9 core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::setUp()
- 8.9.x core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ config_translation/ tests/ src/ Unit/ ConfigEntityMapperTest.php, line 51
Class
- ConfigEntityMapperTest
- Tests the functionality provided by the configuration entity mapper.
Namespace
Drupal\Tests\config_translation\UnitCode
protected function setUp() : void {
parent::setUp();
$this->entityTypeManager = $this->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->routeProvider = $this->createMock(RouteProviderInterface::class);
$this->routeProvider
->method('getRouteByName')
->with('entity.configurable_language.edit_form')
->willReturn(new Route('/admin/config/regional/language/edit/{configurable_language}'));
$definition = [
'class' => '\\Drupal\\config_translation\\ConfigEntityMapper',
'base_route_name' => 'entity.configurable_language.edit_form',
'title' => '@label language',
'names' => [],
'entity_type' => 'configurable_language',
'route_name' => 'config_translation.item.overview.entity.configurable_language.edit_form',
];
$this->configEntityMapper = new ConfigEntityMapper('configurable_language', $definition, $this->getConfigFactoryStub(), $this->createStub(TypedConfigManagerInterface::class), $this->createStub(LocaleConfigManager::class), $this->createStub(ConfigMapperManagerInterface::class), $this->routeProvider, $this->getStringTranslationStub(), $this->entityTypeManager, $this->createStub(LanguageManagerInterface::class), $this->createStub(EventDispatcherInterface::class));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.