protected function ContentTranslationManageAccessCheckTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 33
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);
}