function ContentTranslationManageAccessCheckTest::setUp
Same name in other branches
- 9 core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php \Drupal\Tests\content_translation\Unit\Access\ContentTranslationManageAccessCheckTest::setUp()
- 8.9.x core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php \Drupal\Tests\content_translation\Unit\Access\ContentTranslationManageAccessCheckTest::setUp()
- 10 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 36
Class
- ContentTranslationManageAccessCheckTest
- Tests for content translation manage check.
Namespace
Drupal\Tests\content_translation\Unit\AccessCode
protected function setUp() : void {
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.