function ConfigFieldMapperTest::setUp

Same name and namespace in other branches
  1. 11.x core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
  2. 10 core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
  3. 9 core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest::setUp()
  4. 8.9.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 53

Class

ConfigFieldMapperTest
Tests the functionality provided by the configuration field mapper.

Namespace

Drupal\Tests\config_translation\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->entityTypeManager = $this->createStub(EntityTypeManagerInterface::class);
  $this->entity = $this->createStub(FieldConfigInterface::class);
  $definition = [
    'class' => '\\Drupal\\config_translation\\ConfigFieldMapper',
    'base_route_name' => 'entity.field_config.node_field_edit_form',
    'title' => '@label field',
    'names' => [],
    'entity_type' => 'field_config',
  ];
  $this->configFieldMapper = new ConfigFieldMapper('node_fields', $definition, $this->getConfigFactoryStub(), $this->createStub(TypedConfigManagerInterface::class), $this->createStub(LocaleConfigManager::class), $this->createStub(ConfigMapperManagerInterface::class), $this->createStub(RouteProviderInterface::class), $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.