You are here

protected function ConfigFieldMapperTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 46
Contains \Drupal\Tests\config_translation\Unit\ConfigFieldMapperTest.

Class

ConfigFieldMapperTest
Tests the functionality provided by the configuration field mapper.

Namespace

Drupal\Tests\config_translation\Unit

Code

protected function setUp() {
  $this->entityManager = $this
    ->getMock('Drupal\\Core\\Entity\\EntityManagerInterface');
  $this->entity = $this
    ->getMock('Drupal\\field\\FieldConfigInterface');
  $definition = array(
    'class' => '\\Drupal\\config_translation\\ConfigFieldMapper',
    'base_route_name' => 'entity.field_config.node_field_edit_form',
    'title' => '@label field',
    'names' => array(),
    'entity_type' => 'field_config',
  );
  $locale_config_manager = $this
    ->getMockBuilder('Drupal\\locale\\LocaleConfigManager')
    ->disableOriginalConstructor()
    ->getMock();
  $this->configFieldMapper = new ConfigFieldMapper('node_fields', $definition, $this
    ->getConfigFactoryStub(), $this
    ->getMock('Drupal\\Core\\Config\\TypedConfigManagerInterface'), $locale_config_manager, $this
    ->getMock('Drupal\\config_translation\\ConfigMapperManagerInterface'), $this
    ->getMock('Drupal\\Core\\Routing\\RouteProviderInterface'), $this
    ->getStringTranslationStub(), $this->entityManager, $this
    ->getMock('Drupal\\Core\\Language\\LanguageManagerInterface'));
}