function ConfigFieldMapperTest::setUp
Same name in other branches
- 9 core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
- 8.9.x core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
- 11.x 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 50
Class
- ConfigFieldMapperTest
- Tests the functionality provided by the configuration field mapper.
Namespace
Drupal\Tests\config_translation\UnitCode
protected function setUp() : void {
parent::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\\Contracts\\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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.