function ConfigMapperManagerTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/modules/ config_translation/ tests/ src/ Unit/ ConfigMapperManagerTest.php, line 36 
Class
- ConfigMapperManagerTest
- Tests the functionality provided by configuration translation mapper manager.
Namespace
Drupal\Tests\config_translation\UnitCode
protected function setUp() : void {
  $language = new Language([
    'id' => 'en',
  ]);
  $language_manager = $this->createMock('Drupal\\Core\\Language\\LanguageManagerInterface');
  $language_manager->expects($this->once())
    ->method('getCurrentLanguage')
    ->with(LanguageInterface::TYPE_INTERFACE)
    ->willReturn($language);
  $this->typedConfigManager = $this->getMockBuilder('Drupal\\Core\\Config\\TypedConfigManagerInterface')
    ->getMock();
  $module_handler = $this->createMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $theme_handler = $this->createMock('Drupal\\Core\\Extension\\ThemeHandlerInterface');
  $this->configMapperManager = new ConfigMapperManager($this->createMock('Drupal\\Core\\Cache\\CacheBackendInterface'), $language_manager, $module_handler, $this->typedConfigManager, $theme_handler);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
