protected function ConfigMapperManagerTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ config_translation/ tests/ src/ Unit/ ConfigMapperManagerTest.php, line 33
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)
->will($this
->returnValue($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);
}