function QuickEditEntityFieldAccessCheckTest::setUp
Same name in other branches
- 8.9.x 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 30
Class
- QuickEditEntityFieldAccessCheckTest
- @coversDefaultClass \Drupal\quickedit\Access\QuickEditEntityFieldAccessCheck @group Access @group quickedit @group legacy
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.