protected function EditEntityFieldAccessCheckTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/quickedit/tests/src/Unit/Access/EditEntityFieldAccessCheckTest.php \Drupal\Tests\quickedit\Unit\Access\EditEntityFieldAccessCheckTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ quickedit/ tests/ src/ Unit/ Access/ EditEntityFieldAccessCheckTest.php, line 34 - Contains \Drupal\Tests\quickedit\Unit\Access\EditEntityFieldAccessCheckTest.
Class
- EditEntityFieldAccessCheckTest
- @coversDefaultClass \Drupal\quickedit\Access\EditEntityFieldAccessCheck @group Access @group quickedit
Namespace
Drupal\Tests\quickedit\Unit\AccessCode
protected function setUp() {
$this->editAccessCheck = new EditEntityFieldAccessCheck();
$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);
}