protected function QuickEditEntityFieldAccessCheckTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/quickedit/tests/src/Unit/Access/QuickEditEntityFieldAccessCheckTest.php \Drupal\Tests\quickedit\Unit\Access\QuickEditEntityFieldAccessCheckTest::setUp()
- 10 core/modules/quickedit/tests/src/Unit/Access/QuickEditEntityFieldAccessCheckTest.php \Drupal\Tests\quickedit\Unit\Access\QuickEditEntityFieldAccessCheckTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ quickedit/ tests/ src/ Unit/ Access/ QuickEditEntityFieldAccessCheckTest.php, line 29
Class
- QuickEditEntityFieldAccessCheckTest
- @coversDefaultClass \Drupal\quickedit\Access\QuickEditEntityFieldAccessCheck @group Access @group quickedit
Namespace
Drupal\Tests\quickedit\Unit\AccessCode
protected function setUp() : void {
$this->editAccessCheck = new QuickEditEntityFieldAccessCheck();
$cache_contexts_manager = $this
->prophesize(CacheContextsManager::class);
$cache_contexts_manager
->assertValidTokens()
->willReturn(TRUE);
$cache_contexts_manager
->reveal();
$container = new Container();
$container
->set('cache_contexts_manager', $cache_contexts_manager);
\Drupal::setContainer($container);
}