function LanguageConfigOverrideTest::setUp

Same name in other branches
  1. 9 core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php \Drupal\Tests\language\Unit\Config\LanguageConfigOverrideTest::setUp()
  2. 8.9.x core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php \Drupal\Tests\language\Unit\Config\LanguageConfigOverrideTest::setUp()
  3. 11.x core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php \Drupal\Tests\language\Unit\Config\LanguageConfigOverrideTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php, line 56

Class

LanguageConfigOverrideTest
@coversDefaultClass \Drupal\language\Config\LanguageConfigOverride @group Config @group language

Namespace

Drupal\Tests\language\Unit\Config

Code

protected function setUp() : void {
    parent::setUp();
    $this->storage = $this->createMock('Drupal\\Core\\Config\\StorageInterface');
    $this->eventDispatcher = $this->createMock('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface');
    $this->typedConfig = $this->createMock('\\Drupal\\Core\\Config\\TypedConfigManagerInterface');
    $this->configTranslation = new LanguageConfigOverride('config.test', $this->storage, $this->typedConfig, $this->eventDispatcher);
    $this->cacheTagsInvalidator = $this->createMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
    $container = new ContainerBuilder();
    $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator);
    \Drupal::setContainer($container);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.