protected function ConfigFieldMapperTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ config_translation/ tests/ src/ Unit/ ConfigFieldMapperTest.php, line 48
Class
- ConfigFieldMapperTest
- Tests the functionality provided by the configuration field mapper.
Namespace
Drupal\Tests\config_translation\UnitCode
protected function setUp() {
$this->entityTypeManager = $this
->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->entity = $this
->createMock('Drupal\\field\\FieldConfigInterface');
$definition = [
'class' => '\\Drupal\\config_translation\\ConfigFieldMapper',
'base_route_name' => 'entity.field_config.node_field_edit_form',
'title' => '@label field',
'names' => [],
'entity_type' => 'field_config',
];
$locale_config_manager = $this
->getMockBuilder('Drupal\\locale\\LocaleConfigManager')
->disableOriginalConstructor()
->getMock();
$this->eventDispatcher = $this
->createMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->configFieldMapper = new ConfigFieldMapper('node_fields', $definition, $this
->getConfigFactoryStub(), $this
->createMock('Drupal\\Core\\Config\\TypedConfigManagerInterface'), $locale_config_manager, $this
->createMock('Drupal\\config_translation\\ConfigMapperManagerInterface'), $this
->createMock('Drupal\\Core\\Routing\\RouteProviderInterface'), $this
->getStringTranslationStub(), $this->entityTypeManager, $this
->createMock('Drupal\\Core\\Language\\LanguageManagerInterface'), $this->eventDispatcher);
}