You are here

protected function ContentTranslationManageAccessCheckTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php \Drupal\Tests\content_translation\Unit\Access\ContentTranslationManageAccessCheckTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php, line 37
Contains \Drupal\Tests\content_translation\Unit\Access\ContentTranslationManageAccessCheckTest.

Class

ContentTranslationManageAccessCheckTest
Tests for content translation manage check.

Namespace

Drupal\Tests\content_translation\Unit\Access

Code

protected function setUp() {
  parent::setUp();
  $this->cacheContextsManager = $this
    ->getMockBuilder('Drupal\\Core\\Cache\\Context\\CacheContextsManager')
    ->disableOriginalConstructor()
    ->getMock();
  $this->cacheContextsManager
    ->method('assertValidTokens')
    ->willReturn(TRUE);
  $container = new ContainerBuilder();
  $container
    ->set('cache_contexts_manager', $this->cacheContextsManager);
  \Drupal::setContainer($container);
}