You are here

public function LanguageConfigOverrideTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 59
Contains \Drupal\Tests\language\Unit\Config\LanguageConfigOverrideTest.

Class

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

Namespace

Drupal\Tests\language\Unit\Config

Code

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