function ConfigMapperManagerTest::setUp
Same name in other branches
- 9 core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::setUp()
- 8.9.x core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::setUp()
- 11.x 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 40
Class
- ConfigMapperManagerTest
- Tests the functionality provided by configuration translation mapper manager.
Namespace
Drupal\Tests\config_translation\UnitCode
protected function setUp() : void {
parent::setUp();
$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.